4

I am exporting a large dataset from PostGIS to GeoPackage and then trying to use it in QGIS and ArcMap. The GeoPackage size is 17Gb and contains around 6 different tables. The biggest table contains around 200million linestring features.

I have created the GeoPackage using ogr2ogr 2.1.3 which automatically adds a spatial index and am using QGIS 2.16.3 and ArcMap 10.4.

When I try and open the GeoPackage in QGIS it takes well over two hours before QGIS becomes responsive and starts to render the features at which point I can add a stylesheet or restrict the zoom ranges.

How can I use this GeoPackage more efficiently?

Do I need to VACUUM ANALYZE it like I would in PostGIS?

Or do I need to somehow add the stylesheet to the GeoPackage to restrict showing features at to high zoom levels.

Extra Details: Windows Server 2012 64Bit 16Gb RAM

  • 1
    Turn off rendering until you've set the style – Ian Turton Feb 27 '17 at 19:43
  • @iant I can't because QGIS becomes totally unresponsive while it seems to read the geopackage before even attempting to display the features – tjmgis Feb 28 '17 at 9:20
1

This sounds like a system tuning issue. If you really, really want to open this data set using QGIS do the following:

  • Check that you are indeed using the 64 bit version of QGIS.
  • Up your memory to at least the double of your data set. 16GB for a server installation is a little in the low end anyway.
  • Make sure your server is not busy with other operations.
  • SSD-based disk system could help. Low I/O on magnetic hard drives could add to your problem.
  • Check that you indeed keep the data set locally on your computer.

If you are mainly looking for a way to visualize your data I suggest you rather install a geoserver instance, map your data through it (preferably using PostGIS as your source) and connect to your data using WMS from the client software (QGIS or ArcMap). Use the integrated geowebcache Geoserver. You can even manage geoserver from a plugin in QGIS.

If you plan on doing spatial operations on the data set I suggest you keep your data in PostGIS and do the operations there. You could also use FME from safe software to do this as part of an export process.

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.