[GRASS-dev] [GRASS GIS] #1494: v.in.ogr key flag does not change category values and you loose connection between features and attributes (was: wish: v.in.ogr add possibility to use existing attribute column as category value, including with -t option)

GRASS GIS trac at osgeo.org
Tue Aug 23 06:14:30 PDT 2016


#1494: v.in.ogr key flag does not change category values and you loose connection
between features and attributes
--------------------------+-------------------------
  Reporter:  mlennert     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  reopened
  Priority:  major        |  Milestone:  7.0.5
 Component:  Vector       |    Version:  svn-trunk
Resolution:               |   Keywords:  v.in.ogr
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------
Changes (by mlennert):

 * status:  closed => reopened
 * priority:  normal => major
 * type:  enhancement => defect
 * resolution:  worksforme =>


Comment:

 Replying to [comment:3 martinl]:
 > `v.in.ogr` in GRASS 7 has `key` parameter which allows you to define key
 column,

 Yes, but apparently it doesn't work:


 {{{
 g.copy vect=boundary_county,bc
 v.db.addcol bc col="newcat int"
 v.db.addcolumn bc col="newcat int"
 v.db.update bc col=newcat qcol=cat+1000
 v.out.ogr bc out=bc
 v.in.ogr bc/bc.shp out=bc_test key=newcat
 v.db.connect -p bc_test
 v.db.univar bc_test col=newcat
 v.category bc_test op=report
 }}}

 You will see that the db connection is correctly defined with the 'newcat'
 column as the key, but the features' category values are still
 automatically generated from 1. You thus loose the connection between
 features and attributes !

 Redefining this as a bug and reopening.

 Moritz

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1494#comment:4>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list