Available drivers in Datasource and VectorData
The list of drivers available to open and write vector data is not the same in otb::VectorData
and otb::ogr::DataSource
. The lists of (file extensions / driver) are :
- For
otb::ogr::DataSource
:
const ExtensionDriverAssociation k_ExtensionDriverMap[] = {
{".SHP", "ESRI Shapefile"}, {".TAB", "MapInfo File"}, {".GML", "GML"}, {".GMT", "OGR_GMT"}, {".GPX", "GPX"},
{".SQLITE", "SQLite"}, {".KML", "KML"}, {".CSV", "CSV"}, {".GPKG", "GPKG"}};
- For
otb::VectorData
(OGRVectorDataIO)
const std::map<std::string, std::string> m_OGRExtensionsToDrivers = {
{".SHP", "ESRI Shapefile"}, {".TAB", "MapInfo File"}, {".GML", "GML"}, {".GPX", "GPX"}, {".SQLITE", "SQLite"}, {".KML", "KML"},
{".GMT", "OGR_GMT"}, {".GPKG", "GPKG"}, {".JSON", "GeoJSON"}, {".GEOJSON", "GeoJSON"}};
This is confusing and limiting for OTB users. Some application are based on VectorData
and some are base on otb::ogr::Datasource
.
I think the same list should be used for both classes (the union of the two list). The reading/writing is done by ogr so I don't think there is any limitation on this side.
See this forum post
Edited by Cédric Traizet