[GRASS5] Re: [GRASSLIST:6423] r.out.gdal: Unable to convert to WKT

Hello Jachym

On Tue, 12 Apr 2005, Jachym Cepicky wrote:

The attachment worked fine now and I confirm, it works,
thank you:

Good. I committed a slight variation to CVS that I think should work reliably.

just few outputs:

1) for the Krovak-location

GRASS6.1.cvs(cr-jtsk):~> r.out.gdal in=dem_srtm type=Byte out=dem.tiff
WARNING: OGR can't parse PROJ.4-style parameter string:
           +proj=krovak +a=6377397.155 +rf=299.1528128 +no_defs
           +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56 +to_meter=1.0
           (OGR Error code was 5)
WARNING: g.proj: Unable to convert to WKT
Writing format: GTiff
Writing type: Byte
Input file size is 7881, 3246
0...10...20...30...40...50...60...70...80...90...100 - done.
GRASS6.1.cvs(cr-jtsk):~>

2) for the xy-location (there was the problem too)

GRASS6.1.cvs(xy):~> r.out.gdal in=dem type=Int32 out=demint32
/usr/local/grass-6.1.cvs/scripts/r.out.gdal: line 126: [: too many arguments
Writing format: GTiff
Writing type: Int32
PROJ_INFO soubor nenalezen pro location xy
PROJ_UNITS soubor nenalezen pro location xy
Input file size is 1000, 1000
0...10...20...30...40...50...60...70...80...90...100 - done.
GRASS6.1.cvs(xy):~>

There will still be a problem there, as running g.proj -wf in an XY location will print something like 'XY (Unprojected)' to stdout. This was originally a design feature, as g.proj -p certainly should print something to indicate that the location is XY. But probably g.proj -j (PROJ format) or g.proj -w (WKT format) should print nothing as there is no PROJ.4 or WKT representation of an XY location. Or perhaps is there a way of representing it in WKT? I'm not sure.

I'll think about this a bit more but at the minute my plan is to change g.proj so it prints nothing for an XY location if the -j or -w options are selected.

Paul

On Thu, Apr 14, 2005 at 03:14:32PM +0100, Paul Kelly wrote:

Hello Jachym

On Tue, 12 Apr 2005, Jachym Cepicky wrote:

>The attachment worked fine now and I confirm, it works,
>thank you:

Good. I committed a slight variation to CVS that I think should work
reliably.

>
>just few outputs:
>
>1) for the Krovak-location
>
>GRASS6.1.cvs(cr-jtsk):~> r.out.gdal in=dem_srtm type=Byte out=dem.tiff
>WARNING: OGR can't parse PROJ.4-style parameter string:
> +proj=krovak +a=6377397.155 +rf=299.1528128 +no_defs
> +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56 +to_meter=1.0
> (OGR Error code was 5)
>WARNING: g.proj: Unable to convert to WKT

I have posted an enhancement to the GRASS/GDAL plugin which enables
the plugin to print the GRASS projection. This will probably
also cure the problem as the g.proj call within r.out.gdal
is no longer needed. The patch to GDAL makes use of the
ellipse.table and datum.table of GRASS.

Details:

http://208.24.120.44/show_bug.cgi?id=822

Markus