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

Paul Ramsey pramsey at cleverelephant.ca
Fri Apr 10 09:01:49 PDT 2015


Right, some of the boolean predicates could be calculated just be doing pairwise tests of all the components of a collection (basically what happens now in some code). And if we were willing to define some rules (two collections cannot touch unless on or more components touch and the rest are disjoint) that map the predicate onto the collection space. Still leaves open the question of what’s happening in GEOS/Shapely?

P 


--  
http://postgis.net  
http://cleverelephant.ca


On April 10, 2015 at 9:01:51 AM, Sandro Santilli (strk at keybit.net) wrote:
> FYI, martin answer follows
>  
> ----- Forwarded message from Martin Davis -----
>  
> Date: Fri, 10 Apr 2015 07:30:59 -0700
> From: Martin Davis  
> To: Sandro Santilli  
> Subject: Fwd: [postgis-devel] Is errorIfGeometryCollection necessary for relate  
> ops?
> In-Reply-To:  
>  
> 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 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 -----
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>  




More information about the postgis-devel mailing list