[GRASS5] d.barscale enhancement, d.scale retirement

Hi,

re. the state of affairs of d.scale and d.barscale

d.scale is buggy (at= backwards; mouse placement broken, ..), while
d.barscale is pretty much the same program but with the bugs fixed and
more/better features & options (eg omit bg color, text on top).

I just added a flag to d.barscale that makes it draw a d.scale style
line-scale instead of a bar-scale, thus making d.scale redundant.

I propose we now get rid of (or disable via the module build list)
d.scale for 5.3 and rename d.barscale d.scale in the 5.7 cvs.

Can it be removed from CVS/HEAD without damaging 5.0.x?

A lingering inconsistency between various d.* modules is the at=
placement option which places an item based on percentage of monitor
width & height. d.barscale makes [0%,0%] the top left. For the modules
I've added at= to, I've been working off of what d.frame does which is
to make [0%,0%] the bottom left (I figured d.frame was one of the oldest
d.* modules and so closest to any sort of design strategy).

Can we pick one and make all the same? I think consistency between
modules is more important than consistency between major releases of
GRASS.

comments?! criticisms!?

Hamish

On Sat, Jan 17, 2004 at 08:18:45PM +1300, Hamish wrote:

Hi,

re. the state of affairs of d.scale and d.barscale

d.scale is buggy (at= backwards; mouse placement broken, ..), while
d.barscale is pretty much the same program but with the bugs fixed and
more/better features & options (eg omit bg color, text on top).

I just added a flag to d.barscale that makes it draw a d.scale style
line-scale instead of a bar-scale, thus making d.scale redundant.

I propose we now get rid of (or disable via the module build list)
d.scale for 5.3 and rename d.barscale d.scale in the 5.7 cvs.

Can it be removed from CVS/HEAD without damaging 5.0.x?

There is one limitation which needs to be sorted out before removing d.scale:

GRASS:~ > d.barscale -mt
ERROR: d.barscale does not work with a latitude-longitude location

GRASS:~ > d.scale -m

Use mouse to select the scale location:
Any Button: select point
Look OK [y] ?

[...]

Do you see a chance to extend d.barscale to work with Lat/Long?

Markus

> re. the state of affairs of d.scale and d.barscale
>
>
> d.scale is buggy (at= backwards; mouse placement broken, ..), while
> d.barscale is pretty much the same program but with the bugs fixed
> and more/better features & options (eg omit bg color, text on top).
>
> I just added a flag to d.barscale that makes it draw a d.scale style
> line-scale instead of a bar-scale, thus making d.scale redundant.
>
>
> I propose we now get rid of (or disable via the module build list)
> d.scale for 5.3 and rename d.barscale d.scale in the 5.7 cvs.
>
> Can it be removed from CVS/HEAD without damaging 5.0.x?

There is one limitation which needs to be sorted out before removing
d.scale:

GRASS:~ > d.barscale -mt
ERROR: d.barscale does not work with a latitude-longitude location

GRASS:~ > d.scale -m

Use mouse to select the scale location:
Any Button: select point
Look OK [y] ?

[...]

Do you see a chance to extend d.barscale to work with Lat/Long?

d.scale lets you draw something to the screen in Lat/Long, but it's
totally wrong. d.barscale is an improvement as it won't let you try.

So I don't think there's anything worth keeping d.scale around for now.

If one were to make d.scale/barscale work in lat/lon, how would you do
it? Use 1852*60*cos(lat) to favour the x-axis as the scale bar will be
horizontal? Regardless of what you do a one-dimensional scale will be
incorrect in the other dimension, and I'd rather not get into maximum
latitude/scale rules.

Hamish

Hamish wrote:

> Do you see a chance to extend d.barscale to work with Lat/Long?

d.scale lets you draw something to the screen in Lat/Long, but it's
totally wrong. d.barscale is an improvement as it won't let you try.

So I don't think there's anything worth keeping d.scale around for now.

If one were to make d.scale/barscale work in lat/lon, how would you do
it? Use 1852*60*cos(lat) to favour the x-axis as the scale bar will be
horizontal? Regardless of what you do a one-dimensional scale will be
incorrect in the other dimension, and I'd rather not get into maximum
latitude/scale rules.

How about marking the scale in degrees?

--
Glynn Clements <glynn.clements@virgin.net>

> > Do you see a chance to extend d.barscale to work with Lat/Long?
>
> d.scale lets you draw something to the screen in Lat/Long, but it's
> totally wrong. d.barscale is an improvement as it won't let you try.
>
> So I don't think there's anything worth keeping d.scale around for
> now.
>
> If one were to make d.scale/barscale work in lat/lon, how would you
> do it? Use 1852*60*cos(lat) to favour the x-axis as the scale bar
> will be horizontal? Regardless of what you do a one-dimensional
> scale will be incorrect in the other dimension, and I'd rather not
> get into maximum latitude/scale rules.

How about marking the scale in degrees?

Good idea. Would anyone use it though? I don't think I would in the form
of a bar scale. Maybe as an all around border in the style of the
d.barscale bar, but probably as part of ps.map for hard copies, not on
the display or for web/presentation graphics.

For Lat/Lon I've always preferred something like d.grid with text labels
at the map edge. Maybe that is worth focusing on first for the display.
I'm trying to remember if I ever got the degree symbol working outside
of d.text.freetype. No matter, easy enough to draw or make a small 'o'.

I can put together a nice compass rose for L/L as a consolation prize..
Too bad it stretches the wrong way or else I could stretch the E/W arms
to show map distortion.

Hamish