[GRASS-dev] [GRASS GIS] #2460: v.out.postgis doesn't export attribute table

GRASS GIS trac at osgeo.org
Thu Oct 23 02:08:55 PDT 2014


#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 at 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>.
 }}}


 {{{
 landcover=> \d newcs_full_pg
                                       Table "public.newcs_full_pg"
     Column    |          Type          |
 Modifiers
 --------------+------------------------+-----------------------------------------------------------------
  ogc_fid      | integer                | not null default
 nextval('newcs_full_pg_ogc_fid_seq'::regclass)
  cat          | integer                |
  wkb_geometry | geometry(Polygon,4326) |
 Indexes:
     "newcs_full_pg_pkey" PRIMARY KEY, btree (ogc_fid)
     "newcs_full_pg_cat_idx" btree (cat)
     "newcs_full_pg_wkb_geometry_idx" gist (wkb_geometry)
 }}}


 {{{
 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).
 }}}


 {{{
 landcover=> \d newcs_full_ogr
                                        Table "public.newcs_full_ogr"
     Column    |          Type           |
 Modifiers
 --------------+-------------------------+------------------------------------------------------------------
  ogc_fid      | integer                 | not null default
 nextval('newcs_full_ogr_ogc_fid_seq'::regclass)
  wkb_geometry | geometry(Polygon,4326)  |
  cat          | integer                 |
  pglayer      | character varying(1000) |
 Indexes:
     "newcs_full_ogr_pk" PRIMARY KEY, btree (ogc_fid)
     "newcs_full_ogr_geom_idx" gist (wkb_geometry)
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2460>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list