2

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:

  • libsqlite3
  • libexpat

Then tried to re-install GDAL both from source, and from Sara's instructions which pull from the UbuntuGIS project.

EDIT:

Versions:

Using ogrinfo --version I get GDAL 2.0.0, released 2015/06/14

Using apt-cache policy gdal-bin I 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
  • Which debian version are you running? I guess Ubuntugis packages are only running on the platform they were built for. – AndreJ Sep 22 '15 at 5:20
0

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.

  • Debian Jessie (current stable version) has gdal 1.10.1. – scai Sep 22 '15 at 6:39
  • I should mentioned that this is for Debian wheezy. If @mapBaker does not have Gdal 1.10 on the default repositories, I supposed he/she still has Debian wheezy. I have only Debian wheezy on a cloud provider, and I can not upgrade to jessie. – jgrocha Sep 22 '15 at 6:50
  • @jgrocha will update my question with version summaries – DPSSpatial Sep 22 '15 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.