[GRASS-user] v.what.rast for lines
Achim Kisseler
ak7 at jupiter.uni-freiburg.de
Wed Dec 9 04:59:49 EST 2009
Hi Jitu,
a way would be to convert the lines to raster (v.to.rast) and calculate
the statistics (r.stats).
As every line has a unique id, the "raster-lines" will have.
Hope it helps,
Achim
Jitendra Kumar schrieb:
> Hi,
> "v.what.rast" allows to extract the values from the raster at the vector
> points. How to do a similar operation for a vector map consisting of
> lines instead of points. I have road network as vector and I wish to
> extract the average value over each line segment from a raster.
>
> I thought of several options but had one or other conceptual problem. I
> can convert the vector line to points using "v.to.points" and extract
> the values at each point using "v.what.rast". But I am not sure how to
> identify the points lying on a particular line in order calculate the
> average over the line.
> I do want to preserve the lines in my road network vector data since it
> gets used in some other network analysis as well.
>
> If I have several attributes associated with my raster, how to specify
> the attribute to be extracted to "v.what.rast" ?
>
> I am quite confused as to how to do this. Any pointers would be of great
> help?
>
> Thanks,
> Jitu
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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