#2460: v.out.postgis doesn't export attribute table
---------------------------+------------------------------------------------
Reporter: martin | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: svn-trunk
Keywords: v.out.postgis | Platform: Linux
Cpu: x86-64 |
---------------------------+------------------------------------------------
Attribute table has one column.[[BR]]
"v.out.ogr" creates a proper column in PostGIS accordingly,
"v.out.postgis" doesn't.
{{{
GRASS 7.1.svn > v.out.postgis input=newcs_errorW_full type=area
olayer=newcs_full_pg \
dsn="PG:host=${PGHOST} dbname=${PGDATABASE} user=${PGUSER}" \
options="FID=ogc_fid, GEOMETRY_NAME=wkb_geometry, SPATIAL_INDEX=YES,
PRIMARY_KEY=YES, SRID=4326" \
--verbose --overwrite
WARNING: PostGIS layer <public.newcs_full_pg> already exists and will be
overwritten
Using PostGIS format
Building spatial index on <wkb_geometry>...
Copying features (polygon)...
100%
Exporting areas...
100%
Building topology for vector map <newcs_full_pg@nlcd2011error>...
Using external data format 'PostgreSQL' (feature type 'polygon')
Building pseudo-topology over simple features...
Registering primitives...
26401 primitives registered
4296855 vertices registered
Topology was built
Number of nodes: 11427
Number of primitives: 26401
Number of points: 0
Number of lines: 0
Number of boundaries: 14330
Number of centroids: 12071
Number of areas: 14330
Number of isles: 14330
v.out.postgis complete. 12071 features (polygon type) written to
<newcs_full_pg>.
}}}
{{{
GRASS 7.1.svn > v.out.ogr input=newcs_errorW_full type=area
olayer=newcs_full_ogr format=PostgreSQL \
dsn="PG:host=${PGHOST} dbname=${PGDATABASE} user=${PGUSER}" \
--verbose --overwrite
Warning 1: Multi-column primary key in 'fgs_overrides' detected but not
supported.
WARNING: OGR layer <newcs_full_ogr> already exists and will be overwritten
Exporting 12071 areas (may take some time)...
100%
v.out.ogr complete. 12071 features (Polygon type) written to
<newcs_full_ogr> (PostgreSQL format).
}}}
{{{
ATTENTION: Unsupported geometry type (8)
ATTENTION: Unable to write feature in vector map <censusblk_swwake>
ERREUR :Feature type 8 is not supported
Erreur de segmentation
}}}
#2460: v.out.postgis doesn't export attribute table
---------------------------+------------------------------------------------
Reporter: martin | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Default | Version: svn-trunk
Keywords: v.out.postgis | Platform: Linux
Cpu: x86-64 |
---------------------------+------------------------------------------------
Comment(by mlennert):
The following patch apparently "solves" the problem for me, but I don't
know what consequences this might have, nor why it works as I don't get a
fatal error anyhow...
- /* check output type */
- if (otype > 0) { /* type is not 'auto' */
+ /* check output type
+ if (otype > 0) { type is not 'auto'
if (Vect_write_line(&Out, otype, NULL, NULL) < 0)
G_fatal_error(_("Feature type %d is not supported"), otype);
}
+ */
/* copy attributes */
field = Vect_get_field_number(&In, params.layer->answer);
}}}