[GRASS-dev] Scale display in GRASS Monitor
Markus Neteler
neteler at itc.it
Thu Sep 21 08:36:47 EDT 2006
Glynn Clements wrote on 09/20/2006 09:59 PM:
> Markus Neteler wrote:
>
>
>> the GRASS monitor does not show the approx. scale of the map.
>> In the past I introduced that one or two times but it was
>> reverted. Since every GIS shows a scale on screen, it is
>> hard to explain why GRASS doesn't do it.
>>
>> So I launch a new attempt to get the scale (back) on top
>> of the GRASS monitor... I know about dpi and all this stuff
>> but we really don't need centimeter precision :-)
>>
>> Opinions?
>>
>
> The movement towards gis.m and the PNG driver only makes this even
> less feasible now than it was in the past. What is the DPI of a
> PNG/PPM file?
>
I was thinking of the XDRIVER GRASS monitor only.
> I'm willing to extend the driver protocol so that such a feature
> becomes possible, if you can:
>
> 1. Persuade me that even at this late stage in its life, XDRIVER is
> still worth extending.
>
I have the code ready...
> 2. Convince me that it really doesn't matter that the reported scale
> will be *significantly* inaccurate for most users.
>
> [For me, xdpyinfo reports 75x75dpi. Given that the screen resolution
> is 1920x1440, that implies that I have a 32" monitor. In reality, the
> monitor is (nominally) 22", so the actual resolution is more like
> 110dpi. IOW, the reported resolution has a relative error of ~50%.]
>
I have tested it on my monitor (flat screen):
d.screenscale
D0/0: True map size: we_meters: 19020.000000 ns_meters: 14310.000000
D0/0: monitor size: screen_we_pix: 640 screen_ns_pix: 480
D0/0: Pixel numbers used in screen: ns: 480.000000 we:637.000000
D0/0: Map rows: 477 map cols: 634
D0/0: Xserver screen resolution: x:85.109948 dpi y:83.097764 dpi
D0/0: Map height in true centimeter on screen: 14.325000
D0/0: Map width in true centimeter on screen: 19.470801
D0/0: (note: deviations may arise from your screen adjustments)
D0/0: Current map scale (note: Xserver x_res != y_res):
D0/0: y-scale: 1:99895.287958
D0/0: x-scale: 1:97684.734253
Approximate map scale in GRASS monitor <x0> 1:99000
Compared to the measured monitor window dimensions, they deviate for me by
around 3% in x direction and 1% in y direction which IMHO is fair.
> 3. Tell me what resolution the PNG driver should report.
>
Maybe none? Or is the XDRIVER now a wrapper around the PNG driver? I lost
a bit track how it is working now.
Markus
More information about the grass-dev
mailing list