<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>That sounds like a cool idea. I've had a crack at it in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/6877">https://github.com/OSGeo/gdal/pull/6877</a></p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 08/12/2022 à 22:10, Meyer, Jesse R.
(GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:63FFE6AE-ABEA-4C37-BB01-9E2C70EA653D@nasa.gov">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I want to
perform this on tens of thousands of GPKG databases, each
possessing upwards of millions of points, so automation (and
performance) is a high value. The hope was that given both
data sources leverage the same driver, there was some hope
of this working with the proper incantation, especially
considering the library routines available by Spatialite in
SQL queries. But without something like burn available in a
SQL query then this can’t work at the query level. This is
easy to write in C/C++ but wanted to see if the database
engine could handle it directly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Jesse<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black" lang="FI">From:
</span></b><span style="color:black" lang="FI">Rahkonen
Jukka <a class="moz-txt-link-rfc2396E" href="mailto:jukka.rahkonen@maanmittauslaitos.fi"><jukka.rahkonen@maanmittauslaitos.fi></a><br>
<b>Date: </b>Thursday, December 8, 2022 at 3:45 PM<br>
<b>To: </b>"Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS
AND APPLICATIONS INC]" <a class="moz-txt-link-rfc2396E" href="mailto:jesse.r.meyer@nasa.gov"><jesse.r.meyer@nasa.gov></a>,
<a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org">"gdal-dev@lists.osgeo.org"</a>
<a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
<b>Subject: </b>[EXTERNAL] Re: SQL query to set column to
GPKG raster pixel value of point intersection result<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt" lang="FI"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt" lang="FI">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt" lang="FI"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">It feels
like quite special tool. Have you considered to use the
Sample Raster Values tool in QGIS? The description of the
tool is:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Sample
raster values<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This
algorithm creates a new vector layer with the same
attributes of the input layer and the raster values
corresponding on the point location.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">If the
raster layer has more than one band, all the band values are
sampled.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-Jukka
Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt"
lang="FI">Lähettäjä:</span></b><span
style="font-size:11.0pt" lang="FI"> gdal-dev
<a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev-bounces@lists.osgeo.org"><gdal-dev-bounces@lists.osgeo.org></a>
<b>Puolesta </b>Meyer, Jesse R. (GSFC-618.0)[SCIENCE
SYSTEMS AND APPLICATIONS INC] via gdal-dev<br>
<b>Lähetetty:</b> torstai 8. joulukuuta 2022 20.07<br>
<b>Vastaanottaja:</b> <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Aihe:</b> [gdal-dev] SQL query to set column to GPKG
raster pixel value of point intersection result<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="FI"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I have GPKG
database with features represented by point geometries. I’d
like to update these features, in a single SQL statement, to
add a new column whose value is the pixel value of an
external GPKG raster for which the point geometry intersects
with. I was hoping to find an OGR SQL function similar to
burn for this, but I’ve come up empty handed.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Is this
functionality available? Ideally, without resorting to
manually updating each feature individually in a user
application. Otherwise, perhaps a feature request is in
order.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Jesse<o:p></o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>