[GRASS5] Monitor map scale program finished

Eric G. Miller egm2 at jps.net
Sun Feb 18 18:47:09 EST 2001


On Wed, Feb 14, 2001 at 03:24:35PM +0000, Markus Neteler wrote:
> Hi Eric,
> 
> after spending more time on this I have finished the
> small "scale" program. Example run:
> 
> Xserver screen resolution: x:90.060942 dpi y:95.976384 dpi
> Map parameters: 
> 
>  True map size:  we_meters: 5277.500000 ns_meters: 4032.500000 
>  Pixel numbers used in screen: ns: 961.228802  we:1258.000000 
>  Map rows: 1613  map cols: 2111
> 
>  Map height in meter: 0.271097
>  Map width in meter:  0.332928
> 
>  Current map scale (note: Xserver x_res != y_res):
>    y-scale: 1:14874.773747
>    x-scale: 1:15851.788407
> 
> 
> Hey, my first Xserver-related software :-)
> 
> Find attached:
>  scale2.tar,gz
> 
> BTW: The Xserver x_res != y_res is really odd! I hope all the GRASS
> display/measure modules take care of this. In fact the maps will be
> displayed stretched always. I wasn't aware of that.

I think this is hardware specific...

$ ./scale
Xserver screen resolution: x:100.036923 dpi y:100.036923 dpi
Map parameters: 

 True map size:  we_meters: 372.437764 ns_meters: 344.119786 
 Pixel numbers used in screen: ns: 494.321745  we:535.000000 
 Map rows: 865  map cols: 958

 Map height in meter: 0.125511
 Map width in meter:  0.135840

 Current map scale (note: Xserver x_res != y_res):
   y-scale: 1:2741.741697
   x-scale: 1:2741.741697

[Ahh, but they are the same on my hardware...]

I recall reading the the DisplayHeightMM type routines might not return
true measurements.  That is, these routines are dependent on the
hardware reporting which apparently isn't always reliable.
 
> It would be great to have the map scale displayed in top line of
> GRASS monitor (of course get the sockets fully working is highest
> priority).

The server would have to query the region settings, like you did.  And,
it would need a hook to recalculate when the window is resized.

-- 
Eric G. Miller <egm2 at jps.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list