[GRASS5] Q. How do you find the islands for a given area?
Radim Blazek
Radim.Blazek at dhv.cz
Sun Feb 25 13:49:00 EST 2001
> There's probably alot I can do to speed it up, by being more efficient
> about memory dupes. The biggest killer is the search for the closest
> tie point between the outer polygon and it's inner islands. I'm doing a
> real lame nested looping thing through two polygons to find the closest
> points. Maybe you'all have a better method to identify appropriate
> points to tie to two polygons together at?
I think that for Xdriver should be used system built in X window:
If fill-rule is set to EvenOddRule you can simply add islands to x,y array
(always return to area start point after each island) and it should be
plotted correctly. (For EvenOddRule, a point is inside if an infinite
ray with the point as origin crosses the path an odd number of times.)
Because other drivers (cell,..) will work in different way we need new function
R_polygon_with_holes_abs() which would send areas and islands separately
to driver. X driver would use X window internal fill system (probably
supported by HW) and cell driver would use your filling function
with closest points (cell driver may be slower).
Radim
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list