[GRASS-user] RE : Fwd: GRASS 6.4 How to extract point-values from multiple rasters

BLANDENIER Lucien lucien.blandenier at unine.ch
Wed Apr 10 07:09:20 PDT 2013


Dear Marco,

Thank you for your answer and your script. I tried it but I meet some problem. 

I used the script :

for A_Raster in $( eval "g.mlist type=rast mapset=RFE_test" )
do
v.db.addcol extracting_point_ETo_RFE_test columns="$A_Raster double precision" --overwrite
v.what.rast vector="extracting_point_ETo_RFE_test" raster=$A_Raster column=$A_Raster --overwrite
echo "Spatial query of $A_Raster finished at $(date)"
done

and I receive the following error message for each raster of my mapset : 

extract_PointValue_from_RFE_raster.sh: line 13: v.db.addcol: command not found
ERREUR :Colonne <RFE_2001001> non trouvÚe
Spatial query of RFE_2001001 finished at Wed Apr 10 13:54:36 GMT 2013
extract_PointValue_from_RFE_raster.sh: line 13: v.db.addcol: command not found
ERREUR :Colonne <RFE_2001002> non trouvÚe
Spatial query of RFE_2001002 finished at Wed Apr 10 13:54:36 GMT 2013
...


I separated commands (v.db.addcol extracting_point_ETo_RFE_test columns="test double precision") and it worked
 
Do someone has an idea of the problem?

thanks


Lucien

________________________________________
De : grass-user-bounces at lists.osgeo.org [grass-user-bounces at lists.osgeo.org] de la part de Marco Sciaini [sciaini.marco at gmail.com]
Date d'envoi : jeudi 4 avril 2013 16:58
À : grass-user at lists.osgeo.org
Objet : [GRASS-user] Fwd: GRASS 6.4 How to extract point-values from    multiple rasters

Dear Lucien,

here is a little bash script, which updates the attribut-table from
your vector file and
add all extracted values from multiple rasters in a mapset.

for A_Raster in $( eval "g.mlist type=rast mapset="..." )
do
v.db.addcol map="..." columns="$A_Raster double precision" --overwrite
v.what.rast vector="..." raster=$A_Raster column=$A_Raster --overwrite
echo "Spatial query of $A_Raster finished at $(date)"
done

Kind regards
Marco
_______________________________________________
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