1

I reproduce a project with the qgis graphic modeler, as it turns out some steps needed to be repeated in the future, maybe by less experienced GIS users and also for documentation purposes. However on various occasions, i got systematic problems handling layer inputs from a Geopackage in the modeler:

  1. I want a OSM.PBF to be converted to a GPKG, with all layers. If i use GDALs Convert format i can only add one Layer from the existing project. If i choose the PBF instead i get the points converted - probably due the data structure. I can convert with ogr2ogr outside the model.
  2. I want all GPKG Layers (with the manual ogr2ogr it would be 4 layers: Point, LineString, MultiLineString, MultiPolygon) to be clipped and HStore exploded. If i choose the GPKG i get the Point layer processed. I would like that this combination of algorithms in the graphic modeler iterates with every (vector) layer in the GPKG.

I searched quite a lot in qgis doc and this stackexchange, but didn't find any useful information for my case.

How to loop through multiple layers in a GeoPackage using QGIS Graphical Modeller suggests to add all layers (of one GPKG) as individual GPKGs (with one layer) to Qgis so i can select them for batch processing. Which in turn would prevent the outputs from being used in graphic modeler for further automatic processing, if i understand it right. Of course i could set up an additional model with manual inputs (=the output GPKGs) for the processes after 2. but this greatly diminish bare function of the modeler for me.

I guess there is always a way out with python, but i would like to mainly stick with the graphic modeler for now.

asked Sep 13, 2022 at 14:03

1 Answer 1

1

It seems to be a general unsolved problem in how the modeler handles the individual layers of Geopackages (see e.g. https://github.com/qgis/QGIS/issues/45905). I stick with separating all layers of the geopackage start to end of the model by using the Method described here: Adding a Geopackage layer as a hardwired input to an algorithm in the QGIS graphical modeler

answered Oct 20, 2022 at 16:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.