[GRASS5] Nested vector islands, and incorrect left/right poly id's for island edges...
David D Gray
ddgray at armadce.demon.co.uk
Tue Jan 22 20:02:48 EST 2002
Eric G. Miller wrote:
> [...]
> 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.
>
> 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
>
>
>
Eric
I've now run your script on some files. I can't confirm that there are
any cases of islands being incorrectly built. they all appear as I (and
Radim) described earlier, ie. with no internal boundaries separating
different cells, of course you may have found some.
The matter with area assignments to islands' lines is different. I
couldn't repeat the problem you reported, but found something else
equally bizarre:
I tested a small map with three chinese eggs, each of two segments, and
the ouput is as follows: [going inwards]
Area 1 {
dig_att = 0
lines {
line 1, left -1, right 1
line 2, left -1, right 1
}
Island 2 {
Lines {
Line -3, LeftArea -2, RightArea 2
Line 4, LeftArea 2, RightArea -2
} = Area -1
}
}
Area 2 {
dig_att = 0
lines {
line 3, left -2, right 2
line -4, left 2, right -2
}
Island 3 {
Lines {
Line 5, LeftArea 3, RightArea -3
Line -6, LeftArea -3, RightArea 3
} = Area -1
}
}
Area 3 {
dig_att = 0
lines {
line -5, left 3, right -3
line 6, left -3, right 3
}
}
All the lines here appear to have the same area on each side. So the
assignment of left/right area seems to be getting mangled. Could this be
giving the errors with internal boundaries, or apparent boundaries?
Anyway this definately needs looking into. It's getting late here, so it
will have to wait till tomorrow evening now, but I'll get back if I find
anything.
David
More information about the grass-dev
mailing list