[postgis-users] Strange behavior

Richard Cernava cernava at gmail.com
Fri May 17 16:40:21 PDT 2013


I'm trying to query if a point is present inside a MultiLineString. When I
run the following query I get very strange results in my opinion. If
someone could elaborate as to what's going on it would be very much
appreciated!

>From this query I get a false and a true on the identical data. First I
check to see if the_geom intersects with my point and receive false. Second
I take the_geom and convert it to text and then compare it with my point
using ST_GeomFromText and get true. How is this possible? I've outputted
the result from the statement below.

SELECT fullname, ST_X(ST_StartPoint(ST_LineMerge(the_geom))),
ST_Y(ST_StartPoint(ST_LineMerge(the_geom))),
ST_AsText(the_geom) AS text,
ST_Intersects(the_geom, ST_GeomFromText('POINT(-122.837109 45.537746)',
4269)) AS fromdb,
ST_Intersects(ST_GeomFromText(ST_AsText(the_geom), 4269),
ST_GeomFromText('POINT(-122.837109 45.537746)', 4269)) AS fromtxt
from tiger_data.or_edges where   fullname like 'NW Norwich St' limit 1


"NW Norwich St";-122.837109;45.537746;"MULTILINESTRING((-122.837109
45.537746,-122.837253 45.537684,-122.837718 45.537368,-122.837829
45.537288,-122.838081 45.537108,-122.838169 45.537049))";f;t


-- 
-Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130517/d2ef8785/attachment.html>


More information about the postgis-users mailing list