Open Gustry opened 8 years ago
Lets wait for QGIS 3 metadata in datasource support
I just started a prototype in the PR above.
hi @timlinux I encoutered a bug related to this. When you load two different layers from the same geopackage they will share the keywords.
Are you guys still working on @Gustry's PR #4921 ?
You have this bug because InaSAFE doesn't care about what is after the |
in your layer path unfortunately.
https://github.com/inasafe/inasafe/blame/master/safe/metadata/base_metadata.py#L196
So I guess you have a XML file sitting next to your geopackage. (one XML keywords file for one geopackage with many layers inside!)
Maybe it would be better to store keywords in the inasafe metadata DB?
BTW, is there not a kind of bug from QGIS? On the source text of your point layer, I would expect to have the layername
property. How InaSAFE can know which layer it is in the geopackage? I already noticed this behavior.
BTW, is there not a kind of bug from QGIS? On the source text of your point layer, I would expect to have the layername property. How InaSAFE can know which layer it is in the geopackage? I already noticed this behavior.
yes, I think this happens when you load a GPKG that has only one layer. after adding multiple layers probably it just picks the first layer. @nyalldawson is it a bug or a feature? :)
@mbernasocchi I'm a bit lost sorry, can you summarise exactly what the issue is?
when you two issues here the first is the one this bug report is about (keywords being per gpkg file and not per layer) but it is not the one I'm asking you about.
the second (The QGIS Question risen by @Gustry) is that when you add a GPKG with only one layer it is loaded as /path/file.gpkg
when you add a further layer to this file it is loaded as: /path/file.gpkg|layername=SecondLayer
which is the behaviour I'd expect in every case also when adding a GPKG that has only one layer
@mbernasocchi
Seems like a bug to me too
Problem
We should support keywords in the datastore for read and write with the monkey patching.
For now we have only two datastores :
We will add soon :