Opened 11 years ago
Last modified 6 years ago
#2309 new enhancement
Add a select all flag to v.edit
Reported by: | wenzeslaus | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | 7.6.2 |
Component: | Vector | Version: | svn-trunk |
Keywords: | v.edit, feature selection | Cc: | |
CPU: | Unspecified | Platform: | All |
Description
There is no explicit and documented possibility to select all features when editing using G7:v.edit. This make sense if you edit categories (not geometry) and you want to change the category for all features.
Perhaps -a Select all
flag would be a clear way how to say that I want all features.
Currently you can use the trick with -r Reverse selection
flag but it is not readable, intuitive and it is not clear if this behavior is supported.
Another possible workaround is to get bbox by v.info -g
and pass it as polygon
parameter (ticket:2304#comment:2). This seems inconvenient to me (in Python or in GUI).
Parent ticket: #2304
Example
Prepare test data:
v.in.ascii input=- output=test separator=comma <<EOF 913240.0,250614.0 913250.0,250628.0 EOF
We do not select any features, so selection is empty but we use -r
flag to reverse selection:
v.edit -r map=test tool=catadd layer=2 cats=10
There should be a feature in layer 2 with category 10.
v.what map=test coordinates=913240.0,250614.0
East: 913240 North: 250614 ------------------------------------------------------------------ Map: test Mapset: jr_contours Type: Point Id: 1 Layer: 1 Category: 1 Layer: 2 Category: 10
Attachments (1)
Change History (13)
by , 9 years ago
Attachment: | v_edit_select_all.diff added |
---|
follow-up: 3 comment:1 by , 9 years ago
comment:2 by , 9 years ago
I added a simple test in Bash which currently uses the -r
flag as described in the original report. It would use some review. I'm not really familiar with format of v.category
output.
To test run:
cd vector/v.edit/testsuite ./select_all_flag.sh
comment:3 by , 9 years ago
Replying to mlennert:
I've attached a patch that provides a very simplistic approach to a "select all" flag.
Thanks.
However, reflection is needed on the following questions:
- Should the flag select all features, regardless of whether they have a category number of not ?
- If not should the flag select only features that have category numbers in a given layer ?
In the example in the original report, the layer
option is used to specify the layer to write the categories to, so it cannot be used for selection, so there is no "given layer". And since there is no given layer, there is no way to determine if the features have category or not. So for me the answer for both questions is select regardless of existing category. This will do well for simple cases, I'm not sure if there are any complicated cases when a more sophisticated approach would be appropriate.
comment:6 by , 8 years ago
Milestone: | 7.2.1 → 7.2.2 |
---|
comment:7 by , 7 years ago
Milestone: | 7.2.2 → 7.4.0 |
---|
All enhancement tickets should be assigned to 7.4 milestone.
comment:9 by , 6 years ago
Milestone: | 7.4.1 → 7.4.2 |
---|
comment:10 by , 6 years ago
Milestone: | 7.4.2 → 7.6.0 |
---|
All enhancement tickets should be assigned to 7.6 milestone.
I've attached a patch that provides a very simplistic approach to a "select all" flag. However, reflection is needed on the following questions:
I'm sure there are other questions like that that I haven't even thought about...