Skip to main content
deleted 4 characters in body; edited title
Source Link

Docker ogr2ogr & ogrinfo .shp shapefile "Unable to open datasource"

❯ docker run osgeo/gdal:ubuntu-full-3.4.1 ogrinfo -al ./myShapefile.shp
FAILURE:
Unable to open datasource `./myShapefile`myShapefile.shp' with the following drivers.
  -> ESRIC
  -> FITS
  -> PCIDSK
  -> netCDF
  -> PDS4
  -> VICAR
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> BAG
  -> EEDA
  -> OGCAPI
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> LVBAG
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
  -> KML
  -> GeoJSON
  -> GeoJSONSeq
  -> ESRIJSON
  -> TopoJSON
  -> Interlis 1
  -> Interlis 2
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> OGR_DODS
  -> ODBC
  -> WAsP
  -> MDB
  -> PGeo
  -> MSSQLSpatial
  -> OGR_OGDI
  -> PostgreSQL
  -> MySQL
  -> OpenFileGDB
  -> DXF
  -> CAD
  -> FlatGeobuf
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> OGR_PDS
  -> WFS
  -> OAPIF
  -> SOSI
  -> Geomedia
  -> EDIGEO
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> XLS
  -> ODS
  -> XLSX
  -> Elasticsearch
  -> Walk
  -> Carto
  -> AmigoCloud
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> MongoDBv3
  -> VDV
  -> GMLAS
  -> MVT
  -> NGW
  -> MapML
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> HTTP

Docker ogrinfo .shp shapefile "Unable to open datasource"

❯ docker run osgeo/gdal:ubuntu-full-3.4.1 ogrinfo -al ./myShapefile.shp
FAILURE:
Unable to open datasource `./myShapefile.shp' with the following drivers.
  -> ESRIC
  -> FITS
  -> PCIDSK
  -> netCDF
  -> PDS4
  -> VICAR
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> BAG
  -> EEDA
  -> OGCAPI
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> LVBAG
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
  -> KML
  -> GeoJSON
  -> GeoJSONSeq
  -> ESRIJSON
  -> TopoJSON
  -> Interlis 1
  -> Interlis 2
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> OGR_DODS
  -> ODBC
  -> WAsP
  -> MDB
  -> PGeo
  -> MSSQLSpatial
  -> OGR_OGDI
  -> PostgreSQL
  -> MySQL
  -> OpenFileGDB
  -> DXF
  -> CAD
  -> FlatGeobuf
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> OGR_PDS
  -> WFS
  -> OAPIF
  -> SOSI
  -> Geomedia
  -> EDIGEO
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> XLS
  -> ODS
  -> XLSX
  -> Elasticsearch
  -> Walk
  -> Carto
  -> AmigoCloud
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> MongoDBv3
  -> VDV
  -> GMLAS
  -> MVT
  -> NGW
  -> MapML
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> HTTP

Docker ogr2ogr & ogrinfo .shp shapefile "Unable to open datasource"

❯ docker run osgeo/gdal:ubuntu-full-3.4.1 ogrinfo -al myShapefile.shp
FAILURE:
Unable to open datasource `myShapefile.shp' with the following drivers.
  -> ESRIC
  -> FITS
  -> PCIDSK
  -> netCDF
  -> PDS4
  -> VICAR
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> BAG
  -> EEDA
  -> OGCAPI
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> LVBAG
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
  -> KML
  -> GeoJSON
  -> GeoJSONSeq
  -> ESRIJSON
  -> TopoJSON
  -> Interlis 1
  -> Interlis 2
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> OGR_DODS
  -> ODBC
  -> WAsP
  -> MDB
  -> PGeo
  -> MSSQLSpatial
  -> OGR_OGDI
  -> PostgreSQL
  -> MySQL
  -> OpenFileGDB
  -> DXF
  -> CAD
  -> FlatGeobuf
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> OGR_PDS
  -> WFS
  -> OAPIF
  -> SOSI
  -> Geomedia
  -> EDIGEO
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> XLS
  -> ODS
  -> XLSX
  -> Elasticsearch
  -> Walk
  -> Carto
  -> AmigoCloud
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> MongoDBv3
  -> VDV
  -> GMLAS
  -> MVT
  -> NGW
  -> MapML
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> HTTP

deleted 3 characters in body
Source Link

ogr2ogr works just finehas the same problem, whereas ogrinfo failes with the following;

ogr2ogr works just fine, whereas ogrinfo failes with the following;

ogr2ogr has the same problem, ogrinfo failes with the following;

Source Link

Docker ogrinfo .shp shapefile "Unable to open datasource"

I am using current gdal docker image osgeo/gdal:ubuntu-full-3.4.1 to display metadata from a shapefile. After multiple failed attempts of failed installation of GDAL 3.4 on Ubuntu 20.10 I am now using the docker version.

ogr2ogr works just fine, whereas ogrinfo failes with the following;

❯ docker run osgeo/gdal:ubuntu-full-3.4.1 ogrinfo -al ./myShapefile.shp
FAILURE:
Unable to open datasource `./myShapefile.shp' with the following drivers.
  -> ESRIC
  -> FITS
  -> PCIDSK
  -> netCDF
  -> PDS4
  -> VICAR
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> BAG
  -> EEDA
  -> OGCAPI
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> LVBAG
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
  -> KML
  -> GeoJSON
  -> GeoJSONSeq
  -> ESRIJSON
  -> TopoJSON
  -> Interlis 1
  -> Interlis 2
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> OGR_DODS
  -> ODBC
  -> WAsP
  -> MDB
  -> PGeo
  -> MSSQLSpatial
  -> OGR_OGDI
  -> PostgreSQL
  -> MySQL
  -> OpenFileGDB
  -> DXF
  -> CAD
  -> FlatGeobuf
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> OGR_PDS
  -> WFS
  -> OAPIF
  -> SOSI
  -> Geomedia
  -> EDIGEO
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> XLS
  -> ODS
  -> XLSX
  -> Elasticsearch
  -> Walk
  -> Carto
  -> AmigoCloud
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> MongoDBv3
  -> VDV
  -> GMLAS
  -> MVT
  -> NGW
  -> MapML
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> HTTP

The file is of course present, valid and not read protected. Running with sudo makes no difference. Also specifying a full-path does nothing.