[gdal-dev] Default GeoTransform for MEM driver

Ivan Lucena lucena_ivan at hotmail.com
Tue Dec 10 07:48:31 PST 2013


Hi Even,

> From: even.rouault at mines-paris.org
> To: gdal-dev at lists.osgeo.org
> Subject: Re: [gdal-dev] Default GeoTransform for MEM driver
> Date: Mon, 9 Dec 2013 20:54:35 +0100
> CC: lucena_ivan at hotmail.com; tkeitt at utexas.edu; jukka.rahkonen at mmmtike.fi
> 
> Le lundi 09 décembre 2013 18:08:19, Ivan Lucena a écrit :
> > The other problem with that documentation is the return code. CE_Failue
> > means that the driver does not support it and/or that the dataset doesn't
> > have it.
> 
> The current behaviour of the MEM driver doesn't particularly shock me. It 
> seems OK to return CE_Failure if SetGeoTransform() hasn't been explicitely 
> called to define it. And as far as the default geotransform, it is a matter of 
> taste. [ 0, 1, 0, 0, 0, 1] would be indeed a bit more classical for a 
> ungeoreferenced image, but one can consider that if GetGeoTransform() returns 
> CE_Failure, the returned geotransform is to be ignored.

That is good to know. So it really doesn't matter if the driver support geotransformation or not.

But my concern is when it returns CE_None. What does it really means because I was checking some driver's implementation of GetGeoTransform and I noticed that some of then always return CE_None no matter what. So would that be possible that a dataset is *ungeoreferenced* and a driver returns CE_None with the default values [0, 1, 0, 0, 0, 1]. Should we trust that those values [0, 1, 0, 0, 0, 1] are correct or are they just a default filler?

For example, to get [0, 1, 0, 0, 0, 1] we should expect a world-file that should be something like:

1.0000000000
0.0000000000
0.0000000000
1.0000000000
0.5000000000
0.5000000000

Not:

1.0000000000
0.0000000000
0.0000000000
1.0000000000
0.0000000000
0.0000000000

Anyway, I will trust that the CE_None means that the geotransformation values are correct but should I will also check if the values are equal to [0, 1, 0, 0, 0, 1] just in case? And what to do if they are?

Sorry to introduce a question that is not exactly related to the topic, the MEM driver.

Regards,

Ivan

> 
> To answere Tim's initial question {0, 1, 0, 0, 0, -1} is a north-up image :  
> (0,0) is the coordinate of the upper left of the top left pixel, and y values 
> are decreasing with image rows.
> 
> Even
> 
> -- 
> Geospatial professional services
> http://even.rouault.free.fr/services.html
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131210/43cc8f9f/attachment-0001.html>


More information about the gdal-dev mailing list