[gdal-dev] VPF to GPKG translation with Latin-1 encoded strings

Philippe Ghesquiere philippe.ghesquiere at airbus.com
Tue Sep 12 04:35:24 PDT 2023


Dear all,

I need some help to deal with a VPF data set.

*Environment :*

   - Windows 10
   - Gdal V3.5.0

*Context :*

I have a VPF vector set I try to convert to Geopackage. Some strings are
Latin-1 encoded (ISO-8859-1).

The OGR_OGDI plugin supports this specific encoding, but the GPKG format
does not. Thus, Latin-1 encoded text strings are saved as "BLOB".

So far, I have tried 2 ways to convert my VPF data :

1) Direct conversion to GPKG :
ogr2ogr -f GPKG mig040.gpkg
gltp:/vrf/e:/KIT_GEOCAPI_v3.0/02_Donnees_Test-Mires/BAO_M011_Ed1/VPF/MIG040/EURNASIA/MIG_040
<http://gltp/vrf/e:/KIT_GEOCAPI_v3.0/02_Donnees_Test-Mires/BAO_M011_Ed1/VPF/MIG040/EURNASIA/MIG_040>
"transtxt at trans(*)_text"

Text is saved as "BLOB".

I have tried several options (-lco, -oo, -doo, with SHAPE_ENCODING
configuration variable, ...) with no success.

2) Two-step conversion

ogr2ogr mig040.shp
gltp:/vrf/e:/KIT_GEOCAPI_v3.0/02_Donnees_Test-Mires/BAO_M011_Ed1/VPF/MIG040/EURNASIA/MIG_040
<http://gltp/vrf/e:/KIT_GEOCAPI_v3.0/02_Donnees_Test-Mires/BAO_M011_Ed1/VPF/MIG040/EURNASIA/MIG_040>
"transtxt at trans(*)_text"

ogr2ogr -f GPKG mig040.gpkg mig040.shp

Text is saved as UTF-8

*My question :*

Is there a way to convert directly to GPKG with UTF-8 text conversion ?

N.B. : I can share the data set. How can I do it ?


Philippe
The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230912/ea43bb2a/attachment.htm>


More information about the gdal-dev mailing list