<div dir="ltr"><div dir="ltr">Hi James,<br><div><br></div><div>We already have at least three validities in PostGIS:</div><div><br></div><div> - SFCGAL validity (not exposed in any way, but there),</div><div> - OGC validity (ST_IsValid),</div><div> - "ESRI" validity (ST_IsValid(geom, 1)).<br><br>I see you want a third option, ISO validity, as it was the one provided by your library previously. </div><div><br></div><div>The simplest option I see is to shift your open software to follow the OGC, not ISO, standard: that means we all can read the spec, and the only things you have to change are three letters in documentation (ISO->OGC) and underlying library. It's not like we don't follow a standard, just not the one you chose.</div><div>Link I see the definition on is <a href="https://www.opengeospatial.org/standards/sfa">https://www.opengeospatial.org/standards/sfa</a>.<br></div><div><br></div><div>The biggest practical problem of following the ISO spec in open source software is that we don't have it. Even if I go and buy it with personal funds, I can't attach it to PostGIS docs so poor people trying to implement a writer for valid geometries can't know what do we want from them.</div><div><br>If you want this fixed universally, you have to convince OGC and ISO to sync up their definitions of validity.</div><div><br>The practical use of validity is that it's expected that any shipped algorithm will not misbehave on a geometry that's proclaimed Valid by the library. I'm not aware of any PostGIS-shipped algorithm (and any other one) that's not robust to repeated points. If you know of such algorithm (even outside PostGIS) please let us know.</div><div><br></div><div>Other thing, it would be cool to get the ISO spec for SQL/Spatial for PostGIS use. Last time we spend some time trying to find it in the open during the Code Sprint in Minneapolis, and only thing we found was couple year old draft. It had some awful things inside, like almost free form text for fixed elements in headers for binary representation of TIN, I can only hope they got fixed in release version.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 9, 2019 at 11:26 PM James A. Gill <<a href="mailto:jamesagill@gmail.com">jamesagill@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all.<div><br></div><div>I'm the maintainer for <a href="https://prestodb.io/" target="_blank">Presto</a>'s <a href="https://prestodb.github.io/docs/current/functions/geospatial.html" target="_blank">geospatial functions</a>. I've chatted with Darafei before (congrats, Darafei!), but for the rest you: hello!</div><div><br></div><div>Something I would like is to make, as much as possible, Presto's functions compatible with PostGIS.  That would allow people to run the same or similar queries in the OLTP realm as well as the warehouse/analytics realm.  Presto is also very keen on adhering to the ISO SQL standards in general, and in particular the SQL3 geospatial standard.  Sometimes, however, these are in conflict!  See:</div><div><br></div><div>1. <a href="https://github.com/locationtech/jts/issues/486" target="_blank">https://github.com/locationtech/jts/issues/486</a> and</div><div>2. <a href="https://trac.osgeo.org/postgis/ticket/3425" target="_blank">https://trac.osgeo.org/postgis/ticket/3425</a> </div><div><br></div><div>I'd like to open up a conversation about making JTS and GEOS compliant with ISO, which would make PostGIS more compliant.  In particular, I'd love to have a standardized test suite (language agnostic) for the spec, starting with ST_IsValid and ST_IsSimple.  This spec could then be implemented in JTS and GEOS (and any other library, like JSTS or Esri or...).  However, this will cause at least one backwards-incompatible change (listed above), and there may be more.  This is always sensitive, but particularly with databases.  So I'd really value your collective input as to whether this is a bad idea, or a good idea that's impractical, or a good idea that can be done with work and diligence.</div><div><br></div><div>Thoughts?</div></div>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div>Darafei Praliaskouski</div><div>Support me: <a href="http://patreon.com/komzpa" target="_blank">http://patreon.com/komzpa</a></div></div></div></div></div>