Hi,
I've given this a crack at https://github.com/OSGeo/gdal/pull/9609
The newly introduced LAUNDER option for GeoPackage is indeed quite
"extreme" compared to the existing ones, hence I've defaulted it to NO.
I've also added a LAUNDER_ASCII option to PG/PGDump to do something
similar to GeoPackage LAUNDER.
Even
Le 03/04/2024 à 17:50, Rahkonen Jukka via gdal-dev a écrit :
Hi,
The GeoPackage standard recommends some laundering to be done by the
clients:
Implementers should be aware of the fact that SQLite table names are
not case
sensitive and that table names in sqlite_master and gpkg_extensions
may not have
the same case. When searching for table name references, it is
recommended to
transform table names to lower case with the lower() function. See the
Abstract
Test Suite for an example.
If GeoNode does not have any other reason for its requirement than
what you have pointed out, then maybe it is too strict.
Having launder in GPKG driver feels still reasonable. SQLite driver
has it already https://gdal.org/drivers/vector/sqlite.html.
“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.”
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 https://www.sqlite.org/draft/tokenreq.html.
Laundering characters like äöå for GeoNode feels too much. Who would
say into what characters to launder?
-Jukka Rahkonen-
*Lähettäjä:* gdal-dev <gdal-dev-boun...@lists.osgeo.org> *Puolesta
*Robert Hewlett via gdal-dev
*Lähetetty:* keskiviikko 3. huhtikuuta 2024 17.51
*Vastaanottaja:* gdal-dev@lists.osgeo.org
*Aihe:* [gdal-dev] LAUNDER option for geopackages
Hi,
Is there a LAUNDER for geopackages?
I ask this because at the following site:
https://www.geopackage.org/guidance/getting-started.html
Gives this specific guidance:
Note: *For maximum interoperability,* start your database identifiers
(table names, column names, etc.) with a lowercase character and only
use *lowercase characters*, numbers 0-9, and underscores (_).
Which then turned into a *constraint* in GeoNode (I could not upload a
certain geopackage from the township of langley) where I eventually
discovered in the celery logs this error:
ERROR/ForkPoolWorker-958] {'validation_code': 'RQ1',
'validation_description': 'Layer names must start with a letter, and
*valid char
acters are lowercase a-z*, numbers or underscores.', 'level': 'error',
'locations': ['Error layer: Parcel_Attributes']}
I would love LAUNDER to be a more global option.
Upper for: Oracle and Shapefiles.
Lower for: Postgresql, Mysql, geopackages
Just wondering,
Rob
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev