<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>I've given this a crack at
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/9609">https://github.com/OSGeo/gdal/pull/9609</a></p>
<p>The newly introduced LAUNDER option for GeoPackage is indeed
quite "extreme" compared to the existing ones, hence I've
defaulted it to NO.</p>
<p>I've also added a LAUNDER_ASCII option to PG/PGDump to do
something similar to GeoPackage LAUNDER.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 03/04/2024 à 17:50, Rahkonen Jukka
via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:DB9PR09MB6887913BB1CC2E8420C4A020FD3D2@DB9PR09MB6887.eurprd09.prod.outlook.com">
<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:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}span.Shkpostityyli18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
mso-ligatures:none;
mso-fareast-language:EN-US;}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="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">The
GeoPackage standard recommends some laundering to be done by
the clients:<br>
<br>
Implementers should be aware of the fact that SQLite table
names are not case<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">sensitive
and that table names in sqlite_master and gpkg_extensions
may not have<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">the same
case. When searching for table name references, it is
recommended to<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">transform
table names to lower case with the lower() function. See the
Abstract<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">Test Suite
for an example.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">If GeoNode
does not have any other reason for its requirement than what
you have pointed out, then maybe it is too strict.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">Having
launder in GPKG driver feels still reasonable. SQLite driver
has it already
<a href="https://gdal.org/drivers/vector/sqlite.html"
moz-do-not-send="true" class="moz-txt-link-freetext">https://gdal.org/drivers/vector/sqlite.html</a>.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US"><br>
“LAUNDER=[YES/NO]: Defaults to YES. Controls whether layer
and field names will be laundered for easier use in SQLite.
Laundered names will be converted to lower case and some
special characters(' - #) will be changed to underscores.”<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">It is either
not documented or not implemented, but laundering
identifiers to work without "quotas" would also require
removing numbers from the beginning of the name. And at
least % should be added to the list of special characters.
But total laundering requires quite a lot
<a href="https://www.sqlite.org/draft/tokenreq.html"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.sqlite.org/draft/tokenreq.html</a>.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">Laundering
characters like äöå for GeoNode feels too much. Who would
say into what characters to launder?<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US">-Jukka
Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> 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>Robert Hewlett via gdal-dev<br>
<b>Lähetetty:</b> keskiviikko 3. huhtikuuta 2024 17.51<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] LAUNDER option for geopackages<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Is there a LAUNDER for geopackages?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I ask this because at the following
site:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a
href="https://www.geopackage.org/guidance/getting-started.html"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.geopackage.org/guidance/getting-started.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Gives this specific guidance:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Note: <b>For maximum interoperability,</b>
start your database identifiers (table names, column
names, etc.) with a lowercase character and only use
<b>lowercase characters</b>, numbers 0-9, and underscores
(_).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Which then turned into a <b>constraint</b> in
GeoNode (I could not upload a certain geopackage from the
township of langley) where I eventually discovered in the
celery logs this error:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">ERROR/ForkPoolWorker-958]
{'validation_code': 'RQ1', 'validation_description':
'Layer names must start with a letter, and
<b>valid char<br>
acters are lowercase a-z</b>, numbers or underscores.',
'level': 'error', 'locations': ['Error layer:
Parcel_Attributes']}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I would love LAUNDER to be a more
global option.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Upper for: Oracle and Shapefiles.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Lower for: Postgresql, Mysql,
geopackages<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Just wondering,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Rob<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</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>