[geos-devel] Collapsed MinimalEdgeRing

Martin Davis mtnclimb at telus.net
Tue Apr 19 01:16:57 EDT 2011


Sandro,

For LinearRings with only 4 points, it's easy to check if they are 
collapsed - just check if they have only 2 distinct coordinates.  This 
is a fast check to do.

For rings with more coordinates, it's harder to check if they are 
collapsed.  But that might only occur rarely or never.

I think it's reasonable to strip collapsed holes from the result.

I also think it makes sense to change the AssertionFailure to a 
TopologyException - at least that way there's a chance to recover from it.

By the way, the reason your bug398bis.xml fails in JTS TestRunner is 
that the expected result doesn't match what JTS computes - JTS computes 
a result having the narrow hole, whereas the test case expected result 
doesn't have the hole.  The message you see saying "shellcount <= 1" is 
just the doc string from the test case file!

M

On 4/18/2011 11:03 AM, Sandro Santilli wrote:
> Martin, working on http://trac.osgeo.org/geos/ticket/398
> I saw that the difference between JTS and GEOS is of a single
> bit, making JTS consider a collapsed ring as CCW while it
> is CW for GEOS.
> This makes the difference between an assertion failure or not.
> In JTS you get the collapsed ring (a spike) in the result.
>
> Now: is there a way to detect if a LinearRing is collapsed ?
> Would it be appropriate to consider such collapsed ring always
> holes in that case ?
> Does it make sense to strip these off the result ?
>
> --strk;
>
>    ()   Free GIS&  Flash consultant/developer
>    /\   http://strk.keybit.net/services.html
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1209 / Virus Database: 1500/3581 - Release Date: 04/18/11
>
>


More information about the geos-devel mailing list