<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi list -</p>
<p>Recently, I've begun experimenting with creating spatial view's
of base-tables inside GeoPackages. A Geopackage is basically a
SQLite file containingĀ spatial data- and meta-tables with
specific structures of information about the spatial tables. <br>
</p>
<p>So it's possible to create a permanent view of a table (or
tables) in the GeoPackage by making a functioning SQL select
statement and prefixing it with "CREATE VIEW <i>view_name</i> AS
.. <i>the select statement</i> .. (This is database 101
knowledge) <br>
</p>
<p>However, if you want to expose those views as "read-only"
tables/layers for "non-sql-using" QGIS usersĀ you have to update
several meta-tables in the GeoPackage: <i>gpkg_contents</i>, <i>gpkg_geometry_columns</i>
and maybe <i>gpkg_ogr_contents</i>.<br>
</p>
<p>I'm brainstorming with myself about making some kind of automated
updating of the meta-tables with information about the views
created. Maybe some python code and maybe creating triggers for
the base table to handle data changes regarding the extend of the
data.</p>
<p>And now (at last !!) my question: I haven't been able to find
very much information about this subject using Google or
StackExchange. So.. Is there some existing code / plugin /
information so I don't have to "reinvent the wheel" ? <br>
</p>
<br>
<pre class="moz-signature" cols="72">--
Med venlig hilsen / Best regards
Bo Victor Thomsen</pre>
</body>
</html>