<div dir="ltr">Brian,<div><br></div><div>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.</div><div><br></div><div>Good to hear from you...  Martin<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 13, 2015 at 1:43 PM, Brian M Hamlin <span dir="ltr"><<a href="mailto:maplabs@light42.com" target="_blank">maplabs@light42.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>Hi Martin -<br><br>  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.. <br><br>  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 ? <br><br>  very best
regards from Berkeley, California<br>    -Brian<div><div class="h5"><br><br><br>On Mon, 13 Apr 2015
09:42:40 -0700, Martin Davis <<a href="mailto:mtnclimb@gmail.com" target="_blank">mtnclimb@gmail.com</a>> wrote:<br></div></div><blockquote dir="ltr" style="border-left:2px solid #000000;padding-right:0px;padding-left:5px;margin-left:5px;margin-right:0px"><div><div class="h5">
<div>
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon,
Apr 13, 2015 at 12:59 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span>
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Fri, Apr 10,
2015 at 10:40:32AM -0700, Martin Davis wrote:<br> > re what is happening in
Shapely with relate on GeometryCollections:<br> ><br> > In fact,
homogeneous GeometryCollections of Points and LineStrings can be<br> >
trivially converted to MultiPoints and MultiLineStrings.  Is is possible<br>
> that Shapely is doing this automatically?<br> ><br> > Handling
homogeneous GCs would be a nice enhancement for JTS &
GEOS....<br><br></span>There's actually a ST_CollectionHomogenize function in
PostGIS that<br> can be used to do just that.<br><br>
</blockquote>
<div>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. </div>
</div>
</div>
</div>
</div>
</div></div></blockquote></div></blockquote></div><br></div></div></div>