Re: [GRASS-user] Error when importing gml file

2020-02-21 Thread Markus Neteler
Hi Johannes,



Johannes Radinger  schrieb am Fr., 21. Feb.
2020, 15:13:

> Hi all,
> I am trying to import a *.gml file which I received from a governmental
> agency. However when trying v.import I get an error message (see below). I
> can successfully import the file in QGIS (and display the attribute table).
> Other gml files from the same region and from the same provider work also.
>
> I can imagine it might be related to some attribute names?! Is the
> attribute name 'order' not a valid column name as ORDER is also an sqlite
> command? Anybody any ideas what's wrong with the file or the import?
>
> cheers,
> Johannes
>
> #
> Importing  ...
> Check if OGR layer  contains polygons...
> Creating attribute table for layer ...
> Default driver / database set to:
> driver: sqlite
> database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> Column name  renamed to
> 
> Column name  renamed to
> 
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> near "order": syntax error
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> near "order": syntax error
> ERROR: Unable to create table: 'create table Watercourse (cat integer,
> gml_id text, language varchar ( 3 ), nativeness text, sourceOfName text,
> pronunciation text, text varchar ( 90 ), script varchar ( 4 ),
> transliterationScheme text, grammaticalGender text, grammaticalNumber text,
> classificationScheme varchar ( 8 ), localId integer, namespace varchar ( 83
> ), beginLifespanVersion varchar ( 25 ), inspireId_Identifier_localId
> integer, inspireId_Identifier_namespace varchar ( 83 ), versionId varchar (
> 5 ), origin text, persistence text, tidal text, drainsBasin text,
> delineationKnown integer, length double precision, length_uom varchar ( 1
> ), level text, order varchar ( 36 )
>

^-- order is a reserved SQL word, please rename the column before importing.

HTH,
Markus


, orderScheme varchar ( 83 ), scope varchar ( 8 ), width text)'
> ERROR: Unable to import OGR datasource
> 
> 
>
> My system:
> GRASS version: 7.9.dev
>
> Code revision: ac8bd2777
>
> Build date: 2020-01-21
>
> Build platform: x86_64-pc-linux-gnu
>
> GDAL: 2.2.3
>
> PROJ: 4.9.3
>
> GEOS: 3.6.2
>
> SQLite: 3.22.0
>
> Python: 3.6.9
>
> wxPython: 4.0.1
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] Error when importing gml file

2020-02-21 Thread Johannes Radinger
Hi all,
I am trying to import a *.gml file which I received from a governmental
agency. However when trying v.import I get an error message (see below). I
can successfully import the file in QGIS (and display the attribute table).
Other gml files from the same region and from the same provider work also.

I can imagine it might be related to some attribute names?! Is the
attribute name 'order' not a valid column name as ORDER is also an sqlite
command? Anybody any ideas what's wrong with the file or the import?

cheers,
Johannes

#
Importing  ...
Check if OGR layer  contains polygons...
Creating attribute table for layer ...
Default driver / database set to:
driver: sqlite
database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
Column name  renamed to

Column name  renamed to

DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "order": syntax error
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "order": syntax error
ERROR: Unable to create table: 'create table Watercourse (cat integer,
gml_id text, language varchar ( 3 ), nativeness text, sourceOfName text,
pronunciation text, text varchar ( 90 ), script varchar ( 4 ),
transliterationScheme text, grammaticalGender text, grammaticalNumber text,
classificationScheme varchar ( 8 ), localId integer, namespace varchar ( 83
), beginLifespanVersion varchar ( 25 ), inspireId_Identifier_localId
integer, inspireId_Identifier_namespace varchar ( 83 ), versionId varchar (
5 ), origin text, persistence text, tidal text, drainsBasin text,
delineationKnown integer, length double precision, length_uom varchar ( 1
), level text, order varchar ( 36 ), orderScheme varchar ( 83 ), scope
varchar ( 8 ), width text)'
ERROR: Unable to import OGR datasource 


My system:
GRASS version: 7.9.dev

Code revision: ac8bd2777

Build date: 2020-01-21

Build platform: x86_64-pc-linux-gnu

GDAL: 2.2.3

PROJ: 4.9.3

GEOS: 3.6.2

SQLite: 3.22.0

Python: 3.6.9

wxPython: 4.0.1
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user