[GRASS-dev] [GRASS GIS] #3700: Enhancement of v.extract to include a new output_layer parameter

GRASS GIS trac at osgeo.org
Wed Nov 28 05:18:07 PST 2018


#3700: Enhancement of v.extract to include a new output_layer parameter
-------------------------+-------------------------
 Reporter:  jradinger    |      Owner:  grass-dev@…
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:
Component:  Vector       |    Version:  unspecified
 Keywords:               |        CPU:  Unspecified
 Platform:  All          |
-------------------------+-------------------------
 Based on a [http://osgeo-org.1560.x6.nabble.com/v-extract-and-layer-table-
 settings-with-layer-2-td5387237.html mailing list discussion] I suggest an
 enhancement of `v.extract` to include a new output_layer parameter.

 This would be needed/useful when extracting features from a map from e.g.
 layer 2 and the result should be map with a (single) layer 1. For example,
 if features from layer=2 are extracted using current version of
 `v.extract` the procedure is complicated and requires four steps because
 `v.extract` does not change the the layer/table bindings:

 1) `v.extract input=mymap1 layer=2 where='mycol=x' output=mymap2`
 The resulting 'mymap2' has an attribute table connected to layer 2 and
 there are no other layers (e.g. there is no layer 1, which is considered
 in most grass tools as default layer).

 2) `v.category option=chlayer layer='2,1' input=mymap2 output=mymap3`

 3) `v.db.connect -d layer=2 map=mymap3`

 4) `v.db.connect layer=1 map=mymap3 table=mymap3`

 For such a task, the best would probably be some form of output_layer
 parameter in `v.extract`, probably with a default of 1.

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



More information about the grass-dev mailing list