Opened 6 years ago
Closed 5 years ago
#3528 closed enhancement (fixed)
v.random restrict join attributes
| Reported by: | martinl | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.6.2 |
| Component: | Vector | Version: | svn-trunk |
| Keywords: | v.random, restrict, attributes | Cc: | |
| CPU: | Unspecified | Platform: | Unspecified |
Description
Currently G7:v.random with restrict parameter transfers categories (if layer > 0) but not attributes itself.
#v.random out=test n=5 --o restrict=geology layer=1 $ v.category test opt=print 28/1 450/2 28/3 21/4 28/5 $ v.db.select test ERROR: Database connection not defined for layer <1>
Categories allows user to join attributes but it's quite tricky. This ticket suggests to join attributes automatically.
$ v.random out=test n=5 --o restrict=geology layer=1 $ v.db.select test cat|geology_cat|geology_onemap_pro|geology_PERIMETER|geology_GEOL250_|geology_GEOL250_ID|geology_GEO_NAME|geology_SHAPE_area|geology_SHAPE_len 1|5|0|0|6|5|Ybgg|0|0 2|1093|0|0|1094|1093|Kb|0|0 3|1118|0|0|1119|1118|Kp|0|0 4|537|0|0|538|537|Qp|0|0 5|1135|0|0|1136|1135|Km|0|0
Attributes will be transferred similarly to categories only if layer > 0.
Attachments (1)
Change History (11)
comment:1 by , 6 years ago
| Version: | unspecified → svn-trunk |
|---|
comment:2 by , 6 years ago
comment:3 by , 6 years ago
Replying to martinl:
Currently G7:v.random with
restrictparameter transfers categories (iflayer> 0) but not attributes itself.#v.random out=test n=5 --o restrict=geology layer=1 $ v.category test opt=print 28/1 450/2 28/3 21/4 28/5 $ v.db.select test ERROR: Database connection not defined for layer <1>Categories allows user to join attributes but it's quite tricky. This ticket suggests to join attributes automatically.
$ v.random out=test n=5 --o restrict=geology layer=1 $ v.db.select test cat|geology_cat|geology_onemap_pro|geology_PERIMETER|geology_GEOL250_|geology_GEOL250_ID|geology_GEO_NAME|geology_SHAPE_area|geology_SHAPE_len 1|5|0|0|6|5|Ybgg|0|0 2|1093|0|0|1094|1093|Kb|0|0 3|1118|0|0|1119|1118|Kp|0|0 4|537|0|0|538|537|Qp|0|0 5|1135|0|0|1136|1135|Km|0|0Attributes will be transferred similarly to categories only if
layer> 0.
+1
by , 6 years ago
| Attachment: | v-random-restrict-attr.diff added |
|---|
comment:4 by , 6 years ago
| Milestone: | 7.4.1 → 7.4.2 |
|---|
comment:6 by , 6 years ago
| Milestone: | 7.4.2 → 7.6.0 |
|---|
All enhancement tickets should be assigned to 7.6 milestone.
comment:10 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

Patch for testing attached attachment:v-random-restrict-attr.diff