Hi Nuri, You can use linear referencing functions to reach your goal:
select st_line_substring(
line,
st_line_locate_point(line, point1),
st_line_locate_point(line, point2))
from (
select 'LINESTRING (0 0, 5 5, 7 9)'::geometry as line,
'POINT(1.46 3.15)'::geometry as point1,
'POINT(7.1 6)'::geometry as point2
) as foo;
Nicolas
On 2 June 2011 16:09, Nuri BURHAN <[email protected]> wrote:
>
> Hello.
> I like postgis and spent lots time with postgis.
> I haven't find a solition for my problem which is ;how long does it take the
> busstop to the bus' GPS point?
> result_linesting_geom=function (linestring_geom,point1_geom,point2_geom)
> linestring_geom => bus path
> point 1 => bus stop coordinat
> point 2 => bus's GPS point coordinat
> result_linesting_geom = > it is on linestring_geom but between shortest
> ponint 1 on linestring_geom and shortest point2 on linestring_geom
> Any way thank you for your help.
>
> --
> M. Nuri BURHAN
> 0364-2250810-1330
> Çorum Municipality GIS department /TURKEY
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
<<attachment: Screen shot 2011-06-06 at 10.54.47 AM.png>>
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
