Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
otb
otb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 273
    • Issues 273
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Main Repositories
  • otbotb
  • Issues
  • #2061

Closed
Open
Opened Jun 17, 2020 by Cédric Traizet@ctraizetDeveloper

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 / drive) 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 Jun 17, 2020 by Cédric Traizet
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: orfeotoolbox/otb#2061