[geos-devel] test for interior(A) intersects interior(B)

Martin Davis mbdavis at VividSolutions.com
Tue Apr 8 17:27:47 EDT 2003


A.relate(B, "T********") 

Good thing we have the relate operation!  I had to use this in JCS, and I suspect it will be used a fair bit by others too.

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 2:02 PM
> To: GEOS Development List
> Subject: Re: [geos-devel] BUG: relate(g1,g2) crashes with
> GEOMETRYCOLLECTION?
> 
> 
> Nice. Overlaps is not what I thought it was. What is the test for 
> interior(A) intersects interior(B)?
> P.
> 
> On Tuesday, April 8, 2003, at 01:57 PM, Martin Davis wrote:
> 
> > Nope - if you look at the spec it clearly spells out that A and B 
> > overlap *only* if A intersects exterior(B) or vice-versa.  They 
> > clearly intended the answer to be FALSE if the geometries were the 
> > same.
> >
> > 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: Martin Davis
> >> Sent: Tuesday, April 08, 2003 1:52 PM
> >> To: GEOS Development List
> >> Subject: RE: [geos-devel] BUG: relate(g1,g2) crashes with
> >> GEOMETRYCOLLECTION?
> >>
> >>
> >> Yep, overlaps(G,G) = false according to the OGC spec.  This
> >> may be a bit counter-intuitive.  Not sure what the rationale
> >> behind this decision was.
> >>
> >> I usually use A.relate(B, "T********") to determine if things
> >> overlap "properly".
> >>
> >> 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: David Blasby [mailto:dblasby at refractions.net]
> >>> Sent: Tuesday, April 08, 2003 1:43 PM
> >>> To: GEOS Development List
> >>> Subject: Re: [geos-devel] BUG: relate(g1,g2) crashes with
> >>> GEOMETRYCOLLECTION?
> >>>
> >>>
> >>> Martin Davis wrote:
> >>>
> >>>> Yep.  Neither GEOS nor JTS support GeometryCollections as
> >>> arguments 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 non-robust.
> >>>>
> >>>> 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
> >>>
> >>
> >> _______________________________________________
> >> geos-devel mailing list
> >> geos-devel at geos.refractions.net
> >> http://geos.refractions.net/mailman/listinfo/geos-devel
> >>
> >
> > _______________________________________________
> > 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
> http://geos.refractions.net/mailman/listinfo/geos-devel
> 



More information about the geos-devel mailing list