[GRASS5] Q. How do you find the islands for a given area?

Eric G. Miller egm2 at jps.net
Mon Feb 26 02:46:02 EST 2001


On Mon, Feb 26, 2001 at 02:29:28PM +0700, Justin Hickey wrote:
> Hi Eric
> 
> "Eric G. Miller" wrote:
> > 
> > I've been looking into the d.area island drawing problem.  Anyway, I'm
> > trying to figure out how you find out:
> 
> I'm sorry I didn't read my mail this weekend, but the most efficinet way
> to solve your problem is to use a computer graphics algorithm for
> filling polygons. This algorithm handles convex polygons, concave
> polygons, self-intersecting polygons, and polygons with holes (or
> islands in your case). Since you already did a lot of coding, you may
> not be interested in this algorithm. However, if you are interested, it
> can be found in the book "Computer Graphics: Principles and Practice" by
> Foley, Van Dam, Feiner, and Hughes (see section 3.6 "Filling Polygons").
> If you cannot find this book, let me know and I'll see what I can do to
> summarize the algorithm for you. Note that with this algorithm, you do
> not have to worry about which areas are islands. However, you may need
> to modify this if you have nested islands.

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

-- 
Eric G. Miller <egm2 at jps.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