[GRASS-dev] [GRASS GIS] #600: d.vect: add new size_column=, rotation_column= options

GRASS GIS trac at osgeo.org
Tue May 12 03:23:44 EDT 2009


#600: d.vect: add new size_column=, rotation_column= options
-------------------------+--------------------------------------------------
 Reporter:  hamish       |       Owner:  grass-dev at lists.osgeo.org
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  6.5.0                    
Component:  Vector       |     Version:  svn-develbranch6         
 Keywords:  d.vect       |    Platform:  All                      
      Cpu:  All          |  
-------------------------+--------------------------------------------------
 Hi,

 it would be nice if d.vect had two new options for display of
 points/icons: size_column= and rotation_column=.

 I think to do it we'd just have to clone the code from the existing
 rgb_column=, wcolumn= options, then:  (as in d.graph)

 {{{
 -  S_stroke(Symb, size, 0.0, 0);
 +  S_stroke(Symb, size, double rotation, 0);
 }}}

 angle is measured in degrees CCW from East.

 we'd have to verify that cats with NULL attributes for rotation angle use
 rotation=0.0 and not just whatever the angle of the last cat was. I guess
 that the wcolumn= option already has code to check that the given column
 is numeric.

 workaround using d.graph:
 {{{
 #spearfish dataset
 #create example values using the cat number for angle
 # rotation is measured in degrees CCW from East

 g.copy vect=archsites,test_rotate
 v.db.addcol test_rotate column='rotation double precision'
 v.db.update test_rotate column=rotation value='CAT'

 v.out.ascii test_rotate column=rotation | \
    awk -F'|' '{printf("rotation %s\nsymbol geology/strike_triangle 12 %s
 %s black black\n", $4, $1, $2)}' \
    > test_rotate_graph.rules

 d.graph -m test_rotate_graph.rules
 d.vect test_rotate disp=cat yref=top
 }}}


 thanks,
 Hamish

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


More information about the grass-dev mailing list