[gdal-dev] How to consider data types when implementing IWriteBlock

jramm jamessramm at gmail.com
Tue Apr 19 02:22:50 PDT 2016


Even Rouault-2 wrote
> Skimming through the code, it seems you must provide zmin / zmax to do the 
> scaling of floating point elevations to integral values. So either it is
> user 
> provided, or you do a prior statistics computation in CreateCopy() if the 
> input dataset hasn't min/max metadata.
> In any case, checking overflow and warning if it occurs might be a good
> idea.

So far, I haven't implemented CreateCopy, although this would probably be a
very good idea to allow min/max to be set automatically & properly.
In Create(), it just defaults the min/max to SHRT_MIN and SHRT_MAX. Would
the creation options be a good way to expose it to the user, to be set
explicitly?


Even Rouault-2 wrote
> Yes using PAM might be an option. Basically our SetProjection() should
> also 
> call GDALPamDataset::SetProjection(). And on reading you first check if 
> GDALPamDataset::GetProjectionRef() returns a non-empty string, in which
> case 
> you return it. Otherwise you return the MITAB decoded one. 

Great. I will try doing this. 



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-consider-data-types-when-implementing-IWriteBlock-tp5260901p5261827.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list