OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.91k stars 2.55k forks source link

gdalinfo --formats -json #10878

Closed hobu closed 1 month ago

hobu commented 1 month ago

Feature description

gdalinfo --formats -json and ogrinfo --formats -json would be very useful for verification of packaging configuration. Including the answered extensions, capabilities, and descriptions in nodes would also be helpful.

Additional context

No response

rouault commented 1 month ago

Prabably the first step is to have "gdalinfo --format {name} --json" to work, and then applying that to --formats is just making an array. Which brings the question: do we want to JSON'ify (I mean just in gdalinfo --format[s] --json ! and not actually change the original XML format used in drivers themselves) the XML creation/open/etc. option lists ? That should/could probably be made available as a char* GDALDriverGetCapabilitiesAsJSON(GDALDriverH hDr) function to be re-used by applications. Or am I over-engineering stuff?

hobu commented 1 month ago

Or am I over-engineering stuff?

Umm...

rouault commented 1 month ago

went for the non-over-engineered way in https://github.com/OSGeo/gdal/pull/10881