On Fri, Jul 5, 2013 at 10:02 AM, Blumentrath, Stefan <stefan.blumentr...@nina.no> wrote: > Dear all > > I am reposting this message, because the problem, that I cannot import lines > from PostGIS is still present in GRASS 7 svn-revision 57009 (and in 6.4.3svn > (older revision) too.) > Do you think this is only due to my PostGIS og GDAL/OGR installation, or > shall I file a ticket?
Please try trunk r57016. If this works for you, the changes should be backported. > > Another (much less important) thing here is, that the status message says: > "Counting polygons for 6125184 features (OGR layer > <n50_2013_utm33n.n50_2013_arealdekke_lines>)..." > although the layer only contains (6125184) lines... The module only knows if a layer only contains lines after it went through all features. In this case the polygon count will be zero. Unless you use v.in.ogr type=boundary in which case lines will be converted to boundaries. Markus M > > Cheers > Stefan > > -----Original Message----- > From: grass-dev-boun...@lists.osgeo.org > [mailto:grass-dev-boun...@lists.osgeo.org] On Behalf Of Blumentrath, Stefan > Sent: 31. mai 2013 08:27 > To: Markus Neteler; grass-dev@lists.osgeo.org > Subject: Re: [GRASS-dev] v.in.ogr fails to import from PostGIS with schema > > 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.os...@gmail.com [mailto:neteler.os...@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.blumentr...@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@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/grass-dev > _______________________________________________ > grass-dev mailing list > grass-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-dev > _______________________________________________ > grass-dev mailing list > grass-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-dev _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev