Changes between Initial Version and Version 9 of Ticket #6447


Ignore:
Timestamp:
Apr 19, 2016, 12:46:07 AM (8 years ago)
Author:
hansw
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6447 – Description

    initial v9  
    22
    33I'm using GDAL 2.1.0beta1, (released 2016/04/01) under Windows 7 x64. [http://download.gisinternals.com/sdk/downloads/release-1800-x64-gdal-mapserver.zip Source][[BR]][[BR]]
    4 I'm exporting geodata from from a Spatialite table to a Schapfile using the comandline. It usualy works fine exept when there is a "§", "ß", "ö", "ä" or "ü" in the table name. Here is my comand line:[[BR]]
     4I'm exporting geodata from from a Spatialite table to a Schapfile using the command line. It usually works fine except when there is a "§", "ß", "ö", "ä" or "ü" in the table name.[[BR]]
     5I created a test Spatialite (sqlite) DB.[[BR]]
     6As the attached file upload size is under 1MB I uploaded the file to:
     7​[http://www.file-upload.net/download-11474575/importTest.sqlite.html]
     8[[BR]]
     9To see the table name error use this command line.
    510{{{
    6 ogr2ogr.exe -f "ESRI Shapefile" "C:\exportTest.shp" "C:\importTest.sqlite" -lco "ENCODING=ISO-8859-1" -lco "SPATIAL_INDEX=YES" -sql "SELECT \"exportTest.the_geom\" AS \"the_geom\", \"exportTest.id\" AS \"id\" FROM \"straßenExport\";" -t_srs "EPSG:4326"
     11ogr2ogr.exe -f "ESRI Shapefile" "C:\exportTest.shp" "C:\importTest.sqlite" -lco "ENCODING=ISO-8859-1" -lco "SPATIAL_INDEX=YES" -sql "SELECT \"straßenExport\".\"the_geom\", \"straßenExport\".\"id\" AS \"ident\" FROM \"straßenExport\";" -t_srs "EPSG:4326"
    712}}}
    8 Then following error message appears:
     13Gives following error:
    914{{{
    10 ERROR 1: In ExecuteSQL(): sqlite3_prepare(SELECT "exportTest.the_geom" AS "the_geom", "exportTest.id" AS "id" FROM "straßenExport";):,   no such table: straßenExport
     15ERROR 1: In ExecuteSQL(): sqlite3_prepare(SELECT "stra+âenExport"."the_geom", "stra+âenExport"."id" AS "ident" FROM "stra+âenExport";):  no such table: stra+âenExport
    1116}}}
     17When using "§", "ö", "ä" or "ü" in the column name the export of this column does not work properly too. In my case the values of this attribute are overwritten with the original column name.
    1218[[BR]]
    13 When using "§", "ö", "ä" or "ü" in the column name there is no error message but the export of this column does not work properly too. In my case the values of this attribute are overwritten with the original column name.
    14 [[BR]][[BR]]
     19To see the column error use this command line.
     20{{{
     21ogr2ogr.exe -f "ESRI Shapefile" "C:\exportTest.shp" "C:\importTest.sqlite" -lco "ENCODING=ISO-8859-1" -lco "SPATIAL_INDEX=YES" -sql "SELECT \"strassenExport\".\"the_geom\", \"strassenExport\".\"idä\" AS \"id\" FROM \"strassenExport\";" -t_srs "EPSG:4326"
     22}}}
     23Gives following error:
     24{{{
     25ERROR 1: In ExecuteSQL(): sqlite3_prepare(SELECT "strassenExport"."the_geom", "strassenExport"."id+±" AS "id" FROM "strassenExport";):
     26  no such column: strassenExport.id+±
     27}}}
     28
     29[[BR]]
    1530They are valid ISO-8859-1 characters and not UTF-8 only. I don't understand why they create this issues. As I used qualified identifiers the use of an them in the table name should not be a problem. GDAL > 2.0.0 supports qualified identifiers.
     31[[BR]]
     32I have problems believing it is a windows command line encoding problem as I already used this characters in filenames and GDAL has no problem reading them.
     33[[BR]]
     34[[BR]]
     35(Updated the ticket according to the discussion below)