On Tue, Feb 19, 2013 at 9:39 AM, Etienne Tourigny <etourigny....@gmail.com> wrote: > It would be nice to be able to specify many extensions in a > comma-separated list such as "nc,cdf,nc4". It can probably be done > (metadata is just a string), but isn't standard. > > The Gdal driver tutorial states: > GDAL_DMD_EXTENSION: The extension used for files of this type. If more > than one pick the primary extension, or none at all. (optional) > > It could be beneficial to extend this definition for multiple > extensions separated by comma.
Etienne, The challenge is to do this without breaking lots of applications that expect it to be a single extension. If we were to pursue this, I'd almost prefer to add GDAL_DMD_EXTENSION_LIST as a list of extensions that relate to this driver, and GDAL_DMD_EXTENSION would be the primary or preferred extension. But I'm still not all that keen. I see the GDAL_DMD_EXTENSION as existing primarily so that applications can prepare a reasonable default filename when creating a file. For this having a list of extensions is not helpful. People *usually* want a list of extensions so they can automatically categorize the format of files on disk or to filter to only show extensions they think GDAL supports. I find this practice abhorrent! 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. One other use that extensions are used for is to make it easy for a user to filter down files in a file browser to just one format. I can't think of any time I've found this useful. But with GDAL there are so many formats that these "list of formats" filter dohickyies are usually completely unusable. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Software Developer _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev