[postgis-devel] [mtnclimb at gmail.com: Fwd: Is errorIfGeometryCollection necessary for relate ops?]

Sandro Santilli strk at keybit.net
Fri Apr 10 09:01:42 PDT 2015


FYI, martin answer follows

----- Forwarded message from Martin Davis <mtnclimb at gmail.com> -----

Date: Fri, 10 Apr 2015 07:30:59 -0700
From: Martin Davis <mtnclimb at gmail.com>
To: Sandro Santilli <strk at keybit.net>
Subject: Fwd: [postgis-devel] Is errorIfGeometryCollection necessary for relate ops?
In-Reply-To: <CAK2ens3WfV4bgdaO8bu0St1RiQp5OPX_6+i8z-hYDjfL91y_mQ at mail.gmail.com>

It's because GeometryCollection have no inherent topology.  In other words,
geometry components can overlap.  To compute relationships with a geometry
with overlapping components the components have to be merged to form a
topologically valid arrangement.  This is more complex and more
computationally expensive than the rest of the relate algorithm.  So
basically it just didn't get done.  (It would also introduce potential
robustness issues, which I was hoping to avoid in the relate code.

A few relationships (eg intersects and disjoint) could be computed more
easily, so they could have special case code added for them more easily.



On Fri, Apr 10, 2015 at 12:50 AM, Sandro Santilli <strk at keybit.net> wrote:

> On Fri, Apr 10, 2015 at 11:55:08AM +1200, Mike Toews wrote:
>
> > so I'm wondering what is stopping PostGIS from supporting relate
> > operations with geometry collections?
>
> JTS explicitly refuses to compute the intersection matrix between
> geometries if one of them is a collection:
>
>
> http://sourceforge.net/p/jts-topo-suite/code/HEAD/tree/tags/Version_1.13/jts/java/src/com/vividsolutions/jts/geom/Geometry.java#l1032
>
> I'm not sure why, nor why GEOS doesn't follow it:
>
> https://github.com/libgeos/libgeos/blob/3.4.2/src/geom/Geometry.cpp#L443-L448
>
> Maybe Martin can shed a light here ?
>
> --strk;
>

----- End forwarded message -----



More information about the postgis-devel mailing list