[GRASS5] [bug #242] (grass) R_polygon_abs() seems to ignoreislands

Glynn Clements glynn.clements at virgin.net
Thu May 3 00:32:32 EDT 2001


Justin Hickey wrote:

> > A correct solution is far from straightforward, as the Mesa[1] folks
> > have discovered.
> 
> I find this strange since there exists a well known graphics polygon
> filling algorithm that can handle polygons which are concave, convex,
> self-intersecting, and polygons with holes. Eric and I briefly discussed
> this in a previous thread. I will include part of it (two sections) for
> Glynn's benefit.

I'm familiar with that; however, tessellation seems to be a harder
problem than rasterisation (or, at least, if you discount the
degenerate case of having many narrow polygons).

Whilst we could just rasterise the areas in software for some of the
drivers, this won't work for HTMLMAP (other than by outputting a map
comprising lots of 1x1-pixel rectangles).

> > Such changes would have to be made at the driver lib side, as Radim
> > noted.  I don't know if I'm up to adding in another protocol call
> > to the rasterlib and the various driver libs.  It'd probably be the
> > "correct" way to handle these islands, but there are many places
> > where changes would have to be made (as opposed to one place in the
> > calling module).
> 
> So, as Eric said, this algorithm may mean a lot of work to implement but
> I agree with him that it is the correct solution.

I disagree; routines to tessellate arbitrary shapes into a set of
non-overlapping convex polygons would be much more useful. It would
make writing many vector algorithms much simpler.

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
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