[GRASS-dev] v.in.ogr fails to import from PostGIS with schema

Blumentrath, Stefan Stefan.Blumentrath at nina.no
Thu May 30 23:26:30 PDT 2013


Hi Markus

Sorry, good to know. It was HTML indeed.

So here is the problem-description in plain ASCII:

When I try to import a vector map containing (lots of) lines from a certain schema in a PostGIS-database, i get the following error messages:
 v.in.ogr dsn="PG:host=myserver dbname=gisdata" layer="n50_2013_utm33n.n50_2013_arealdekke_lines" output="Test"

(...)

DBMI-SQLite driver error:
Error in sqlite3_prepare():
unrecognized token: "3insert"

DBMI-SQLite driver error:
Error in sqlite3_prepare():
unrecognized token: "3insert"

ERROR: Cannot insert new row: insert into Test values ( 3insert into Test
       values ( 3, NULL, NULL, NULL, NULL, NULL, NULL, 'FiktivDelelinje',
       '1000-01-01 0:00:00', NULL, 101 )


 While other formats with the same data work just fine: 

ogr2ogr -f SQLite /home/stefan/tmp/N50/n50_2013_arealdekke_lin.sqlite "PG:host=myserver dbname=gisdata" n50_2013_utm33n.n50_2013_arealdekke_lines
v.in.ogr dsn=/home/stefan/tmp/N50/n50_2013_arealdekke_lin.sqlite output="N50_2013_arealdekke_lin"This gave no errors... 

Forgot to mention in my earlier post, that also importing polygons from the same PostGIS database (and schema) as the lines works fine:

v.in.ogr dsn="PG:host=myserver dbname=gisdata" layer="n50_2013_utm33n.n50_2013_arealdekke_polygons" output="Test_pol"

Gave no error messages either...

So, maybe it is something with the geometry type?

Cheers
Stefan

-----Original Message-----
From: neteler.osgeo at gmail.com [mailto:neteler.osgeo at gmail.com] On Behalf Of Markus Neteler
Sent: 31. mai 2013 00:22
To: Blumentrath, Stefan
Subject: Re: [GRASS-dev] v.in.ogr fails to import from PostGIS with schema

Hi Stefan,

you message (HTML?) did not contain the relevant error... see below.
It is better to send in pure ASCII...

Best
Markus


On Thu, May 30, 2013 at 9:51 PM, SBL <Stefan.Blumentrath at nina.no> wrote:
> Hi
>
> When I try to to import a vector map containing (lots of) lines from a 
> certain schema in a PostGIS-database, i get the following error messages:
>
>
> While other formats with the same data work just fine:
>
>
> This gave no errors...
>
> I was using GRASS 7 (compiled about a month ago) and PostGIS 2.0.1 / 
> PostgreSQL 9.1 on Ubuntu 12.04 LTS Server.
> Looks like something got mixed up in the insert statement. Is that a 
> known issue or shall I file a ticket?
>
> Cheers
> Stefan
>
>
>
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/v-in-ogr-fails-to-import-from-Post
> GIS-with-schema-tp5057034.html Sent from the Grass - Dev mailing list 
> archive at Nabble.com.
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev


More information about the grass-dev mailing list