[GRASSLIST:6909] Re: r.out.gdal problems

Hamish hamish_nospam at yahoo.com
Thu May 26 20:36:43 EDT 2005


> > > was trying to export a GRASS raster with r.out.gdal and had the
> > > following error:
> > >
> > > ---------------------------------------------------------------------
> > > r.out.gdal in=amox out=amox format=GTiff type=Float32
> > > Writing format: GTiff
> > > Writing type:   Float32
> > > Failed to process SRS definition: 'PROJCS["UTM
> > > ---------------------------------------------------------------------
> > >
> > > I am using GRASS6.1-cvs and GDAL 1.2.6, both installed from source
..
> This happened with this morning's CVS version...


Yes, confirmed with Spearfish. The quoting bug still lives.


GRASS 6.1> r.out.gdal in=elevation.10m out=elev format=GTiff type=Float32
Writing format: GTiff
Writing type:   Float32
Failed to process SRS definition: 'PROJCS["UTM



By changing the top line of the script to
#!/bin/sh -x

and changing the PROJECTION line to  (just for clarity; same result)
-  PROJECTION="-a_srs '${WKT}'"
+  PROJECTION="-a_srs ${WKT}"

we see that the failing command is:

gdal_translate -of $FORMAT -ot $TYPE $PROJECTION $CREATEKEY $METAKEY \
  $CELLHD $OUTPUT


which expands to:

  gdal_translate -of GTiff -ot Float32 -a_srs 'PROJCS["UTM' Zone 13, Northern 'Hemisphere",GEOGCS["clark66",DATUM["North_American_Datum_1927",SPHEROID["clark66",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["meter",1]]' /home/hamish/grassdata/spearfish57/PERMANENT/cellhd/elevation.10m elev


It is adding 'single quotes' around things with spaces in the WKT such 
as "WKT Zone 13". How can this be stopped?



Hamish




More information about the grass-user mailing list