[GRASS5] Nested vector islands, and incorrect left/right poly id's for island edges...
Eric G. Miller
egm2 at jps.net
Tue Jan 22 11:50:39 EST 2002
On Wed, 23 Jan 2002 06:03:56 +0100, Radim Blazek <radim.blazek at wo.cz> wrote:
> On Tuesday 22 January 2002 08:32, Eric G. Miller wrote:
> > It appears that GRASS doesn't write correct information for
> > left/right adjaceny for edges of areas nested more than
> > one polygon deep. That is: If polygon 1, contains polygon
> > 2, and polygon 2 contains polygon 3, the lines comprising
> > polygon 3 will have polygon 1 written as the adjacent area
> > for either left or right, when I would think it should be
> > polygon 2.
>
> We have to distinguish areas and isles.
> Are you sure that polygon1 is area1 and is not island1?
No, I'm not sure?? I am sure, that each of the three polygons
are labelled areas with 3 inside 2, and 2 inside 1. Therefore, to
draw 1, I want to eliminate 2 from 1. And, to draw 2, I
want to eliminate 3 from 2. Drawing 3 is straight forward.
> >
> > I was trying to work up a way to do the following:
> >
> > Given an area with N islands/holes. Create a set of
> > interior boundaries such that islands/holes that
> > share one or more edges are combined into a single
> > boundary (with interior edges being dropped).
> >
> > I tried to write a little program that iterated through
> > areas, and their islands, reporting the lines for all
> > and the reported line left/right indices. That's when
> > I discovered, I was getting islands where none of the
> > edges reported being adjacent to their immediate parent.
>
> For boundary inside other area (-island) is saved instead of (+area) for
> outside area side. Sorry, you probably know that all.
Yes, but if I get the interior boundary, Island, then look at
it's edges, shouldn't those edges have either the left or
right adjacency as the area number for the exterior. I find,
that is the case when there is only one level of nesting.
But in subsequent levels, the interior edges say they are
adjacent not to the immediate exterior area, but to the
area outside. That is, from the example above, the
edges of 3 say they are bounded by 1, rather than 2,
even though 2 is the closest containing area.
> > I guess, next I'll try using nodes instead of edges. If
> > anyone familiar with the guts of the vector libraries
> > (Radim, David ?) wants to point me in the right direction,
> > I'd appreciate it...
> >
> > Attached: area_report.c & Gmakefile
>
> You may be interested in grass51. I have v.build option=dump
> ( Vect_dump() ) and d.vect display=topo,dir (topo - topology
> numbers, dir - direction of lines - arrow). I hope to commit
> this week.
Yes, to look at it might help me understand GRASS's idea of
topology.
--
Eric G. Miller <egm2 at jps.net>
More information about the grass-dev
mailing list