[Gdal-dev] Problem with AAIGrid's large integer

Matt Wilkie matt.wilkie at gov.yk.ca
Wed May 30 15:18:38 EDT 2007


> There is no compelling reason to use Int16 for the AAIGRID driver.  If
> you want something done about this though, I'd urge you to file a bug
> report properly against GDAL.
> 
> The downside of defaulting to Int32 for the driver is that it will really
> bulk up output files and the Int32 data type is less widely support than
> Int16.  And changing this behavior will no doubt cause some people some
> pain.

I thought so at first, but according to the docs, GRIDS are always 
stored as 32bit, and the reported pixel depth is based on what the 
actual cell values are. This was a surprise to me. I guess I never 
noticed since grids are always compressed so the rasters were always in 
the size range expected for their bit depth.

"A grid dataset is always 32 bit (either signed, unsigned, or floating 
point), but ArcGIS shows it as being the most appropriate bit depth 
above (with regard to the cell values it contains); ArcInfo Workstation 
will always tell you the bit depth of the grid."


For the problem Etsushi encountered might it be sufficient to read the 
./info/[gridname].sta file and set the default output type from there? 
(e.g. use the same approach esri does)


http://tinyurl.com/23rfa9 - Bit depth capacity for raster dataset cells
http://tinyurl.com/24nl6a - About the ESRI Grid format
http://tinyurl.com/2gcadd - FAQ:  What are the item definitions 
available for ArcInfo GRID format?

(which go to:
http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?id=2662&pid=2652&topicname=Bit_depth_capacity_for_raster_dataset_cells
http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=About_the_ESRI_grid_format
http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=30447
)


cheers,

-- 
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------




More information about the Gdal-dev mailing list