5

I'd been converting some shapefiles to GeoPackage with QGIS 2.18.5 on Windows. Now I check my project on Linux (Ubuntu 14.04 with QGIS 2.18.5), and the gpkg files are treated as attribute-only layers.

To test, I made a new project and added some sample vector data from http://www.geopackage.org/#sampledata (the Esri Sample Data, GeoPackage 1.0 and 1.1), with the same result. No geometry is recognized (and the gpkg_* metadata tables are instead also displayed in the wizard):

QGIS 2.18.5 on Ubuntu adding a GeoPackage vector

Any clues what is wrong? I couldn't find any similar reports, or extra requirements for QGIS on Linux.

6
  • I had a problem with an old gdal installation on debian. Can you check which you have installed?
    – Matte
    Apr 8, 2017 at 14:47
  • QGIS about window says Running against GDAL/OGR 1.10.1, and dpkg says gdal-bin is at 1.10.1+dfsg-5ubuntu1. Looks good?
    – arjan
    Apr 8, 2017 at 14:53
  • GDAL looks rather old and 1.10 does not get any updates.
    – user30184
    Apr 8, 2017 at 15:09
  • 1
    If you switch to ubuntugis ppa, you can have GDAL 2.1.0. Otherwise I suggest to uppdate the OS to Ubuntu 16.04.
    – AndreJ
    Apr 8, 2017 at 15:47
  • 1
    Thanks all. I've switched to ubuntugis, which I'd been avoiding because of dependency problems in the past. With GDAL 2.1.0 it's working. @Matte care to post as answer or shall I?
    – arjan
    Apr 8, 2017 at 15:49

2 Answers 2

7

On Debian based distributions you have QGIS with GDAL version 1.10 installed. As QGIS uses GDAL/OGR to open the Geopackage the problem is the old Version of it. The OGC page for the standard tells that you need at least version 1.11 to read the GeoPackage features.

It is not enough to install the newer version of GDAL, as you also need the QGIS version build with the higher version. Easiest way to get around dependency problems is to upgrade to newer distribution.

3
  • 1
    i thought the easiest way is ubuntugis Apr 8, 2017 at 17:55
  • 2
    Yeah I went with deb http://qgis.org/ubuntugis trusty main plus ppa:ubuntugis/ppa (not sure why QGIS instructions recommend ubuntugis-unstable ppa instead, stable seems to be fine).
    – arjan
    Apr 8, 2017 at 19:05
  • Exacty you need good dependancy in QGIS compilation. See how it's compiled. For that I prefer the network installer on windows download.osgeo.org/osgeo4w/v2/osgeo4w-setup.exe you can see dependencies Mar 16, 2022 at 16:58
0

I make the same (gpkg-files made in a windows system, QGIS 3.16) and I open the file under Ubuntu 20.04 with QGIS 3.22 - no problem, the geometries are there.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 16, 2022 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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