Dear all,

As I explained in my previous post, I have some troubles using v.db.addcol (see 
below). After making different tests, I realized there is a problem using 
script with v.db.addcol. I tried the following script:

#!/bin/bash
v.db.addcol map="extracting_point_ETo_RFE_test" columns="RF_2001001 double 
precision" --overwrite

And I received the following error message
GRASS 6.4.2 (Merti_WGS84_dd)> bash list_extract_RFE.sh
list_extract_RFE.sh: line 2: v.db.addcol: command not found

The command is working when I write it in the shell... but I don't want to do 
it 2000 times!!!
Im using GRASS 6.4 on windows.

do someone has an idea where the problem comes from?

thanks


Lucien
________________________________________
De : [email protected] [[email protected]] de 
la part de BLANDENIER Lucien [[email protected]]
Date d'envoi : mercredi 10 avril 2013 16:09
À : Marco Sciaini; [email protected]
Objet : [GRASS-user] RE : Fwd: GRASS 6.4 How to extract point-values    from    
multiple rasters

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 : [email protected] [[email protected]] de 
la part de Marco Sciaini [[email protected]]
Date d'envoi : jeudi 4 avril 2013 16:58
À : [email protected]
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to