[GRASS-dev] [GRASS GIS] #322: Exporting centroids

#322: Exporting centroids
------------------------------+---------------------------------------------
Reporter: gridcell | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0
Keywords: v.out.ogr export | Platform: Linux
      Cpu: x86-32 |
------------------------------+---------------------------------------------
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')

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/322&gt;
GRASS GIS <http://grass.osgeo.org>

#322: Exporting centroids
-----------------------+----------------------------------------------------
  Reporter: gridcell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0
Resolution: | Keywords: v.out.ogr export
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by hamish):

Replying to [ticket:322 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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/322#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#322: Exporting centroids
------------------------+---------------------------------------------------
  Reporter: gridcell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0
Resolution: duplicate | Keywords: v.out.ogr export
  Platform: Linux | Cpu: x86-32
------------------------+---------------------------------------------------
Changes (by mmetz):

  * status: new => closed
  * resolution: => duplicate

Comment:

dupe of #795, fixed in Nov 2009

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/322#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>