<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have two geopackage database files that were constructed, somehow, in a way that one has a geometry column called ‘geometry’ and the other ‘geom’. QGIS nor OGR seem to have much an issue with this. Both handle / display all the features
in the expected ways. However, for the gpkg with the ‘geom’ column name (which I believe is irregular), the usual SQLisms (with dialect=sqlite) seem to fail. For the former gpkg, I can use the GEOMETRY identifier as documented successfully, however, this
fails with the latter with an ‘no such column: GEOMETRY’ error. The documentation leads me to believe that that identifier _<i>should</i>_ resolve to whatever the geometry column name is, and maybe it does internally but then something later goes haywire
for opaque reasons. If I manually provide the geometry column’s name in the latter case, no error is raised but the results are an empty table, but I know there should be positive results. At the very least I don’t think this is intuitive behavior and I
wonder if there’s an OGR bug. Very basic usage, nothing special, no arrow interfacing, etc.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We run a little behind master, at v3.8.1. There were a half dozen or so related changes to gpkg / executesql in the meanwhile but nothing stuck out to me as addressing this issue, but I could be wrong.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Willing to supply both .gpkg files and the associated sql query on request.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,<o:p></o:p></p>
<p class="MsoNormal">Jesse<o:p></o:p></p>
</div>
</body>
</html>