[GRASS-user] [GRASSLIST:1138] Re: Qn. on extracting from multiple
rasters, data corresponding to vector polygons
Jachym Cepicky
jachym.cepicky at centrum.cz
Tue Jun 27 08:26:04 EDT 2006
eehm:
#----
# convert centorids to points
v.type in=polygons out=polygons2 type=centroid,point
v.to.rast in=polygons2 out=wathershed use=cat
# make 100 rasters
for raster in $( g.mlist rast ); do
echo "Working on: $raster"
r.average base=wathershed cover=$raster out=$raster.avg
echo "ALTER TABLE polygons2 ADD COLUMN $raster double"|db.execute
v.what.vect vect=polygons2 rast=$raster.avg coulmn=$raster
done
# ----^^^^----
# convert points to centroids
v.type in=polygons2 out=polygons3 type=point,centroid
d.vect polygons3
d.what.vect polygons3
#----
--
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
GDF-Hannover
Mengendamm 16d
30177 Hannover
Germany
e-mail: cepicky at gdf-hannover.de
URL: http://gdf-hannover.de
Tel.: +49 511-39088507
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20060627/59997881/attachment.bin
More information about the grass-user
mailing list