[postgis-devel] Is errorIfGeometryCollection necessary for relate ops?

Martin Davis mtnclimb at gmail.com
Mon Apr 13 09:42:40 PDT 2015


On Mon, Apr 13, 2015 at 12:59 AM, Sandro Santilli <strk at keybit.net> wrote:

> On Fri, Apr 10, 2015 at 10:40:32AM -0700, Martin Davis wrote:
> > re what is happening in Shapely with relate on GeometryCollections:
> >
> > In fact, homogeneous GeometryCollections of Points and LineStrings can be
> > trivially converted to MultiPoints and MultiLineStrings.  Is is possible
> > that Shapely is doing this automatically?
> >
> > Handling homogeneous GCs would be a nice enhancement for JTS & GEOS....
>
> There's actually a ST_CollectionHomogenize function in PostGIS that
> can be used to do just that.
>
> I'm starting to think about adding a "flatten" method to JTS that would do
all the heavy lifting to transform an arbitrary GeometryCollection into
something suitable for using with relate.  In addition to converting
homogenous collections into the appropriate Multi-type, it would union all
polygons to make them into a valid MultiPolygon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150413/b039016b/attachment.html>


More information about the postgis-devel mailing list