Thanks! All,
I developed a rather crude but a solid method. What I did was to
actually convert the river raster into vector with r.to.vect.points.
This automatically delivered me the altitude values for each point. Rest
is then reverse engineering.:-)
Then I opened the dbf file in openoffice calc and added a distance
column. I filled that column with the formula to add cumulative sum of
resolution at each row (== to raster resolution). This gave me distance
and altitude of each point.
Finally I plotted it nicely in chart of openoffice.
I think it was right approach. Any modifications?
regards,
Ambrish
On 4/18/2011 3:19 PM, Moritz Lennert wrote:
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 <[email protected]
<mailto:[email protected]>> 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
[email protected] <mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user