[postgis-users] I could not find this function like

Nicolas Ribot nicolas.ribot at gmail.com
Mon Jun 6 01:56:14 PDT 2011


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 <nuriburhan at gmail.com> 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
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2011-06-06 at 10.54.47 AM.png
Type: image/png
Size: 7211 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110606/20fe199e/attachment.png>


More information about the postgis-users mailing list