grdview: incorrect 3D display with southern hemisphere pole
|Target version:||Candidate for next bugfix release|
The order of what is displayed in front vs behind is incorrect with 3D elevation.
A mountain behind another would appear in front it with a southern hemisphere pole.
Script attached that creates 4 figures (only changing azimuth in -JOA).
The last one (where the top of the map is in a south direction) has order of what is displayed in front/back wrong.
#1 Updated by Viktor about 3 years ago
I also noticed the following (grammar) in the documentation from:
The upper-case A|B|C to removes enforcement of a northern hemisphere pole.
#3 Updated by Paul about 3 years ago
Looking at this now and I am confused. You are using the -JA projection with the optional horizon argument. This is not an azimuth, but distance to the horizon from the pole (which remains at 173.5/-42). So I am not sure what it means to change the horizon but it certainly seems to give a changed vantage point somehow. I've made a movie over 360 and of course a 360 horizon cannot mean anything (max 180 degrees from a point to a horizon). Perhaps you can tell me what you are trying to do? I don't think southern hemisphere has anything to do with it because if I doctor your grid to be in the north I see the same effect you mention. I wonder if you are trying to achieve an effect that you normally should use the -p option modifiers +v for?
#4 Updated by Viktor about 3 years ago
-Jo[a|A]lon0/lat0/azimuth/scale or -JO[a|A]lon0/lat0/azimuth/width
Set projection center lon0/lat0, azimuth of oblique equator, and scale.
I am using -JOA projection, not -JA.
When you view the images I have uploaded in sequence, 0 to 2 make sense but 3 is completely wrong. The large hill (in front) appears behind the smaller (darker) hills in the back.
What I am trying to do is rotate the view around a point but the display is incorrect when the top of the map points more towards the south direction (x axis passes 180 degrees). Normally the north on a map points up. but when it points down +- 90 degrees, it screws up the order of the 3D hills.
I think the images 0-3 tell the story better. I'm sure you will understand angle_3.jpg is wrong.
If you start with angle_0.jpg, go next and you reach angle_1.jpg. You will notice the view angle around the same object has changed by a little.
Go to the next image angle_2.jpg and you will see that the progression is the same.
Now think of what you expect angle_3.jpg to show before checking it given the progression (change of angle around the object) is the same.
Go to the next image angle_3.jpg and you will see that it does not make sense.
#6 Updated by Paul about 3 years ago
I've played with this a bit to determine the extend of the problem. It affects both hemispheres. Attached are animations of your grid both in the south and in the north (flipping the latitude in your grid). For both animations things look good for azimuths in the ~2-178 degree range and bad in the 182-361 degree range, with odd transitions at around 1 and 181. I assume this has to do with -p179 and we would find other ranges with a different view point. So I agree there is some confusion in grdview as to from which end of the grid it should start plotting (back towards front). Will see where that decision fails.