Makes sense. Thanks for your help. Maybe it would be possible to make
multiple, valid polygons that serve the same purpose. I'll play with a
couple experiments -- maybe the MapQuest API will render an invalid
polygon anyway. 

Thanks again,

Doug

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin
Davis
Sent: Friday, January 23, 2009 4:35 PM
To: JTS Topology Suite Development
Subject: Re: [jts-devel] Polygon hole follow-up

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
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to