[GRASS5] [OFFTOPIC] Need some help...

Daniel Calvelo dca.gis at gmail.com
Tue Dec 20 19:52:37 EST 2005


Dmitry,

If you are willing to program the whole rendering algorithm, there are
some optimizations you could use: you might want to use R-Trees for
storage of the polygon features, and check, after the data is
projected and before writing into the canvas, that the projected data
does fill more than one pixel before rendering the whole feature.

Also, if your objective is only to display data, you could
precalculate simplified versions of the polygon boundaries for the
less detailed scales, and switch to the original data as you zoom into
more detailed areas.

Google for R-Tree; a lot of research has been done on them, and
several implementations are available from free software projects. You
might want to ask in the freegis list
(http://www.intevation.de/mailman/listinfo/freegis-list) where people
are rather heplful.

Daniel.

On 12/20/05, Dmitry Suzdalev <dimsuz at mail.ru> wrote:
> Hi, dear GRASS developers :).
> Please, sorry for maybe offtopic, but I have one question.
> I'm learning my way into world of map projections and my task is to display
> all the world in a GUI window (QT-window, actually).
> I've already managed to do it, using libproj4 :).
> But... There is sooo much data to be displayed that it draws rather slow.
>
> And it's obvious, that it's not needed to draw EACH map data primitive,
> because some of them are so small, that they're represented by one pixel,
> when using large scales. And still, if I have 1000 primitives (polylines,
> regions etc) that are so small, that they fit in one concrete pixel, they'll
> all be drawn. In the same pixel. 1000 times. That's slow :).
>
> So the question is: is there any common algorithm to cope with this situation?
> Which helps to somehow "filter out" the primitives which are represented by a
> single pixel at the screen and draw that pixel only once?
> Or should i investigate that algorithm by myself? :)
>
> Again, sorry if this is offtopic, I've googled for a few hours trying to find
> some kind of web-forum for such kind of questions, but I didn't find it :).
> Googling on "gis developers forum" pointed me to your mailing list, so I
> decided to give it a try :).
>
> Maybe at least, you can point me to the right place to ask such a question? :)
>
> Thanks in advance!
>
> And sorry for my maybe not very good English ;).
> Cheers, Dmitry.
>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
>


--
-- Daniel Calvelo Aros




More information about the grass-dev mailing list