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

2016-04-12 Thread jramm
Hi I am adding write support for the Northwood Grid (Vertical Mapper/MapInfo format) driver. This format only allows 32 bit float as the datatype, and to make things more tricky it actually stores this on disk as either 16 or 32 bit ints, using scaling rules. The current read driver applies the s

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

2016-04-12 Thread Even Rouault
Le mardi 12 avril 2016 17:10:41, jramm a écrit : > Hi > I am adding write support for the Northwood Grid (Vertical Mapper/MapInfo > format) driver. > This format only allows 32 bit float as the datatype, and to make things > more tricky it actually stores this on disk as either 16 or 32 bit ints, >

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

2016-04-18 Thread jramm
Hi I have implemented the write support in the NWT_GRD format, having to make a few compromises. I'd like to go through them and see if they are reasonable. I have also attached the diff. 1. The existing read driver reports 4 bands for a GRD dataset. The first 3 are essentially 'virtual' - they ar

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

2016-04-18 Thread Even Rouault
Le lundi 18 avril 2016 10:51:06, jramm a écrit : > Hi > I have implemented the write support in the NWT_GRD format, having to make > a few compromises. I'd like to go through them and see if they are > reasonable. I have also attached the diff. > > 1. The existing read driver reports 4 bands for a

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

2016-04-19 Thread jramm
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.

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

2016-04-19 Thread Even Rouault
Le mardi 19 avril 2016 11:22:50, jramm a écrit : > 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 C

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

2016-05-25 Thread jramm
As an update to this; I have finished write support for the GRD driver for now, with ZMAX/ZMIN exposed as creation options and will be explicitly calculated in CreateCopy if not passed in - exactly as you suggested Even, thanks. I'm waiting permission to get a osgeo user id so I can raise a ticke