Opened 10 years ago

Closed 10 years ago

#795 closed defect (fixed)

v.out.ogr and centroids in GRASS 6.2.1 and PostGIS

Reported by: hancar Owned by: grass-dev@…
Priority: normal Milestone:
Component: Default Version: unspecified
Keywords: v.out.ogr centroid grass postgis gentoo Cc:
CPU: x86-32 Platform: Linux

Description

v.out.ogr and centroids in GRASS 6.2.1 and PostGIS

As a gentoo user I used GRASS 6.2.1 and PostGIS 1.3.1

The problem is, this command:

v.out.ogr input=soils type=point,line,centroid dsn='PG:host=localhost dbname=spearpg user=postgres' olayer=soils format=PostgreSQL lco='OVERWRITE=YES'

produces many of these print-outs:

Command: INSERT INTO "soils" (wkb_geometry , "cat", "label") VALUES (GeomFromEWKT('SRID=2;LINESTRING (599923.53439599997364 4925869.863033999688923)'::TEXT) , 11, 'CaE')
ERROR 1: INSERT command for new feature failed.
ERROR:  geometry requires more points

whereas this:

 v.out.ogr input=soils type=point,line,boundary dsn='PG:host=localhost dbname=spearpg user=postgres' olayer=soils format=PostgreSQL lco='OVERWRITE=YES'

is OK.

The problem appears when type=cenroid is among parameters. It produces the print-outs and centroids are missing in the output table.

Change History (1)

comment:1 Changed 10 years ago by mmetz

Resolution: fixed
Status: newclosed

Also happened with current release branch and any OGR format. Fixed in relbr6 r39682 because I think it is a bug, centroids could not be exported. Was already fixed in devbr6 and trunk. The memory leaks in relbr6 persist, these are also only fixed in devbr6 and trunk. Just for the record, areas are best exported with v.out.ogr -c type=area. Closing ticket.

Note: See TracTickets for help on using tickets.