Opened 12 years ago

Closed 12 years ago

#4518 closed defect (fixed)

gdalsrsinfo does not report "Supported Formats" with --formats option

Reported by: etourigny Owned by: etourigny
Priority: normal Milestone: 1.9.1
Component: Utilities Version: unspecified
Severity: normal Keywords: gdalsrsinfo, formats


gdalsrsinfo --formats prints the following output instead of the list of supported drivers:

Supported Formats:

This is because GDALAllRegister() is called after GDALGeneralCmdLineProcessor().

Also, the drivers supported by OGR (if enabled) are not printed.

Ideally, the drivers supported by GDAL and OGR should be printed.

Change History (1)

comment:1 by etourigny, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r23980) and 1.9 (r23981).

Copied code for --formats option from gcore/gdal_misc.cpp and ogr/ogrutils.cpp , so any changes there should be reflected here. This was done for customized output and also not to call OGRGeneralCmdLineProcessor() needlessly.

Now output is like this:

$  gdalsrsinfo --formats
Supported Raster Formats:
  VRT (rw+v): Virtual Raster
  GTiff (rw+v): GeoTIFF
  MBTiles (rov): MBTiles

Supported Vector Formats:
  -> "ESRI Shapefile" (read/write)

Tested with valgrind, with and without ogr support.

Note: See TracTickets for help on using tickets.