[postgis-users] Sampling a line shapefile based on own criteria

Peter Korduan peter.korduan at uni-rostock.de
Mon Jan 9 13:59:01 PST 2012


Hi Gery,

devide the length of th line by your amounts of points-1 and use the 
function ST_Line_Interpolate_Point() to calculate the points on the 
line. See 
http://postgis.org/documentation/manual-1.5/ST_Line_Interpolate_Point.html 
for the function.

Best Regards Peter

Universität Rostock
Agrar- und Umweltwissenschaftliche Fakultät
Professur für Geodäsie und Geoinformatik
Justus-von-Liebig-Weg 6
18059 Rostock
Tel: 0381 498 3212
Fax: 0381 498 3202


Am 09.01.2012 18:48, schrieb Gery .:
>
>
> Hello,
>
> I was looking in internet a way to sample my line shapefile based on 
> my onw decision, for instance, my line is 1-km long and I want three 
> scenarios: (a) 1 point every 50 meters (20 points including starting 
> and ending points), (b) 1 point every 20 meters (50 points including 
> starting and ending points), (c) 1 point every 10 meters (100 points 
> including starting and ending points).
>
> I appreciate your ideas about it.
>
> Thanks,
>
> Gery
>
>
> _______________________________________________
> 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/20120109/c3e23221/attachment.html>


More information about the postgis-users mailing list