Can anyone please tell me what I'm doing wrong, and how do I avoid the problem? I'll attempt to clarify what I'm doing as things go along.
The geom column is a multipolygon column, all values are SRID=4326.
archive=> select st_intersects( GeomFromewkt('SRID=4326;LINESTRING(-16.899216666666668 12.610816666666667,-16.899216666666668 12.610816666666667)')
, z.geom) as intersects
from zone z
where z.zone_id=2;
intersects
------------
f
(1 row)
archive=> select st_intersects( GeomFromewkt('SRID=4326;POINT(-16.899216666666668 12.610816666666667)')
, z.geom) as intersects
from zone z
where z.zone_id=2;
intersects
------------
t
(1 row)
This is the text representation of the geom:
MULTIPOLYGON(((-18.7273147400488 12.8862644964914,-18.7334078119781 12.3609663554343,-16.5597662148828 12.3796303212717,-16.6302631480867 13.1209501528692,-18.7273147400488 12.8862644964914)))
How can the linestring not intersect with the geometry, yet a single point does? Is this some sort of rounding error, or a problem because the linestring has a length of zero? If the length is the problem, how do I avoid this problem?
st_astextfunction - I'm not sure why it didn't say SRID=4326; at the front, but it is of the same type. – Petriborg Apr 26 '12 at 21:00ST_AsEWKT(extended well-known text) – Mike Toews Apr 26 '12 at 22:21