[GRASS5] Re: [Gdal-dev] ERDAS/IMG driver error for NULL values

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Jun 30 11:11:21 EDT 2004


On Wed, 30 Jun 2004, Otto Dassau wrote:

> On Wed, 30 Jun 2004 15:02:55 +0200
> Markus Neteler <neteler at itc.it> wrote:
>
>> On Wed, Jun 30, 2004 at 11:14:45AM +0100, Paul Kelly wrote:
>>> Hello Otto
>>>
>>> Otto Dassau wrote:
>>>>
>>>>
>>>> Also there is no coordinate system specified.
>>
>> Otto, are you using the original GRASS driver or the new driver
>> of Radim Blazek (not in CVS yet)?
>
> I compiled GDAL with the patches from Radim for new raster support also in QGIS. I didn't use "old" libgrass.  The patches were:
>
> grassdataset.cpp3
> configure.in.patch2
>

Oh right I had assumed you were using old libgrass.

>
>>> This should be:
>>>>
>>>>> name: Transverse Mercator
>>>>> datum: potsdam
>>>>> towgs84: 590.5,69.5,411.6,-0.796,-0.052,-3.601,8.30
>>>>> proj: tmerc
>>>>> ellps: bessel
>>>>> a: 6377397.1550000003
>>>>> es: 0.0066743722
>>>>> f: 299.1528128000
>>>>> lat_0: 0.0000000000
>>>>> lon_0: 9.0000000000
>>>>> k_0: 1.0000000000
>>>>> x_0: 3500000.0000000000
>>>>> y_0: 0.0000000000
>>>
>>> This looks like a deficiency in the r.out.gdal script.
>>
>> I don't think so. Because the r.out.gdal script is simply a wrapper
>> around gdal_translate.
>>
>> In fact gdalinfo doesn't print the projection:
>>
>> gdalinfo ~/grassdata/spearfish57/PERMANENT/cellhd/elevation.dem | head
>> Driver: GRASS/GRASS Database Rasters
>> Size is 633, 466
>> Coordinate System is `'
>> Origin = (590010.000000,4928000.000000)
>> Pixel Size = (30.00000000,-30.00000000)
>> Corner Coordinates:
>> Upper Left  (  590010.000, 4928000.000)
>> Lower Left  (  590010.000, 4914020.000)
>> Upper Right (  609000.000, 4928000.000)
>> Lower Right (  609000.000, 4914020.000)
>> [...]
>>
>> I am using the new driver which contains the relevant code (I'm no
>> expert). Somewhere this info get's lost. Or should the driver make
>> use of the new GRASS 5.7 projection functions (such as GPJ_grass_to_wkt
>> in grass57/lib/proj/convert.c )?

Yes I see what you mean now, that Radim's new patches call 
GPJ_grass_to_wkt() and the co-ordinate system should be included 
automatically. I'll look at it if I have some time; mightn't be for a few 
days though.

The change to r.out.gdal should just be considered a temporary workaround 
then.

Also I noticed that the datum name didn't get printed in Otto's example 
(Deutsches_Haupt... for potsdam) either. That looks like a bug which I 
will have a look at.

Paul




More information about the grass-dev mailing list