[postgis-users] st_touches does not work with line/point real geometries

Eugene Podshivalov yaugenka at gmail.com
Thu Mar 21 10:40:07 PDT 2019


Hi all,
I would like to report an issue on st_touches function.

The example from the documentation works fine:
=# select ST_Touches('LINESTRING(0 0, 10 0)'::geometry, 'POINT(0
0)'::geometry);
 st_touches
------------
 t

It works fine with real line-to-line geometries as well:
=# select *st_touches(a.geom,b.geom)* from
st_geomfromewkt('SRID=4326;LINESTRING(28.9019278 53.8056134,28.901969
53.804671,28.90144 53.8017222)') as a (geom),
st_geomfromewkt('SRID=4326;LINESTRING(28.896058 53.8047031,28.901969
53.804671)') as b (geom);
 st_touches
------------
 t

But it won't work in the following case:
=# select *st_touches(a.geom,st_endpoint(b.geom))* from
st_geomfromewkt('SRID=4326;LINESTRING(28.9019278 53.8056134,28.901969
53.804671,28.90144 53.8017222)') as a (geom),
st_geomfromewkt('SRID=4326;LINESTRING(28.896058 53.8047031,28.901969
53.804671)') as b (geom);
 st_touches
------------
 f

Cheers,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190321/24127d74/attachment.html>


More information about the postgis-users mailing list