Hi,
With your test data, the following query returns the 3 points :
with
p as (
select ST_GeomFromText('POINT(43 23)', 26910) point
union
select ST_GeomFromText('POINT(50 20)', 26910)
union
select ST_GeomFromText('POINT(30 20)', 26910)
),
r as (
select ST_AddPoint(ST_GeomFromText('LINESTRING(50 20, 30 20)',
26910),ST_GeomFromText('POINT(43 23)'), 1) line
)
select p.* from p, r
where st_intersects(point, line)
Regards,
Hugues.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Tuesday, August 13, 2013 10:15 PM
To: [email protected]
Subject: Re: [postgis-users]Rép: Select a point that belongs to a linestring
With ST_intersects it works, but it works only when the the point in the query
(Punto1) has coordinates (50 20) or (30 20). (50 20) and (30 20) are the
extremes of the linestring Strada1, why it works only with the extremes and not
with the points in the middle?
Is there a way to get it works with the points in the middle?
--
View this message in context:
http://postgis.17.x6.nabble.com/Select-a-point-that-belongs-to-a-linestring-tp5003990p5003996.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users