[GRASS-user] get coords from a raster

Margherita Di Leo diregola at gmail.com
Wed Jun 2 16:07:23 EDT 2010


Markus,

Thank you. I'm pretty sure this is the way. So I run:

r.to.vect input=mainchannel output=points feature=point --o
v.to.db map=points option=coor col=x,y (like the man page suggests)

but I get a number of errors like:

Column 'x' not found
Error in db_execute_immediate()

where am I wrong now?



2010/6/2 Markus Neteler <neteler at osgeo.org>

>
> If you treat them as vectors, perhaps this could help?
>
>
> v.to.db
> ...
>             slope: slope steepness of vector line or boundary
>

I calculate slope as

S = (z2-z1)/(sqrt((x2-x1)^2+(y2-y1)^2))*100

where x1,y1 are the coords of point 1, x2,y2 are the coords of point 2, and
z1, z2 are the elevations in the raster map associate at the points 1 and 2
respectively.

Margherita


> ?
>
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100602/beb9a13e/attachment.html


More information about the grass-user mailing list