Hi Larry,
I get a case somewhat similar with a parser I wrote for GeoConcept format.
In this format, multi-polygon come as a set of linear rings with no
special order and eventually some overlaps or other bad topology I
wanted to catch.
I decided to compute the DE-9IM matrix in a double loop
Something like
List<Polygon> input = ... // the list of polygons issued from my linear
rings
List<Polygon> result = ... // an empty list of polygons
for (Polygon pi : input)
for (Polygon pr : result)
IntersectionMatrix im = pi.relate(pr)
// then decide if pi is a new polygon, a hole in an existing
polygon (result), an overlapping polygon...
I must admit this approach may have an unecessary performance penalty
for a format like shapefile (in my case, correctness was more important
than performance)
Michaël
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel