Opened 5 years ago

Last modified 4 years ago

#3700 new enhancement

Enhancement of v.extract to include a new output_layer parameter

Reported by: jradinger Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Vector Version: unspecified
Keywords: Cc:
CPU: Unspecified Platform: All

Description

Based on a 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.

Change History (1)

comment:1 by neteler, 4 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.