I'm trying to use Anita Graser's post on loading OSM data from .PBF files into a SQLite .db file using ogr2ogr but it stopped working.
I'm trying to run the following command:
ogr2ogr -f "SQLite" -dsco SPATIALITE=YES Denver_OSM_Test.db denver.pbf
… yields the following error:
Unable to open datasource 'denver.pbf' [list of drivers]
I'm trying this on both Ubuntu 14.04 and Linux Mint 17.2
Note: This has worked cleanly before on Ubuntu 14.04 as per the instructions linked below which installed GDAL 1.9 or older… why this has stopped working is beyond me…
I have installed the prerequisites:
Then tried to re-install GDAL both from source, and from Sara's instructions which pull from the UbuntuGIS project.
ogrinfo --versionI get
GDAL 2.0.0, released 2015/06/14
apt-cache policy gdal-binI get:
gdal-bin: Installed: 1.11.2+dfsg-1~exp2~trusty Candidate: 1.11.2+dfsg-1~exp2~trusty Version table: *** 1.11.2+dfsg-1~exp2~trusty 0 500 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status 1.10.1+dfsg-5ubuntu1 0 500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
Probably you don't have a recent version of gdal. OpenStreetMap PBF support in GDAL was introduced in version 1.10.
Check your version and where it came from with:
apt-cache policy gdal-bin gdal-bin: Instalado: 1.9.0-3.1 Candidato: 1.9.0-3.1 Tabela de Versão: *** 1.9.0-3.1 0 500 http://ftp.pt.debian.org/debian/ wheezy/main amd64 Packages 100 /var/lib/dpkg/status
On my Debian, the GDAL version is still 1.9. PBF support is not included.