|
Geometry : |
Subject: [ggl] Clipping/Intersecting efficiency
From: Koying Bing (koying)
Date: 2009-05-29 02:43:10
Hi,
Profiling my application (Merkaartor, which uses, notably, ggl to do
linestring clipping), I came to realize that clipping takes about 70% of the
time it takes to draw a frame!
2 reasons for that:
1) My "linestrings" are vectors of POINTERS to points.
I didn't find a way to use pointers as valid point_2D, so I have to recreate
a linestring_2D before intersecting -> malloc -> poor performance.
Is there a way to use a std::vector<point*> as a linestring?
2) intersecting uses outputstream to store its results. This again means
malloc -> poor performances.
Would it be possible to have an option to use a callback function returning
the ordered result?
Other programming practice suggestions are obviously welcome.
Thanks
- Chris -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20090529/93a2896b/attachment.html
Geometry list run by mateusz at loskot.net