[GRASS-user] river profile, how to

Moritz Lennert mlennert at club.worldonline.be
Mon Apr 18 05:49:02 EDT 2011


On 18/04/11 06:40, kapo coulibaly wrote:
> If you have the shapefile for the river (or vector line in GRASS) you
> can convert it to points by using v.to.points and making the points
> really close to one another (make dmax small). then use /*v.what.rast*/
> to get the elevation at the points locations.


Instead of v.what.rast, you can also use v.to.db+r.profile as follows 
(in GNU/Linux command line):

v.to.points myriver dmax=1 out=myriverpoints

v.to.db -p myriverpoints option=coor layer=2 | awk -F'|' '{print 
$2","$3}' | tail -n +2 | r.profile elevation out=myprofile.txt

adjust dmax to your needs.

Seems like a nice candidate for a simple Python AddOn script to me... ;-)

Moritz


> Hope it helps
>
> On Sun, Apr 17, 2011 at 8:18 AM, ambijat <ambijat at hotmail.com
> <mailto:ambijat at hotmail.com>> wrote:
>
>     Hi All,
>     I wish to develop a river profile from start point to its last. The
>     GRASS 6.4.1 has a tool profile analysis, which is a bit crude. If I
>     take two points, eg. river head and its last point then it gives a
>     profile, but it is a direct and not along the course of the river.
>     And, if I create a series of point all along the course, then
>     certainly not the best values are there as selection process is very
>     tedious. So, is there a method which would automatically take the
>     raster values of the river course seen as a line and give a simple
>     fine river profile.
>
>     Thanks
>
>     Ambrish Dhaka
>     _______________________________________________
>     grass-user mailing list
>     grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user




More information about the grass-user mailing list