[gdal-dev] Extension based file identification in drivers
Even Rouault
even.rouault at spatialys.com
Wed Mar 28 07:13:45 PDT 2018
On mercredi 28 mars 2018 15:05:34 CEST Andrew C Aitchison wrote:
> On Tue, 27 Mar 2018, Even Rouault wrote:
> > The identification logic of drivers is supposed to operate fast
> >
> > (extension based, or on the content of the first kilobyte of the header),
>
> If I understand correctly Frank Warmerdam did not favour extension based
> file identification:
> https://lists.osgeo.org/pipermail/gdal-dev/2013-February/035516.html
> GDAL is based on the idea that file formats are discovered by
> inspecting file contents rather than based on extension and I don't
> want to make it too easy for applications to ignore this principle
> and revert to extensions.
>
> I have therefore tried to avoid using extension to identify file type.
>
> Has thinking on this moved on in the last five years ?
No. Identification per file content is still the primary identification
method. There are a few drivers where this is not possible due to the file
format (absence of header with unambiguous signature), and thus extension is
used as a fallback.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list