#1827 closed defect (fixed)
Measure Distance - Bearing
Reported by: | voncasec | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.3 |
Component: | wxGUI | Version: | svn-releasebranch64 |
Keywords: | Bearing tool, MapFrame.MeasureDist() | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
Currently, when using the measure tool in the map display (Analyze Map -> Measure Distance) the Bearing results appear upside down. The calculated bearings are as follows:
North (180)
West (270) - East (90)
South (0)
I did a search through some active tickets, and there were some open tickets with reference to bearing calculations. These tickets were 3-4 years old, so I am unsure of it they are still valid or not. If they are, I apologize for this additional ticket.
Change History (4)
comment:1 by , 12 years ago
follow-up: 3 comment:2 by , 12 years ago
Component: | Display → wxGUI |
---|---|
Keywords: | MapFrame.MeasureDist() added |
Resolution: | → fixed |
Status: | new → closed |
yes, the N-S was calculated backwards in the wxGUI. fixed in all branches with r55801-4.
It also now states the convention used, since this one is backwards as to how grass typically measures it. (here using navigational convention instead of mathematical one) If you want the standard GRASS way (reporting theta CCW from the +x axis) uncomment the line in frame.py as documented in the code.
I am glad to see MapWindow.Distance using G_distance() via ctypes for geodesic distance in lat/lon. I wonder for LL if we should have frame.py check for meters as the unit, and report km instead if the distance is > 2500.0?
(btw, note if you want bearing in lat/lon locations there will be two different bearings, a forward and backward one from each endpoint. (see the man page for geod
))
Hamish
comment:3 by , 12 years ago
Replying to hamish:
I wonder for LL if we should have frame.py check for meters as the unit, and report km instead if the distance is > 2500.0?
ah, I see that MapFrame.FormatDist() already tries to do that, but it fails for LL as the fn is testing against the map units from projinfo (which says degrees) while the fn is being used with results from G_distance() which always returns meters.
Hamish
comment:4 by , 12 years ago
Thanks for applying this fix to the wxGUI Display Hamish. I love being able to click a couple points on the map without having to think about the angle heading.
Casey
Other candidate tickets: