[GRASS-dev] [GRASS GIS] #1381: wxgui: add monitor calibrate option to prefs

GRASS GIS trac at osgeo.org
Thu Jun 2 23:27:52 EDT 2011


#1381: wxgui: add monitor calibrate option to prefs
-------------------------+--------------------------------------------------
 Reporter:  hamish       |       Owner:  grass-dev@…              
     Type:  enhancement  |      Status:  new                      
 Priority:  major        |   Milestone:  6.5.0                    
Component:  wxGUI        |     Version:  svn-releasebranch64      
 Keywords:  map scale    |    Platform:  All                      
      Cpu:  All          |  
-------------------------+--------------------------------------------------
 Hi,

 currently the wxGUI offers a 1:xxxxx map scale option in the status bar of
 the Map Display window. By definition this is the ratio of the distance
 (in map units) on the ground to the distance (in map units) on the
 rendered display.

 Without knowing the monitor size + resolution the currently displayed
 value seems to just be like region_distance/number_of_pixels. So it's
 missing being multiplied by a `pixels_per_meter` factor (if map units were
 in meters..).

 source:grass/trunk/gui/wxpython/gui_modules/mapdisp.py at 46524#L742


 X11 and I suspect OSX & MS Windows provide some info about the monitor,
 but in the past those reported values have been quite unreliable. Maybe it
 is a little better now and could be used for setting a seed value?

 I propose to do as GIMP and Inkscape do, and offer a calibration tool in
 the Preferences menu's "Display" setting tab. Then we know the DPI to map-
 units conversion factor specific to the user's screen resolution and
 monitor size, and after calibration they can trust the scale shown in the
 info bar. Either that or remove the currently erroneous option altogether.

 I've just looked at the version in Inkscape 0.48.1 and it seems quite nice
 and easy to use. Inkscape is written using wx(C++) but maybe there is
 still some pre-fab code in there we could quickly adapt?

 The `gv` program uses another way, in its State->Setup options it lets you
 define "Screen size (mm):  ___ x ___"

 note that this isn't an issue for ps.map, because we already know the
 exact dimensions of the paper sizes.


 thanks,
 Hamish

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



More information about the grass-dev mailing list