[postgis-devel] ST_IsValid/ST_IsSimple ISO compatibility

Martin Davis mtnclimb at gmail.com
Sat Nov 9 17:05:00 PST 2019


It's hard to comment on this without a full understanding of what's
involved.  Here's what I think is needed to get this understanding:

1. Obtain a copy of the relevant sections of the ISO spec, to provide an
official basis for what follows.
2. Do a gap analysis of the differences between ISO valid and
JTS/GEOS/PostGIS valid.  Repeated points has been mentioned, but presumably
there are other more significant differences?  I suspect ring orientation
is one.  Is the no-self-touching rings condition still in place?
3. Specify what is meant by "being compliant".  Obviously the IsValid
semantics would change.  But a bigger impact  would seem to be changing
constructive functions to emit valid ISO geometry.  How many of these are
there and what is the size of this work?
4. Write all this up in an RFC, so the decision processed is documented for
discussion

Given that geometry operations are in general fairly tolerant of things
like ring orientation, it might be possible to make this switch with
minimal disruption.  Of course, it would probably be best to make it
optional at first, using whatever mechanism(s) seem appropriate.

On Sat, Nov 9, 2019 at 12:26 PM James A. Gill <jamesagill at gmail.com> wrote:

> Hi all.
>
> I'm the maintainer for Presto <https://prestodb.io/>'s geospatial
> functions
> <https://prestodb.github.io/docs/current/functions/geospatial.html>. I've
> chatted with Darafei before (congrats, Darafei!), but for the rest you:
> hello!
>
> 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:
>
> 1. https://github.com/locationtech/jts/issues/486 and
> 2. https://trac.osgeo.org/postgis/ticket/3425
>
> 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.
>
> Thoughts?
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20191109/f4c1f6b2/attachment.html>


More information about the postgis-devel mailing list