Details Ticket 939


Comment | Reply | Take | Open


Serial Number 939
Subject d.barscale ignores PROJ_UNITS
Area bug
Queue grass
Requestors neteler@itc.it
Owner none
Status resolved
Last User Contact Mon Mar 4 01:46:40 2002 (6 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Wed Mar 6 22:32:54 2002 (6 yr ago)
Created Fri Mar 1 13:40:43 2002 (6 yr ago)

Transaction History Ticket 939


Fri, Mar 1 2002 13:40:43    Request created by guest  
Subject: d.barscale ignores PROJ_UNITS

grass downloaded at: CVS Server, Germany
grass binary for platform: I compiled the sources myself
grass sources source: yes, I am using the latest GRASS from CVS

Hi,

Helena reported to me (and I tend to agree) that d.barscale 
ignores PROJ_UNITS. In case one work in a feet State Plane
coordinate system, d.barscale will report nonsense.
Probably other modules are affected as well?

Markus
Sun, Mar 3 2002 22:26:39    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15490.38133.762418.185953@cerise.nosuchdomain.co.uk>
Date Sun, 3 Mar 2002 21:26:13 +0000
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #939] (grass) d.barscale ignores PROJ_UNITS
In-Reply-To <20020301124044.5040713A03@lists.intevation.de>
References <20020301124044.5040713A03@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
X-Spam-Status No, hits=0 required=5 tests=
Request Tracker wrote:

> Subject: d.barscale ignores PROJ_UNITS

> Helena reported to me (and I tend to agree) that d.barscale 
> ignores PROJ_UNITS. In case one work in a feet State Plane
> coordinate system, d.barscale will report nonsense.

I've fixed this (well, I think so; either that or I've squared the
error factor).

I'm presuming that the bug treated units as metres, resulting in the
bar being too small (e.g. a "5km" bar was really 5000 ft). The bar now
gets larger as the "meters" setting in PROJ_UNITS gets smaller.

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


Sun, Mar 3 2002 22:55:31    Mail sent by hmitaso@unity.ncsu.edu  
Return-Path <hmitaso@unity.ncsu.edu>
Delivered-To grass-bugs@lists.intevation.de
Sender helena@intevation.de
Message-ID <3C82902D.7134C7B0@unity.ncsu.edu>
Date Sun, 03 Mar 2002 15:05:49 -0600
From Helena <hmitaso@unity.ncsu.edu>
Organization NCSU
X-Mailer Mozilla 4.73 [en] (X11; U; Linux 2.2.16-3 i686)
X-Accept-Language en
MIME-Version 1.0
To Glynn Clements <glynn.clements@virgin.net>
Cc Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #939] (grass) d.barscale ignores PROJ_UNITS
References <20020301124044.5040713A03@lists.intevation.de> <15490.38133.762418.185953@cerise.nosuchdomain.co.uk>
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=0 required=5 tests=
Glynn

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. The length of the bar should be OK, drawing a longer bar may
make it difficult
to place it (it is already pretty long)..

In addition to this problem,  I have an area where I need to combine data
provided in
state plane ft and state plane meters and when I try to project between
the
two locations proj complains that the map is not in my region. So it
looks like
it interprets ft as meters for both locations - I will try to go through
lat-long location
to see what is going on, but if anybody has done anything like this and
can confirm
or deny the problem that would help.

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.

thanks for looking into this - the life would be for sure easier if we
could finally
switch to meters, however the latest and greatest and newest and most
high tech state data that I am
working with are again in feet.

Helena


Clements wrote:

> Request Tracker wrote:
>
> > Subject: d.barscale ignores PROJ_UNITS
>
> > Helena reported to me (and I tend to agree) that d.barscale
> > ignores PROJ_UNITS. In case one work in a feet State Plane
> > coordinate system, d.barscale will report nonsense.
>
> I've fixed this (well, I think so; either that or I've squared the
> error factor).
>
> I'm presuming that the bug treated units as metres, resulting in the
> bar being too small (e.g. a "5km" bar was really 5000 ft). The bar now
> gets larger as the "meters" setting in PROJ_UNITS gets smaller.
>
> --
> Glynn Clements <glynn.clements@virgin.net>
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5


Mon, Mar 4 2002 01:05:13    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15490.47251.931225.968079@cerise.nosuchdomain.co.uk>
Date Sun, 3 Mar 2002 23:58:11 +0000
To Helena <hmitaso@unity.ncsu.edu>
Cc Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #939] (grass) d.barscale ignores PROJ_UNITS
In-Reply-To <3C82902D.7134C7B0@unity.ncsu.edu>
References <20020301124044.5040713A03@lists.intevation.de> <15490.38133.762418.185953@cerise.nosuchdomain.co.uk> <3C82902D.7134C7B0@unity.ncsu.edu>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
X-Spam-Status No, hits=0 required=5 tests=
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@virgin.net>


Mon, Mar 4 2002 01:46:40    Mail sent by egm2@jps.net  
Return-Path <egm2@jps.net>
Delivered-To grass-bugs@lists.intevation.de
Date Sun, 3 Mar 2002 16:46:56 -0800
From "Eric G. Miller" <egm2@jps.net>
To Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #939] (grass) d.barscale ignores PROJ_UNITS
Message-ID <20020304004656.GA19139@calico.local>
Mail-Followup-To Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
References <20020301124044.5040713A03@lists.intevation.de> <15490.38133.762418.185953@cerise.nosuchdomain.co.uk> <3C82902D.7134C7B0@unity.ncsu.edu> <15490.47251.931225.968079@cerise.nosuchdomain.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <15490.47251.931225.968079@cerise.nosuchdomain.co.uk>
User-Agent Mutt/1.3.27i
Sender "Eric G. Miller" <egm2@jps.net>
X-Spam-Status No, hits=3 required=5 tests=FROM_ENDS_IN_NUMS,RCVD_IN_OSIRUSOFT_COM
On Sun, Mar 03, 2002 at 11:58:11PM +0000, Glynn Clements wrote:
> 
> 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? 

Ideally, d.barscale should generate scale bars in a number of units,
which the user may specify.  That is, my map units may be meters, but
folks in the U.S. often want feet/yard/mile scales.  Or, I might want a
barscale showing both kilometers and miles.  It might be nice to
allow the user to specify the number of divisions, and the division
sizes (e.g. divisions=4 divsize=10 units=miles).  Gives the user a bit
more flexibility...

> 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.

Yea, I think that's incorrect.  It should be using the "old" survey
foot.

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


Wed, Mar 6 2002 22:32:54    Status changed to resolved by gclements  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request