[geos-devel] C API Question

strk at refractions.net strk at refractions.net
Fri Jan 12 06:56:10 EST 2007


On Thu, Jan 11, 2007 at 01:52:05PM -0800, Anne-Leslie Dean wrote:

> I've built two (valid, per GEOSisValid) geometries
> using GEOSGeom_createLineString.  Each one contains
> two coordinates (a single line segment).  Together the
> two geometries form a plus (+), i.e. two line
> segments, crossing each other in the center.
> 
> Upon calling GEOSIntersects, GEOSCrosses and
> GEOSOverlaps, they all return false.  This is not what
> I expected.
>
> Am I making some incorrect assumptions about what to
> expect?

This is what to expect:

=# select intersects(a, b), crosses(a, b), overlaps(a,b) from
	( select 'LINESTRING(-10 0, 10 0)'::geometry as a,
	  'LINESTRING(0 10, 0 -10)'::geometry as b ) as foo;
 intersects | crosses | overlaps
------------+---------+----------
 t          | t       | f

Results obtained with GEOS="3.0.0rc4-CAPI-1.3.2" (PostGIS linked against C-API).
What GEOS version are you using ?

--strk;



More information about the geos-devel mailing list