Well, you are running Grass in a different way then... not sure if I can help. Maybe try the location parameter in r.in.gdal. It's suposed to create an appropriate location before importing the data...
Daniel On Thu, Aug 5, 2010 at 12:19 PM, Giacomo Piva <[email protected]> wrote: > On 08/05/2010 04:44 PM, Daniel Victoria wrote: >> >> You need to create a Location in Grass were the coordinate system is >> the Gauss Boaga. Your current location has no reference system, it's a >> XY location, as g.region -p output shows. >> >> When you start Grass ask for it to create a new location based on a >> georeferenced file. Then point to your GeoTiff and the location should >> be set correctly. After that, r.in.gdal should work. >> > > This is the point. > I'm using GRASS without UI, only running command by a bash script. > Actually I'm using a location (I don't remember how I made it) by setting up > the grassrc file with the information about it: > > [...] > echo "LOCATION_NAME: start" > .grassrc6 > echo "MAPSET: PERMANENT" >> .grassrc6 > echo "DIGITIZER: none" >> .grassrc6 > echo "GISDBASE: $GISDBASE" >> .grassrc6 > > export GISRC=.grassrc6 > [...] > > then I read the input data ant then I change the location "jumping" into the > region just created with the r.in.gdal command. > How can I set the region by scratch or convert the location to a > georeferenced location? > > I also tied to use the g.proj command in order to get the georefernce of the > input image and try to set the region but the result is the same: > > g.proj georef=<input file> location=<location> > > Trying to open with OGR... > Trying to open with GDAL... > ...succeeded. > > g.proj -d > > XY location (unprojected) > > g.region -p > > projection: 0 (x,y) > zone: 0 > north: 2030 > south: 0 > west: 0 > east: 1354 > nsres: 1 > ewres: 1 > rows: 2030 > cols: 1354 > cells: 2748620 > > > >> Daniel >> >> On Thu, Aug 5, 2010 at 11:14 AM, Giacomo Piva<[email protected]> wrote: >> >>> >>> Hi all, >>> I'm fighting with r.in.gdal function and a GeoTiff gereferenced in the >>> Gauss >>> Boaga system. >>> >>> I have this GeoTiff that is originlly georeferenced in the WGS84 system >>> and >>> I need to convert it into Gauss Boaga system using the "gdalwarp" GDAL >>> command tool. >>> Moreover I need to convert this raster in a shapefile using the r.to.vect >>> GRASS command. >>> >>> This is the (correct) gdalinfo output of mu Gauss Boaga GeoTiff: >>> Coordinate System is: >>> PROJCS["Monte Mario / Italy zone 1", >>> GEOGCS["Monte Mario", >>> DATUM["Monte_Mario", >>> SPHEROID["International 1924",6378388,297.000000000005, >>> AUTHORITY["EPSG","7022"]], >>> AUTHORITY["EPSG","6265"]], >>> PRIMEM["Greenwich",0], >>> UNIT["degree",0.0174532925199433], >>> AUTHORITY["EPSG","4265"]], >>> PROJECTION["Transverse_Mercator"], >>> PARAMETER["latitude_of_origin",0], >>> PARAMETER["central_meridian",9], >>> PARAMETER["scale_factor",0.9996], >>> PARAMETER["false_easting",1500000], >>> PARAMETER["false_northing",0], >>> UNIT["metre",1, >>> AUTHORITY["EPSG","9001"]], >>> AUTHORITY["EPSG","3003"]] >>> >>> When I run the command >>> r.in.gdal -o -e input=<inputfile.tif> output=inputraster >>> location=location >>> >>> I get this error about the region >>> ERROR: region for current mapset is not set >>> run "g.region" >>> >>> The g.region -p command return: >>> projection: 0 (x,y) >>> zone: 0 >>> north: 2030 >>> south: 0 >>> west: 0 >>> east: 1354 >>> nsres: 1 >>> ewres: 1 >>> rows: 2030 >>> cols: 1354 >>> cells: 2748620 >>> >>> How should I do? >>> >>> The same image georeferenced in the WGS84 system is properly loaded, so >>> I'm >>> wondering about to convert the GeoTiff AFTER loading int GRASS, but I >>> don't >>> know how. >>> >>> Does someone can help me? >>> >>> Thank you >>> >>> -- >>> Giacomo >>> >>> _______________________________________________ >>> grass-user mailing list >>> [email protected] >>> http://lists.osgeo.org/mailman/listinfo/grass-user >>> >>> >> >> > > > -- > Giacomo Piva > > MEEO S.r.l. > Via Saragat 9 > I-44122 Ferrara, Italy > Tel: +39 0532 1861501 > Fax: +39 0532 1861637 > http://www.meeo.it > > ======================================== > "ATTENZIONE:le informazioni contenute in questo messaggio sono > da considerarsi confidenziali ed il loro utilizzo è riservato unicamente > al destinatario sopra indicato. Chi dovesse ricevere questo messaggio > per errore è tenuto ad informare il mittente ed a rimuoverlo > definitivamente da ogni supporto elettronico o cartaceo." > > "WARNING:This message contains confidential and/or proprietary > information which may be subject to privilege or immunity and which > is intended for use of its addressee only. Should you receive this > message in error, you are kindly requested to inform the sender and > to definitively remove it from any paper or electronic format." > > _______________________________________________ > 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
