[geos-devel] BUG: relate(g1,g2) crashes with GEOMETRYCOLLECTION?
mbdavis at VividSolutions.com
Tue Apr 8 17:01:07 EDT 2003
In GeometryCollections polygons can overlap, whereas in valid MultiPolygons they can't. When polygons overlap they may or may not do so at defined points. If the intersection point is not defined explicitly, it must be computed. You can't in general compute an intersection point exactly. This means you can't precisely compute the local topology of the edges incident on the point. This leads to robustness failures.
This is why relate for general GeometryCollections is equivalent to computing the union of the geometries.
Martin Davis, Senior Technical Architect
Vivid Solutions Inc.
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 Fax: (250) 385 6046
EMail: mbdavis at vividsolutions.com Web: www.vividsolutions.com
> -----Original Message-----
> From: Paul Ramsey [mailto:pramsey at refractions.net]
> Sent: Tuesday, April 08, 2003 1:49 PM
> To: GEOS Development List
> Subject: Re: [geos-devel] BUG: relate(g1,g2) crashes with
> Enlighten me: how would relate on a geometrycollection differ from
> relate on a multipolygon? Don't most of the tests collapse to an or()
> of the results of each test performed individually on the collection
> overlaps (gc(A,B),gc(C,D)) =
> On Tuesday, April 8, 2003, at 01:42 PM, David Blasby wrote:
> > Martin Davis wrote:
> >> Yep. Neither GEOS nor JTS support GeometryCollections as
> >> to relate. This is partly because the semantics aren't very well
> >> defined, and partly because the obvious semantics [ X.relate(GC) =
> >> X.relate(union(GC.components) ] would make the operation
> >> That said, we or you could always implement the above semantics
> >> fairly easily...
> > Its unfortunate that the spec doesnt tell you what to do in
> the case
> > of GEOMETRYCOLLECTIONs.
> > I've also noticed that overlaps(g,g) is FALSE!
> > dave
> > _______________________________________________
> > geos-devel mailing list
> > geos-devel at geos.refractions.net
> > http://geos.refractions.net/mailman/listinfo/geos-devel
> Paul Ramsey
> Refractions Research
> Email: pramsey at refractions.net
> Phone: (250) 885-0632
> geos-devel mailing list
> geos-devel at geos.refractions.net
More information about the geos-devel