[geos-devel] Issues with relate not handling GeometryCollections?

Martin Davis mbdavis at VividSolutions.com
Wed Dec 4 20:22:51 EST 2002

Here's an issue which is really more of a general JTS issue, but it may impact the integration with PostGIS, so I thought I'd throw it out here:

Currently JTS does NOT handle GeometryCollections as input to relate. This is for two reasons: 

(i) the SFS did not define the semantics for this  

(ii) the semantics which I suspect are most useful are to treat the GC as the union of its components.  Unfortunately, I don't know how to compute this robustly (either implicitly or explicitly).  (Well, I do, but it's a LOT of work).  This is annoying, since you really want relate to be robust AND exact.  Since I couldn't do this, I chose to make GC's an invalid argument to relate.

The question is, is this a big deal for PostGIS?  It *is* a pain not having operators complete over the entire space of representable objects.'

There is a cheesy way of defining relate over GCs, to be the "sum" of relate over the individual components.  This works for intersection (an important case) but produces counterintuitive results for some of the other predicates.

Thoughts, anyone?

Martin Davis, Senior Technical Specialist
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

More information about the geos-devel mailing list