[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    Re: [GRASS-user] Error when importing gml file
From:       Markus Neteler <neteler () osgeo ! org>
Date:       2020-02-21 15:12:39
Message-ID: CALFmHhuZo1jkmrDZbOUX-wV0EqYsnfw0DMLx7M4+vOKusHsmqw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Johannes,



Johannes Radinger <johannesradinger@gmail.com> 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 </.../FLUSSORDNUNGSZAHL_NGP2015.gml> ...
> Check if OGR layer <Watercourse> contains polygons...
> Creating attribute table for layer <Watercourse>...
> Default driver / database set to:
> driver: sqlite
> database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
> Column name <inspireId|Identifier|localId> renamed to
> <inspireId_Identifier_localId>
> Column name <inspireId|Identifier|namespace> renamed to
> <inspireId_Identifier_namespace>
> 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
> </..../FLUSSORDNUNGSZAHL_NGP2015.gml>
> ################
>
> 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

[Attachment #5 (text/html)]

<div dir="auto"><div>Hi Johannes,<div dir="auto"><br></div><br><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Johannes Radinger &lt;<a \
href="mailto:johannesradinger@gmail.com">johannesradinger@gmail.com</a>&gt; schrieb \
am Fr., 21. Feb. 2020, 15:13:<br></div><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
dir="ltr"><div>Hi all,</div><div>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.  \
</div><div><br></div><div>I can imagine it might be related to some attribute names?! \
Is the attribute name &#39;order&#39; not a valid column name as ORDER is also an \
sqlite command?  Anybody any ideas what&#39;s wrong with the file or the import? \
</div><div><br></div><div>cheers,</div><div>Johannes</div><div><br></div><div>#############################</div>Importing \
&lt;/.../FLUSSORDNUNGSZAHL_NGP2015.gml&gt; ...<br>Check if OGR layer \
&lt;Watercourse&gt; contains polygons...<br>Creating attribute table for layer \
&lt;Watercourse&gt;...<br>Default driver / database set to:<br>driver: \
sqlite<br>database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db<br>Column name \
&lt;inspireId|Identifier|localId&gt; renamed to \
&lt;inspireId_Identifier_localId&gt;<br>Column name \
&lt;inspireId|Identifier|namespace&gt; renamed to \
&lt;inspireId_Identifier_namespace&gt;<br>DBMI-SQLite driver error:<br>Error in \
sqlite3_prepare():<br>near &quot;order&quot;: syntax error<br>DBMI-SQLite driver \
error:<br>Error in sqlite3_prepare():<br>near &quot;order&quot;: syntax \
error<br>ERROR: Unable to create table: &#39;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 )</div></blockquote></div></div><div \
dir="auto"><br></div><div dir="auto">^-- order is a reserved SQL word, please rename \
the column before importing.</div><div dir="auto"><br></div><div \
dir="auto">HTH,</div><div dir="auto">Markus</div><div dir="auto"><br></div><div \
dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">, orderScheme varchar ( 83 ), scope varchar ( \
8 ), width text)&#39;<br>ERROR: Unable to import OGR datasource \
&lt;/..../FLUSSORDNUNGSZAHL_NGP2015.gml&gt;<br>################<div><br></div><div>My \
system:</div><div>GRASS version: <a href="http://7.9.dev" target="_blank" \
rel="noreferrer">7.9.dev</a>                                                          \
<br>Code revision: ac8bd2777                                                          \
<br>Build date: 2020-01-21                                                            \
<br>Build platform: x86_64-pc-linux-gnu                                               \
<br>GDAL: 2.2.3                                                                       \
<br>PROJ: 4.9.3                                                                       \
<br>GEOS: 3.6.2                                                                       \
<br>SQLite: 3.22.0                                                                    \
<br>Python: 3.6.9                                                                     \
<br>wxPython: 4.0.1  <br><div>                                <br></div></div></div> \
_______________________________________________<br> grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank" \
rel="noreferrer">grass-user@lists.osgeo.org</a><br> <a \
href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer \
noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a></blockquote></div></div></div>



[Attachment #6 (text/plain)]

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic