[GRASS-dev] Re: [GRASS GIS] #64: ps.map: patch to set customized scalebar units

GRASS GIS trac at osgeo.org
Sun Sep 14 20:27:11 EDT 2008


#64: ps.map: patch to set customized scalebar units
--------------------------+-------------------------------------------------
  Reporter:  alf          |       Owner:  hamish   
      Type:  enhancement  |      Status:  closed   
  Priority:  minor        |   Milestone:  6.4.0    
 Component:  ps.map       |     Version:  svn-trunk
Resolution:  fixed        |    Keywords:  scalebar 
  Platform:  All          |         Cpu:  All      
--------------------------+-------------------------------------------------
Comment (by hamish):

 (related)
 I have added some code to ps.map's floating point (smooth) colortable
 legend which will print a label for the map's data units if present.
 Data units can be set with r.support.

 I am not very happy with the x placement. The offset to the right is
 currently based on the length of the tick labels and the fontsize, but as
 the fonts are proportional width and the fontsize is based on the font
 height, it's a bit of a fudge. It's too close for small numbers and too
 far away for large numbers.

 I don't know if it is possible to get the right-hand coordinate of a PS
 pseudo-text box when the text is left-justified. I do not wish to right-
 justify those labels.

 I suppose the answer is to derive some function of max_label_length, but I
 fear that will only hold for the default font=Helvetica.

 Or move the label above/below the legend.


 Hamish

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/64#comment:9>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list