Perhaps it is time to call for another IRC meeting of the "Geometry Fan 
Club"?

If I understand you have found one talented bug - our construction of 
Rings is not quite up to snuff.
+------------+--------+
|           / \       |
|          +   +      |
|           \ /       |
|            +        |
|           / \       |
|          /   \      |
|         +-----+     |
+---------------------+
Kind of like the classic "bow tie" test case, but this time with holes 
touching the outer edge.

Nasty.

Anyone have any ideas? Or are we off to look at the JTS codebase ....

Cheers,
Jody

Graham Davis wrote:
> I've been working on getting the JTS XML tests to work with the geometry 
> module so we can have better confidence that it is working correctly.  
> There have been many errors that I'm working through, but I've come 
> across one that seems to be a fairly big problem with how the module is 
> constructing polygons with the polygonbuilder.
>
> Right now, if you run the test GeometryConformanceTest.java in 
> org.geotools.geometry.xml it will run all the xml file tests in 
> src/test/resources.  The property files in there have some special cases 
> to get some tests to run, or to skip problematic ones for now while I 
> work through the problems.  If you look at TestFunctionAA.properties and 
> stop it from skipping the first 6 tests (comment them out) and run the 
> test, you can see the errors I am talking about.
>
> All the errors are similar, but if you look at the first one in 
> particular, you will see it is trying to UNION 2 polygons together.  The 
> resulting geometry is being built up as a MaximalRingEdge, which 
> implements RingImpl.  The resulting geometry is a polygon with 2 holes 
> in it, which should be constructed as 3 rings I believe, but instead it 
> is being built as 1 large ring which isn't a simple geometry.  Since 
> RingImpl has built in consistency checks, it crashes saying there is a 
> point that intersects but isn't an end or start point (basically it's 
> saying this ring is not simple and is incorrect).
>
> The other 5 tests that I am skipping are similar problems.  They are 
> doing UNIONs or SYMDIFFERENCEs on polygons, and the resulting geometry 
> is being built up as one big ring when it should be multiple rings.  
> I've been looking at this problem and trying to figure out the best way 
> to resolve this, but I'm not sure if the implementation of this area 
> needs a whole rework or perhaps there is a smaller tweak that can be 
> made to fix this.
>
> Perhaps the original coders of this module have some insight and might 
> be able to help?  Now that there are some strong tests to run against 
> this module, it is good that these sorts of problems are popping up.  I 
> just hope that the original coders, or someone, can help with some of 
> these larger design/implementation problems.  Is anyone brave enough to 
> offer some insight?? :)  Thanks!
>
> (I can create some images to better display the problem in the first 
> exampe with the 2 polygons and how they union if that will help anyone, 
> just let me know).
>
>   


-------------------------------------------------------------------------
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