Hello,  I can't seem to change the search path in GRASS 6.4.3, Windows 7, 
installed with the QGIS 2.0 bundle.  To walk through my steps so far...
I have a bash script example below called myscript.sh.  It comes from 
http://grasswiki.osgeo.org/wiki/MODIS#MODIS_Aqua

##################
#!/bin/sh
for file in A*SST_4 ; do
    echo "map: $file"
    gdal_translate -a_srs "+init=epsg:4326" -a_nodata 65535 \
    -a_ullr -180 90 180 -90 -co "COMPRESS=PACKBITS" \
    HDF4_SDS:UNKNOWN:"$file":0 ${file}_prep.tif
    r.in.gdal in=${file}_prep.tif out=$file
done
##################

The script and data files (with the pattern A*SST_4) are stored in  
<D:/....../raw_data>. To run the script in the GRASS command console I use

sh D:/...../raw_data/mystript.sh

This does not work, and I see that its because the data files can't be found.  
So using DIR in the GRASS command console reveals that the search path is 
C:\PROGRA~1\QGISDU~1\bin

In the GRASS command console I then type cd D:/....../raw_data, with no errors. 
 However, typing DIR or LS in the command line shows that I'm still in 
C:\...\bin

I can make this work by simply copying the data files to the C:\...\bin 
directory, but its not ideal as the processed files (the ${file}_prep.tif bit) 
end up in the C:\ directory.  I can also modify the <for> loop by adding the 
full file path, but as you can see, that breaks the script at the r.in.gdal 
line because r.in.gdal then tries to create a db in my Mapset that has a huge 
directory path in the name ($file), which is not allowed.

I think there are other issues, for example when I run the script using the C:/ 
as above, it adds the db to my Mapset (I can see it with r.info), but I then 
can't seem to add them as layers.

Very long winded, but the I think the basic problem is that I can't change the 
path.  Launching GRASS as administrator does not help.   Ultimately, I'd like 
to process the raw modis files, add them to my mapset, and view the layer.  
Working through the rest of the example in  
http://grasswiki.osgeo.org/wiki/MODIS#MODIS_Aqua also falls over when I get to 
the Set Colours section with <palette_sst.gcolors> also because I think the 
path is not correct.

Thanks for your help!

Paul

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to