[Gdal-dev] Byte swapping BIL data?
Schuyler Erle
schuyler at nocat.net
Sat Dec 4 13:17:07 EST 2004
I have a BIL file of population data from the Gridded Population of
the World project. GDAL can read the extents of the file, but not the
Float32 data values inside it. I can import the file into GRASS using
r.in.bin, but I have to use the -b switch to do byte swapping to get
the right values out. From this I infer that the dataset has the wrong
endianness, but is otherwise intact.
I note that gdalwarp and gdal_translate don't have byte swapping
options, but gdal.h has a GDALSwapWords() function. Would it make
sense to write a patch for gdal_translate to do byte swapping based on
a command-line switch, or do the GDAL command-line utils already do
this in some fashion that I haven't discovered?
SDE
More information about the Gdal-dev
mailing list