[postgis-users] Make a shorter line from a given line

nicklas.aven at jordogskog.no nicklas.aven at jordogskog.no
Tue Sep 8 13:45:41 PDT 2009


look at st_scalehttp://www.postgis.org/documentation/manual-1.4.1SVN/ST_Scale.html or maybe st_transscalehttp://www.postgis.org/documentation/manual-1.4.1SVN/ST_TransScale.html
/Nicklas  
2009-09-08 Daniel Grum wrote:

Hy,
>
>I want to make a new line from a given line -->both geometry types are 
>MULTININESTRING
>
>Every step the new line should be "x meters" shorter than the original.
>
>I get the length of the line, f.e. 5000 meters (length(the_geom)) and 
>after the step the new Line should be only 4000 meters.
>
>I have a idea but it isn't ready:
>
>UPDATE table
>SET the_geom = (SELECT MakeLine(StartPoint(line.the_geom), 
>EndPoint(line_merge(line.the_geom)))
> FROM public.table line
> ORDER BY line.gid);
>
>But in if I do so I have no chance to say that the new line has to be 
>100meters shorter than the original line.
>
>Are there any ideas how I can solve this problem?
>
>Thanks,
>--Daniel
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090908/33add703/attachment.html>


More information about the postgis-users mailing list