[gdal-dev] Codepage or UTF-8 in a metadata file Filename.aux in the Erdas Imagine format, describing a Filename.tif

Mikael Rittri Mikael.Rittri at carmenta.com
Mon Jun 26 02:43:40 PDT 2023


Hello list.

I have encountered a Filename.tif with an associated metadata file, Filename.aux. The .aux file can be understood by gdalinfo, which says

Driver: HFA/Erdas Imagine Images (.img)
Files: Filename.aux
       Filename.rrd
       Filename.rde

As I understand it, the .aux file is on an Erdas Imagine format intended to describe metadata for the Erdas .img format, but it can also be used to describe metadata for .tif files as in my case. (I have the Filename.rrd and the Filename.rde but not any Filename.img, so it is somewhat strange but useful that GDAL can read the .aux file directly).

Anyway, my question is: when the Filename.aux contains strings, in my case descriptions of terrain types represented by integers (part of a Raster Attribute Table), is there an established way to figure out whether the strings are stored in UTF-8, or if not, what codepage is used? In my case, the strings seem to be stored as 8-bit ASCII using the codepage 1252 (mainly for West-European alphabets), but GDAL seems to expect UTF-8 so the Swedish characters with diacritics become garbled.

I realize that if the .aux format is proprietary and has just been reverse-engineered, then maybe no-one knows the answer to this. But I am curious if anyone has had similar problems and maybe figured out a workaround. Or if there are any grounds to say that UTF-8 is mandatory in the .aux format, then my example file would be incorrect and that would also be useful to know.

Best regards,

Mikael Rittri
Carmenta Geospatial Technologies
Sweden
carmenta.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230626/71714aec/attachment.htm>


More information about the gdal-dev mailing list