[GRASS-user] How to retrieve raster pixel value over a vector point layer

Helena Herrera helenaherrera1980 at gmail.com
Thu Mar 29 08:35:59 EDT 2012


Hi

I was thinking in something much simpler like just printing Pixel values
next to Point ID.

I will give a try on your suggestions.
Thanks

2012/3/28 Micha Silver <micha at arava.co.il>

>  On 03/28/2012 08:11 PM, Helena Herrera wrote:
>
> Greetings
>
> I have a raster layer and a vector point layer and I need to associate
> pixel values with points:
>
>
> When you say "associate" If you mean to add the raster values to a column
> in the point vector attribute table, then v.what.rast is what you're
> looking for.
>
>
>  1- pixel values that are over points;
> 2- 3x3 pixel neighbor pixel values over a point.
>
>
> Create a new raster with r.neighbors then run v.what.rast again to upload
> these 3x3 neighborhood values to another column in the point vector.
>
>  Is this possible do to in a more automatic way than query each by each
> point?
>
>
> Here are the steps:
> v.db.addcol vector_map col="rast_val double, rast_val_3x3 double"
> v.what.rast vector_map rast=raster_map col=rast_val
> r.neighbors raster_map out=raster_map_3x3  # assumes averaging a 3x3
> window
> v.what.rast vector_map rast=raster_map_3x3 col=rast_val_3x3
>
>  Thanks
> Regards
> helena
>
> This mail was received via Mail-SeCure System.
>
>
> _______________________________________________
> grass-user mailing listgrass-user at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/grass-user
>
> This mail was received via Mail-SeCure System.
>
>
>
>
>
> --
> Micha Silver
> GIS Consultant, Arava Development Co.http://www.surfaces.co.il
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20120329/ac8e2eb0/attachment.html


More information about the grass-user mailing list