Opened 15 years ago

Closed 14 years ago

#322 closed defect (duplicate)

Exporting centroids

Reported by: gridcell Owned by: grass-dev@…
Priority: minor Milestone: 6.4.0
Component: Default Version: 6.3.0
Keywords: v.out.ogr export Cc:
CPU: x86-32 Platform: Linux

Description

Unable to export centroids to PostGIS (or Shapefile) using v.out.ogr...

v.out.ogr input=blk@PERMANENT type=point,centroid 'dsn=PG: host=localhost user=postgres dbname=test' olayer=blk layer=1 format=PostgreSQL

I get the following in my output...

6 Boundary(ies) found, but not requested to be exported. Verify 'type' parameter.

Exporting 9 points/lines...

ERROR 1: INSERT command for new feature failed. ERROR: geometry requires more points

Command: INSERT INTO "blk" (wkb_geometry , "cat", "comments") VALUES (GeomFromEWKT('SRID=32768;LINESTRING (1361422.480504325358197 586604.790284495218657)'::TEXT) , 1, 'Polygon 1') ERROR 1: INSERT command for new feature failed. ERROR: geometry requires more points

Command: INSERT INTO "blk" (wkb_geometry , "cat", "comments") VALUES (GeomFromEWKT('SRID=32768;LINESTRING (1361632.899105372838676 586307.90450647752732)'::TEXT) , 2, 'Polygon 2')

ERROR 1: INSERT command for new feature failed. ERROR: geometry requires more points

Command: INSERT INTO "blk" (wkb_geometry , "cat", "comments") VALUES (GeomFromEWKT('SRID=32768;LINESTRING (1361538.573653233936056 586446.606141098076478)'::TEXT) , 1, 'Polygon 1') ERROR 1: INSERT command for new feature failed. ERROR: geometry requires more points

Command: INSERT INTO "blk" (wkb_geometry , "cat", "comments") VALUES (GeomFromEWKT('SRID=32768;LINESTRING (1361538.573653233936056 586446.606141098076478)'::TEXT) , 2, 'Polygon 2')

Change History (2)

in reply to:  description comment:1 by hamish, 14 years ago

Replying to gridcell:

Unable to export centroids to PostGIS (or Shapefile) using v.out.ogr...

v.out.ogr input=blk@PERMANENT type=point,centroid 'dsn=PG: host=localhost user=postgres dbname=test' olayer=blk layer=1 format=PostgreSQL

I get the following in my output...

> 6 Boundary(ies) found, but not requested to be exported. Verify 'type' parameter.
> 
> Exporting 9 points/lines...
> 
> ERROR 1: INSERT command for new feature failed.
> ERROR:  geometry requires more points
> 
> Command: INSERT INTO "blk" (wkb_geometry , "cat", "comments") VALUES (GeomFromEWKT('SRID=32768;LINESTRING (1361422.480504325358197 586604.790284495218657)'::TEXT) , 1, 'Polygon 1')
> ERROR 1: INSERT command for new feature failed.
> ERROR:  geometry requires more points

centroids being send at type LINESTRING()? (which then wants at least 2 points to make a line)

what if you extract the centoids to their own map first?

do PostGIS/Shapefile/Simple Features have any concept of centroids?

Hamish

comment:2 by mmetz, 14 years ago

Resolution: duplicate
Status: newclosed

dupe of #795, fixed in Nov 2009

Note: See TracTickets for help on using tickets.