[postgis-users] st_touches does not work with line/point real geometries
Eugene Podshivalov
yaugenka at gmail.com
Thu Mar 21 11:28:32 PDT 2019
Martin, thanks for looking into this.
If non-end points of a LINE are considered interior then the second case
should evaluate to false and if a POINT is an interior by itself then any
area-to-point comparisons should evaluate to false also, shoudn't they?
чт, 21 мар. 2019 г. в 21:17, Sandro Santilli <strk at kbt.io>:
> On Thu, Mar 21, 2019 at 08:40:07PM +0300, Eugene Podshivalov wrote:
>
> > 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
>
> The endpoint of b.geom is POINT(28.901969 53.804671)
> The a.geom boundary is POINT(28.9019278 53.8056134)
> and POINT(28.90144 53.8017222)
>
> According to https://postgis.net/docs/ST_Touches.html ST_Touches...
>
> Returns TRUE if the only points in common between g1 and g2
> lie in the union of the boundaries of g1 and g2
>
> The only common point in a point/line case can be the point,
> but you can clearly see that the boundary of A does not
> contain that B endpoint.
>
>
> BTW, it looks like one of the pictures in the example is wrong
> (the central line/line case). May be worth filing a ticket to
> fix that (even better if you send a patch for it :)
>
> --strk;
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190321/4e339272/attachment.html>
More information about the postgis-users
mailing list