[geos-devel] Polygonizer bug ?

strk strk at keybit.net
Sun Jun 20 04:16:03 EDT 2010


Martin, I'm adding a testcase for the Polygonizer using example from :
"JTS Developer's Guide, Chapter 6 - Polygonization"

Here's the input, represented as a collection:

GEOMETRYCOLLECTION(
            LINESTRING(0 0, 10 10),
            LINESTRING(185 221, 100 100),
            LINESTRING(185 221, 88 275, 180 316),
            LINESTRING(185 221, 292 281, 180 316),
            LINESTRING(189 98, 83 187, 185 221),
            LINESTRING(189 98, 325 168, 185 221))
)

When passing it into the Polygonizer class I get
2 rings, no cut or invalid edges and 3 dangles.                                 Also notable is that of the 3 dangles, 2 are identical
and specificall are the isolated edge (first geometry
in the collection).

The example in the guide suggests the rings should
be 3 instead, and that there should be one cut
edge (represented in blue) and 2 dangles
the red ones.

Does it sound as a bug in GEOS or does JTS give the
same results ?

Note that forcing proper noding using the union trick
does give the 3 expected rings, but still lacks the
cut edge and duplicates the dangle.

Thanks in advance.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the geos-devel mailing list