[gdal-dev] .asc files during open

Even Rouault even.rouault at mines-paris.org
Sat Dec 4 05:16:47 EST 2010


Le samedi 04 décembre 2010 00:34:39, Ray Gardener a écrit :
> Best way is probably to add a driver option (if it doesn't already have
> one for that).

This has indeed been added recently and will be available in GDAL 1.8.0. 
Extract from http://gdal.org/frmt_various.html#AAIGrid :

"By default, the datatype returned for AAIGRID datasets by GDAL is 
autodetected, and set to Float32 for grid with floating point values or Int32 
otherwise. This is done by analysing the format of the NODATA value and the 
first 100k bytes of data of the grid. From GDAL 1.8.0, you can explictely 
specify the datatype by setting the AAIGRID_DATATYPE configuration option 
(Int32, Float32 and Float64 values are supported currently)"


> 
> Ray
> 
> On 12/3/2010 3:01 PM, Todd Smith wrote:
> > When opening .asc files, they are scanned for any values that may be
> > floating point so the type of data (int or float) can be set properly.
> > For the case I'm dealing with (2800 files @ 50mb each) it means that
> > each file takes about 1.25 seconds to open (because the data is all
> > integer data).  It means it takes nearly an hour for all the files to be
> > opened.  Short of changing the code to not scan for a '.' and just
> > assume that every file is a floating point file, can anyone think of a
> > good way to speed this up?
> > Thanks,
> > Todd
> > 
> > 
> > 
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list