Currently we have an organizing and tracking of files problem.
Right now we have our geodata organized in different geopackages (.GPKG files) for specific areas.
The problem is that the amount of geopackages is growing and it becomes harder and harder to track where each of the data are. Sure, we organized it logically but at the same time it still hard to keep track.
To keep better track of the data, we want to keep an inventory of the contents of the GPKG file (data tables, layer names) including its metadata.
Is there any way this can be done in QGIS itself or do we need to develop a separate script for it?
I currently have found a way to extract the information of geopackage so far using SQL, or more specifically SQLite. So far I have created some querry's to extract the tables that are "common" in a geopackage. As for the shematics below, this is the one for Vector data:
However, the problem I still have is the extraction of the sample_feature_table and the sameple_title_pyramid because depending on the geopackage the name of the feature table is different.
I know that the name of the feature table's are in the table name column, but I do not see a way to make this below assumption of code workable.
Select * from sample_feature_table; Select * from sample_pyramid_title; Where sample_feature_table = gpgk_contents.table_name? Where sample_tile_pyramid= gpgk_tile_matrix.table_name column?
The sample_feature_table and its raster counterpart are "placeholder table names", the actual name of all the tables are in the table name column.