Opened 12 years ago
Closed 10 years ago
#1787 closed defect (fixed)
Profile Analysis Tool Problems
Reported by: | stu | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 7.0.0 |
Component: | wxGUI | Version: | 6.4.3 |
Keywords: | profile tool, r.profile, units, g.proj | Cc: | stu |
CPU: | x86-64 | Platform: | All |
Description
The following bugs appear to exist in the Profile Analysis Tool when run in GRASS 6.4.3 on OS X 10.6.8 and 10.7.5:
- Save Profile Data to csv file gives this error:
Traceback (most recent call last):
File "/Users/cmbarton/grass_dev/release_20121024_grass_6_4
_3RC1/dist.x86_64-apple- darwin12.2.0/etc/wxpython/wxplot/profile.py", line 343, in SaveProfileToFile
timings = self.timings TypeError : string indices must be integers
- Plot display is incorrectly scaled. The sampled DEM is in EPSG 3401 (Ohio north SPC, US feet)
Profile start and end points are plotted the correct distance apart, but the horizontal scale of the actual profile is plotted in meters (i.e. the plot is compressed in the first ~1/3 of the frame).
Change History (17)
comment:1 by , 12 years ago
Cc: | added |
---|
follow-up: 3 comment:2 by , 12 years ago
Component: | Default → wxGUI |
---|---|
Keywords: | profile tool added |
comment:3 by , 12 years ago
Replying to martinl: bad analysis on my part - I found an old 6.4.1 on my OS X side and the profile tool worked fine. So it must be some time after 6.4.1 that it broke - at least on OS X 10.6.8
follow-up: 5 comment:4 by , 12 years ago
The error message reported in #1 doesn't make sense. Line 343 of profile.py is:
pfile = path+'_'+str(rname)+'.csv'
I also don't understand how a path on my computer is showing up in the error message since "path" in line 343 is defined by:
path = dlg.GetPath()
This doesn't at all look like GRASS 6.4.3
follow-up: 6 comment:5 by , 12 years ago
Replying to cmbarton:
The error message reported in #1 doesn't make sense. Line 343 of profile.py is:
pfile = path+'_'+str(rname)+'.csv'
I also don't understand how a path on my computer is showing up in the error message since "path" in line 343 is defined by:
path = dlg.GetPath()
This doesn't at all look like GRASS 6.4.3
Sorry to report that it is indeed 6.4.3
I downloaded and reinstalled the 6.4.3 binary and was able to replicate these errors.
The same function (Profile tool - save to csv) produces the following in GRASS 7.0 svn
Traceback (most recent call last):
File "/Users/Shared/grass_dev/grass70_dev/dist.x86_64
-apple-darwin12.2.0/etc/gui/wxpython/wxplot/profile.py", line 340, in SaveProfileToFile
ppt, pit, pet, pfn, pframe, pcur = rcur TypeError : string indices must be integers The plot itself has the same characteristics as reported in the bug report for 6.4.3
comment:6 by , 12 years ago
follow-ups: 8 9 comment:7 by , 10 years ago
CPU: | OSX/Intel → x86-64 |
---|---|
Keywords: | r.profile added |
Milestone: | 6.4.3 → 7.1.0 |
Platform: | Unspecified → Linux |
Priority: | normal → major |
Version: | 6.4.3 RCs → svn-trunk |
Used r.profile interactively in GRASS 7.1 SVN. Same problems described by stu. If I use horizontal and vertical units of meters, the plot is perfect. If I change to horizontal and vertical units of feet, the Y axis of elevations is displayed correctly, but the X axis is squished to stop at the unit value in meters rather than feet. Example: I had a 800 meter transect, but when reprojected to feet and profiled, the graph stops at 800 feet rather than the approximate 2600. The endpoint triangle, however, is placed around the 2600 distance. It's as if it thinks the units are meters horizontal.
I get a seemingly related issue when I use the measure tool, as the distances are reported as units meters, but the values are reported correctly as feet.
I also tested this with grass 6.4 binary.
follow-up: 10 comment:8 by , 10 years ago
Replying to dadudeman:
I get a seemingly related issue when I use the measure tool, as the distances are reported as units meters, but the values are reported correctly as feet.
I actually fixed the measurement tool yesterday (r61132). The problem is I guess that the units are FootUSs which is not recognized as feet. So now the original units are displayed as footuss which is still kind of weird but not wrong at least.
follow-up: 11 comment:9 by , 10 years ago
Platform: | Linux → All |
---|
Replying to dadudeman:
Used r.profile interactively in GRASS 7.1 SVN. Same problems described by stu. If I use horizontal and vertical units of meters, the plot is perfect. If I change to horizontal and vertical units of feet, the Y axis of elevations is displayed correctly, but the X axis is squished to stop at the unit value in meters rather than feet. Example: I had a 800 meter transect, but when reprojected to feet and profiled, the graph stops at 800 feet rather than the approximate 2600. The endpoint triangle, however, is placed around the 2600 distance. It's as if it thinks the units are meters horizontal.
Yes, it's meters because meters come from r.profile and the GUI profiling tool just takes the values as they are. I wonder if this should be changed in r.profile rather than in the GUI?
comment:10 by , 10 years ago
Replying to annakrat:
Replying to dadudeman:
I get a seemingly related issue when I use the measure tool, as the distances are reported as units meters, but the values are reported correctly as feet.
I actually fixed the measurement tool yesterday (r61132). The problem is I guess that the units are FootUSs which is not recognized as feet. So now the original units are displayed as footuss which is still kind of weird but not wrong at least.
Backported in r61268.
follow-up: 13 comment:11 by , 10 years ago
Replying to annakrat:
Replying to dadudeman:
Used r.profile interactively in GRASS 7.1 SVN. Same problems described by stu. If I use horizontal and vertical units of meters, the plot is perfect. If I change to horizontal and vertical units of feet, the Y axis of elevations is displayed correctly, but the X axis is squished to stop at the unit value in meters rather than feet. Example: I had a 800 meter transect, but when reprojected to feet and profiled, the graph stops at 800 feet rather than the approximate 2600. The endpoint triangle, however, is placed around the 2600 distance. It's as if it thinks the units are meters horizontal.
Yes, it's meters because meters come from r.profile and the GUI profiling tool just takes the values as they are. I wonder if this should be changed in r.profile rather than in the GUI?
I fixed this problem in GUI (r61269). Please test. Still it would be worth changing the behavior of r.profile (and then revert this commit).
comment:12 by , 10 years ago
Yes. The proper place to fix this is in r.profile rather than a patch in the GUI, no matter how welcome.
follow-ups: 14 15 comment:13 by , 10 years ago
Replying to annakrat:
Replying to annakrat:
Replying to dadudeman:
Used r.profile interactively in GRASS 7.1 SVN. Same problems described by stu. If I use horizontal and vertical units of meters, the plot is perfect. If I change to horizontal and vertical units of feet, the Y axis of elevations is displayed correctly, but the X axis is squished to stop at the unit value in meters rather than feet. Example: I had a 800 meter transect, but when reprojected to feet and profiled, the graph stops at 800 feet rather than the approximate 2600. The endpoint triangle, however, is placed around the 2600 distance. It's as if it thinks the units are meters horizontal.
Yes, it's meters because meters come from r.profile and the GUI profiling tool just takes the values as they are. I wonder if this should be changed in r.profile rather than in the GUI?
I fixed this problem in GUI (r61269). Please test. Still it would be worth changing the behavior of r.profile (and then revert this commit).
This immediately raises once again the question of whether such temporary workaround fixes are really a good idea, especially when we know that a fix is actually needed elsewhere. Now that this actually seems to work, the needed fix is in risk of oblivion.
I personally would plead for not applying such temporary fixes...
Moritz
comment:14 by , 10 years ago
Replying to mlennert:
This immediately raises once again the question of whether such temporary workaround fixes are really a good idea, especially when we know that a fix is actually needed elsewhere. Now that this actually seems to work, the needed fix is in risk of oblivion.
Well, I tried to fix it in r.profile, but I failed. I couldn't find a correct way to get the meter-whateverfeet conversion. The problem is that in the US they apparently use FootUS instead of feet, so the standard grass mechanism for handling units fails to recognize it as feet. (Survey foot = 0.3048006096, international foot = 0.3048). g.proj, on the other hand, gives correct conversion.
comment:15 by , 10 years ago
Replying to mlennert:
Replying to annakrat:
I fixed this problem in GUI (r61269). Please test. Still it would be worth changing the behavior of r.profile (and then revert this commit).
This immediately raises once again the question of whether such temporary workaround fixes are really a good idea, especially when we know that a fix is actually needed elsewhere. Now that this actually seems to work, the needed fix is in risk of oblivion.
I personally would plead for not applying such temporary fixes...
Any recommendation if I should backport r61269 for the upcoming beta3? I am not going to fix r.profile any time soon (I don't know how).
comment:16 by , 10 years ago
Keywords: | units g.proj added |
---|---|
Version: | svn-trunk → 6.4.3 |
The foot/meter issue of profile (second originally reported problem) was reported also in #1273.
If the first originally reported problem was fixed and the GUI works now fine, this should be closed and new ticket should be opened against r.profile and r61269.
I'm closing #1273 as duplicate since most of the discussion is here. Reopen #1273 if scale in GUI is still not working.
Changing version to reported one.
comment:17 by , 10 years ago
Milestone: | 7.1.0 → 7.0.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This appears to be an OS X problem as it was not replicated using the same data set on 6.4.1 running on Ubuntu 12.04 through Parallels.