How can I store relationship in GeoPackage with QGIS and how does it function? It is hard to find an example in the help program.
- 2in QGIS Project>Relations github.com/qgis/QGIS/pull/49504Mapperz– Mapperz ♦2024-06-06 22:14:51 +00:00Commented Jun 6, 2024 at 22:14
- Was expecting to see the relation in the display. If you can, clarify with example.Valter Albino– Valter Albino2024-06-07 14:06:15 +00:00Commented Jun 7, 2024 at 14:06
- Can you clarify what you mean? - The relationships show in the browser as shown above in the link.Mapperz– Mapperz ♦2024-06-07 14:09:04 +00:00Commented Jun 7, 2024 at 14:09
- I'm not able to attach a picture. The goal is a classic. It is to establish a relationship between an alphanumeric table and a geographic table (between foreign key and primary key), save this relationship in the geopackage and visualize it when clicking on the layer, however, this does not happen because it does not illustrate the relationship, it is as if it were not make the relationship even after having created it, through the QGIS browser (by clicking on the database in geopackage...). Also, I don't konw how you created so many relations. I only have one cardinality option: many-to-manyValter Albino– Valter Albino2024-06-07 19:18:06 +00:00Commented Jun 7, 2024 at 19:18
Add a comment |
1 Answer
You can manage the one to many relationship outside of QGIS, for example in DB Browser for SQLite (-> https://sqlitebrowser.org/). After that the Parent-Child relationship is recognized as a database relationship and you will see it in the QGIS Browser:
- Thanks for the help. So it has to be with a 3rd party program.Valter Albino– Valter Albino2024-06-09 13:13:27 +00:00Commented Jun 9, 2024 at 13:13
- I'm not 100% percent sure, but to me it seems like with the ordinary OSX LTR 3.40 build it's not possible as of as it ships with GDAL 3.3 and not the required 3.6 github.com/qgis/QGIS/pull/49504 but this likely will be resolved with QT 6 github.com/qgis/QGIS/pull/60039#issuecomment-2567661209 At least I failed to achieve the desired behavior with those versions.Beni– Beni2025-05-20 14:31:22 +00:00Commented May 20 at 14:31
