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

Rich Shepard rshepard at appl-ecosys.com
Sun Feb 25 11:45:57 EST 2001


On Sun, 25 Feb 2001, Eric G. Miller wrote:

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

Eric,

  I'm not sure about this, but throwing out the idea. Pick a reference point
on the outer polygon. Test each inner polygon node by examining the length of
a vector between the reference node (on the outer polygon) and each node of
the inner polygon. I've no idea how to calculate the speed, but (in my
naivety) it might be O(n) because you calculate the vector once per pair of
points.

  Is this the type of solution that might work?

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
              Making environmentally-responsible mining happen. (SM)
                       --------------------------------
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard at appl-ecosys.com


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