#3528: v.random restrict  join attributes
--------------------------------------------+-------------------------
 Reporter:  martinl                         |      Owner:  grass-dev@…
     Type:  enhancement                     |     Status:  new
 Priority:  normal                          |  Milestone:  7.4.1
Component:  Vector                          |    Version:  unspecified
 Keywords:  v.random, restrict, attributes  |        CPU:  Unspecified
 Platform:  Unspecified                     |
--------------------------------------------+-------------------------
 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.

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

_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to