2

I have successfully saved several layers in one GeoPackage in QGIS 3.8. This is how it looks like in DB manager:

QGIS DB managere

I found out that the ordering of the layers is somehow strange when loading the GPKG file in QGIS:

GPKG after loading

Of course, I can manually change the layer ordering by dragging them in the Layers panel up or down but it would be nice if the default order could be correct by default. Same with the layer names in QGIS - is there any way to exclude the filename from the layer name?

That means get the layers loaded this way by default?

enter image description here

Because the support for multiple layers in one GeoPackage file is the much less useful if I have to manually adjust the names and ordering each time.

I tried to import the layers from my GPKG to another one but the resulting order was the same... Is there any way to solve this?

  • The ordering is alphabetical, so this is rather you having a special idea of how it should be? You could load the geopackage twice, once only the cities & borders, without a folder, then the Fukushima-layer inside a folder. You can toggle this while loading files which contain several layers. – Erik Oct 17 at 6:37
0

I encountered the same wrong layer order problem using QGIS 3.4. The "rename the layers" workaround worked for me.

Just be aware that some associations may be broken when you rename the layer, so you may need to re-create these associations. In my case, the default styles (from the database) that I had set before renaming the layers were no longer being used as the defaults after the name changes.

-1

You can rename the layers of your GeoPackage in the DB Manager with an alphabetical or numerical prefix to change the order of your layers. For example:

'NPP Fukushima1 point' > '1 - NPP Fukishima1'

'NPP Fukushima1 20km zone' > '2 - NPP Fukishima1 20km zone'

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.