GeodeticGraticule and numGridLines #1811
-
Hello, I don't fully understand the concept of numGridLines option of GeodeticGraticule layer. I understand that this affects the choice of resolution, but I don't understand how exactly. With default value of 10 and default resolution values, its work quite good for me but as soon as I get closer to the surface, the result gets worse, it's just stops on 30 minutes. May resolution choice depend only on how close our camera to surface? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's been a long time since I looked at this code so I had to go back and get a refresher 😄 The grid lines setting works to select the appropriate resolution from the resolution list for the current view. This logic is done in this block of code. Also keep in mind that if you get closer to the surface and tilt so you're looking over the horizon vs looking straight down it will switch to using a lower resolution graticule since it's trying to maintain a consistent number of lines on the screen. You are probably reaching the maximum configured resolution which is why you aren't getting a higher level of detail. If you want to add a new resolution you can add more resolutions to the resolution list like this I also pushed a fix to the resolution setting initializer, it was using 0.3125 instead of 0.03125 as the final resolution. |
Beta Was this translation helpful? Give feedback.
It's been a long time since I looked at this code so I had to go back and get a refresher 😄 The grid lines setting works to select the appropriate resolution from the resolution list for the current view. This logic is done in this block of code.
So increasing the grid lines setting just increases the chance that osgEarth will select the next highest resolution.
Also keep in mind that if you get closer to the surface and tilt so you're looking over the horizon vs looking straight down it will switch to using a lower resolution graticule since it's trying to maintain a consistent number of lines on the screen.
You are probably reaching the maximum configured resolution which is why you are…