It's worth pointing out that this kind of "split polygon" is invalid
according to the OGC SFS spec.
Martin Davis wrote:
There's nothing in JTS which will do this as a one-liner.
I can think of a fairly simple brute-force algorithm which would work
on most "simple" cases. Basically iterate over all points in the
hole, and all points in the outer ring, and find the shortest line
between a pair of points which doesn't intersect any of the line
segments of the rings. This shouldn't be too hard to code up. If
performance is an issue, indexing the outer ring is the answer, for
both locating nearest points and detecting intersections.
Hope this helps... if you need code, I'd be happy to subcontract on
this.... 8^)
Doug Smith wrote:
Since you're so responsive -- I thought I'd ask another question.
Can you recommend a technique for creating a "slice" that cuts from any
interior polygons to the exterior boundary, essentially making a single
polygon? Something like this:
http://drop.io/mapster/asset/terr-openjump-union-jpg
I've heard that FME by Safe can do this, but wondered if there was a
programmatic technique I could use in JTS instead.
Thanks!
Doug
---
Doug Smith
ELP Web Developer
http://www.daveramsey.com
"Life is an occasion, rise to it" -- Mr. Magorium
_______________________________________________
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