Changes between Initial Version and Version 9 of Ticket #6447
- Timestamp:
- Apr 19, 2016, 12:46:07 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6447 – Description
initial v9 2 2 3 3 I'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]] 4 I'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]] 5 I created a test Spatialite (sqlite) DB.[[BR]] 6 As 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]] 9 To see the table name error use this command line. 5 10 {{{ 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"11 ogr2ogr.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" 7 12 }}} 8 Then following error message appears:13 Gives following error: 9 14 {{{ 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ßenExport15 ERROR 1: In ExecuteSQL(): sqlite3_prepare(SELECT "stra+âenExport"."the_geom", "stra+âenExport"."id" AS "ident" FROM "stra+âenExport";): no such table: stra+âenExport 11 16 }}} 17 When 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. 12 18 [[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]] 19 To see the column error use this command line. 20 {{{ 21 ogr2ogr.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 }}} 23 Gives following error: 24 {{{ 25 ERROR 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]] 15 30 They 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]] 32 I 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)