[GRASS5] [bug #939] (grass) d.barscale ignores PROJ_UNITS

Glynn Clements glynn.clements at virgin.net
Sun Mar 3 18:58:11 EST 2002


Helena wrote:

> I believe that the error was only in the untis that it has written
> out - so everything should have stayed the same except it should
> have written ft insted of m. So I had a barscale showing 5000m but
> its length was in fact 5000ft. So looking into PROJ_UNITS and
> choosing whether to write ft or m should be the fix.

So, if the "meters" setting in PROJ_UNITS is approximately equal to
0.3048, d.barscale should use multiples of feet, otherwise use metres? 

I think that it would probably be better to add an explicit option to
d.barscale to select non-metric units.

Also, what to do about large scale factors? d.barscale chooses among a
list of bar size according to the size of the window. Currently, the
available sizes are:

	{"10 meters" ,     10. ,     70., 10},
	{"50 meters" ,     50. ,    200., 5},
	{"100 meters",    100. ,    700., 10},
	{"500 meters",    500. ,   2000., 5},
	{"1 km"      ,   1000. ,   7000., 10},
	{"5 km"      ,   5000. ,  20000., 5},
	{"10 km"     ,  10000. ,  70000., 10},
	{"50 km"     ,  50000. , 200000., 5},
	{"100 km"    , 100000. , 700000., 10},
	{"1000 km"   ,1000000. ,7000000., 10},
	{"10000 km"  ,10000000.,70000000., 10}

Presumably the larger scales would use (statute) miles rather than
"kilofeet"? What should the changeover point be? 1 mile (= 5280 feet)?

Anyway, I'll leave it alone for now; at least the length should
actually be as indicated, even if it doesn't use the preferred units.

> The length of the bar should be OK, drawing a longer bar may
> make it difficult
> to place it (it is already pretty long)..

Well, the bar is sized automatically; the change shouldn't cause it to
occupy a larger region of the window than it otherwise would have.

> Also some other modules need to be checked for units (e.g. r.profile
> and area measurements). The numbers would be probably correct, it is
> just the unit written on the screen which is wrong and assumes that
> everything is meter. I will check some of the modules and report
> what I find.

Again, this is arguably better dealt with via command-line options. 
The user doesn't necessarily want to use the same units as the map's
coordinate system.

While we're on the subject of units, I note that GRASS' "foot"
(according to src/libes/gis/proj3.c) is the international foot
(0.3048m) rather than the US survey foot (0.3048006096m). Is this
correct? It isn't likely to be a problem for measurements (the
difference being 2 ppm), but it could be a significant problem for
coordinates.

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



More information about the grass-dev mailing list