[gdal-dev] gdalinfo and scale/offset

2010-10-28 Thread Kyle Shannon
Hello, I have been working on ticket #3797. In the example given, gdalinfo is the calling the netcdf driver. I agree with Frank's opinion on this in ticket #1660: Note that GDALRasterBand has methods to get the offset and scale. The normal GDAL practice would be to return them via those

Re: [gdal-dev] gdalinfo and scale/offset

2010-10-28 Thread Kyle Shannon
Joaquim, With my code I wrote today, the offset and scale are set on the GDALRasterBand itself. If I do the following: gdal_translate lixo.grd lixo.tif gdalinfo lixo.tif -mm I get: Driver: GTiff/GeoTIFF Files: lixo.tif lixo.tif.aux.xml Size is 21, 21 Coordinate System is `' Origin =

Re: [gdal-dev] gdalinfo and scale/offset

2010-10-28 Thread Joaquim Luis
Kyle, Yes, that is much better but (sorry for one other 'but') what about formats that do not know anything about scale/offset? (Surfer format is one comes right to my mind) In those cases conversion would definitively go wrong. Issue a screaming warning in than? Joaquim Joaquim, With my

Re: [gdal-dev] gdalinfo and scale/offset

2010-10-28 Thread Kyle Shannon
Ah, I see your issue. I honestly don't know what to do about that. The only option I see is issuing a warning and continuing. I don't think unscaling that data is an option without a user explicitly asking for it to be unscaled. I am still not sure if this is even a gdal issue. The caller