[postgis-devel] Is errorIfGeometryCollection necessary forrelate ops?

Martin Davis mtnclimb at gmail.com
Mon Apr 13 15:18:17 PDT 2015


Brian,

To compute the full spatial relationship, it's necessary to know if there
is MultiPolygon topology present.  For example, take a geometry with two
polygons touching at a vertex (e.g. a "figure eight").  A line could lie in
the interior of both polygons crossing at the common vertex.  In this case
the line is contained by the MultiPolygon, but not by either individual
component.  So the full topology needs to be known to properly compute the
relationship.

Good to hear from you...  Martin

On Mon, Apr 13, 2015 at 1:43 PM, Brian M Hamlin <maplabs at light42.com> wrote:

> Hi Martin -
>
>   Is it always better to have a single MultiPoly?  my naive thoughts are
> a) single polys are computationally faster, and b) the raison'detre of
> Multipolys is the "hole" , which could never be in a product of otherwise
> independent single polys..
>
>   I admit this email is off-the-cuff so there could be something I am not
> thinking about at all.. there it is though.. option to combine ?  never
> combine ?
>
>   very best regards from Berkeley, California
>     -Brian
>
>
>
> On Mon, 13 Apr 2015 09:42:40 -0700, Martin Davis <mtnclimb at gmail.com>
> wrote:
>
>
>
> 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/fa10bcc7/attachment.html>


More information about the postgis-devel mailing list