Testing confirms that Labels *can* be heterogeneous.
I suspect this occurs during Label merging. The Label.merge method can
result in having heterogeneous labels.
CodeKaizen wrote:
On further investigation, we might still have an interesting case here for JTS.
When the edge is created in constructing the geometry graph for an
overlay operation, it is given a label, and the constructor "Label(int
geomIndex, int left, int on, int right)" creates an area/area label.
I'd not noticed this because the implementation of isArea() in NTS is
different - JTS uses the positions array length to determine this.
This brings me back to my original confusion - it appears that there
is no way to create a heterogeneous label in JTS, which makes the
isArea(int geomIndex) call always return true if one of the topology
locations is an area - the other will always be. In NTS, it returns
false, and the side information isn't copied.
Is there something I'm missing?
-rory
On Thu, May 1, 2008 at 3:15 PM, CodeKaizen <[EMAIL PROTECTED]> wrote:
The case I'm working on is very basic: the TestFunctionAA case in the
general tests. No tricks from the geometry here!
I was thrown off by the Label(int geomIndex, int left, int on, int
right) constructor, which creates a 3 position array for the topology
location, initializing them all to NONE.
In NTS, the topology location encoding is different (it's a struct,
not an array), and this causes some side-effects in the translated
algorithms which I'm still tracking down. On reflection, I guess I
needed to be confirmed that labels can be heterogeneous so I knew that
changing the label propagation code to change the label to an area
label for the given geometry was the correct thing to do.
Thanks again,
-rory
On Thu, May 1, 2008 at 2:27 PM, Martin Davis <[EMAIL PROTECTED]> wrote:
A Label can be heterogenous - it can be applied to an edge which is part of
both an area and a linear geometry.
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel