<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Klaus -</p>
<p>Even though the GeoPackage format is using a spatialite database
as the foundation, the internal format of the geopackage geometry
type differs from the spatialite type. So yon can't directly use
spatialite geometry based function with geopackage geometries. <br>
</p>
<p>However you can "wrap" every use of GeoPackage geometries in a
converter function: <span style="color: rgb(0, 0, 0);
font-family: "trebuchet ms", sans-serif; font-size:
medium; font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;"><b>CastAutomagic(geom)</b>, which
converts a GeoPackage geometry to a Spatialite geometry.<br>
</span></p>
<p>So a call to: <i>st_area (geom)</i> becomes <i>st_area(<b>CastAutomagic(</b>geom<b>)</b>)</i></p>
<p><span style="color: rgb(0, 0, 0); font-family: "trebuchet
ms", sans-serif; font-size: medium; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: 400; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;">(No, It's not
nice and it certainly not effective use of computer resources,
however it works.)<br>
</span></p>
<p>There is a thread about the why's and why-not's for this subject
in the QGIS-user list around september 13 , 2018</p>
<p>Regards <br>
</p>
<p>Bo Victor Thomsen<br>
LIFA Landinspektører A/S, <br>
Denmark<br>
</p>
<p><br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Den 29/10/2018 kl. 14.35 skrev
Mithoefer:<br>
</div>
<blockquote type="cite"
cite="mid:3fb5f63f-75b6-e9fc-fc9c-96d55efdb8cd@gbd-consult.de">Dear
List,
<br>
<br>
I have a geopackage database and tried to use a spatial sql
function (st_area) using the db manager in qgis 3.4Â --> select
st_area(geom) from polygon_filename. The function is available,
but the result is Null. What is the problem?
<br>
<br>
Thanks a lot
<br>
<br>
Kind regards
<br>
<br>
Klaus
<br>
_______________________________________________
<br>
Qgis-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<br>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
<br>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote>
<br>
</body>
</html>