I just talked to Martin - he recognized the code here as a fork from a 
JTS original and was able to spot the mistake.

Apparently the construct we are building is not supposed to be a 
"proper" ring yet. So if we may need a different data structure to carry 
the information around in .... one that allows duplicate points (maybe 
even a simple List).

Apparently later in the method the duplicate points are removed, and 
then (and only then) should we make a real ring out of it. Martin talked 
a bit about performance, and how we should put off the duplicate point 
checks until much later.

Long and short of it ... we need two implementations for "ring":
- one may be invalid and is just used to throw information around internally
- one is always valid, enforced on creation time, and is used by client code

What do you guys think?
Jody

> Fair enough I am pretty sure the poor ring builder just starts walking 
> around the two "holes" (in order to have a longer path) and thus gets 
> confused.
>
> Interesting problem (finding the largest ring to act as the outer edge), 
> I was thinking you could make the choice based on length.... But you 
> could have a very complicated start in the middle of a circle and the 
> start would be longer in length.
>
> Hopefully Sanjay or Mr Roehrig has a suggestion.
>
> Cheers,
> Jody
>   
>> That's correct Jody, the resulting geometry looks pretty much like the 
>> ascii art in your email.  The top point of the "bow tie" that crosses 
>> the edge is the point that causes the ring consistency check to fail.
>>
>> Graham.
>>     


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to