[GRASS-user] get values for each point within lines

Dear Grass gurus

I have a vector map with lines, and I need to get raster values each 5 meters.
So I used v.split to spring my lines in segments of 5 meters, and
after that I used
v.to.points to generate points on each node of my line segments.

Now I am trying to overlap my points against a elevation map, but when I run
v.what.rast vect=lines_split_05m_points rast=dem col=elevation

the numbers of records on my v.db.select is the same of my lines
instead of my points.

The question is how to get the elevation values and keep the other
attributes from my source line.

best wishes
--
Miltinho - mcr@rc.unesp.br
Laboratório de Ecologia Espacial e Conservação - LEEC
Depto de Ecologia - UNESP - Rio Claro
Av. 24A, 1515- Bela Vista
13506-900 Rio Claro, SP, Brasil

http://www.rc.unesp.br/ib/ecologia/
Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab)
Cel: 19 9853-3220 / 19 9853-5430

Milton Cezar Ribeiro wrote:

Dear Grass gurus

I have a vector map with lines, and I need to get raster values each 5 meters.
So I used v.split to spring my lines in segments of 5 meters, and
after that I used
v.to.points to generate points on each node of my line segments.

Now I am trying to overlap my points against a elevation map, but when I run
v.what.rast vect=lines_split_05m_points rast=dem col=elevation

the numbers of records on my v.db.select is the same of my lines
instead of my points.

The question is how to get the elevation values and keep the other
attributes from my source line.

You need to add unique categories for the points in a new layer with
v.category option=add.
Then transfer the original line attributes from the original layer to
the new layer with v.to.db, finally run v.what.rast.

HTH,

Markus M