[geos-devel] Polygon simplicity and validity

Martin Davis mtnclimb at telus.net
Sat Sep 8 22:39:25 PDT 2012


This does raise the issue of what the semantics of isSimple for polygons 
should be. Should the original example of a hole overlapping the 
containing shell be reported as NOT simple? This would seem to be 
consistent with the OGC SFS definition of simplicity as "having no 
anomalous geometric points". But then isSimple pretty much becomes a 
synonym for isValid, in the case of polygons.

Or should it follow your idea of being the conjunction of the simplicity 
of the component rings?

It's not clear to me what the most useful semantics would be. It feels 
like the latter definition would be less redundant.

On 9/8/2012 10:11 PM, Martin Davis wrote:
> Sean, FWIW I agree with you that it makes more sense to have isSimple 
> for polygons and rings report whether the underlying linework is 
> simple. The current JTS hard-coded implementation was done for sake of 
> expediency during the initial development of the library. It's a bit 
> of a wasted opportunity to not allow isSimple to report 
> self-intersecting linework (even if it still formally meets the SFS 
> specification).  I'll look into enhancing this in JTS.
>
> On 9/7/2012 12:06 PM, Martin Davis wrote:
>> The OGC SFS specifies that valid polygons are simple by definition, 
>> presumably because valid polygons cannot contain any 
>> self-intersections.  Because of this, JTS/GEOS simply returns true 
>> for Polygon.isSimple(), without attempting any inspection of the 
>> actual linework.  isValid can be used to detect self-intersections.
>>
>> On 8/29/2012 11:19 AM, Sean Gillies wrote:
>>> Is simplicity meaningful for polygons or only for lines? Here's a
>>> single ring bowtie that GEOS 3.3.0 reports as invalid but simple:
>>>
>>> POLYGON ((39.1451330299999967 23.7510081600000014, 97.0537220899999937
>>> 40.5455008799999987, 105.2652701399999984 48.1330221300000005,
>>> 100.9175268500000016 58.4333681499999997, 71.5608144800000048
>>> 83.5511480100000057, 60.7118916800000008 86.2531609899999978,
>>> 62.0046980799999972 75.1478175999999962, 83.1631000699999987
>>> 42.8207167300000009, 92.8230586199999976 37.1917558199999974,
>>> 95.9940112900000031 26.4705124599999984, 106.2205448200000006
>>> 15.5197519199999991, 39.1451330299999967 23.7510081600000014))
>>>
>>> https://github.com/Toblerity/Shapely/issues/16#issuecomment-8116396
>>>
>>
>> _______________________________________________
>> 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: 2012.0.2197 / Virus Database: 2437/5254 - Release Date: 
>> 09/07/12
>>
>>
>
> _______________________________________________
> 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: 2012.0.2197 / Virus Database: 2437/5256 - Release Date: 09/08/12
>
>



More information about the geos-devel mailing list