How to implement a lat/lon grid on the globe?

classic Classic list List threaded Threaded
3 messages Options
Yukosu Yukosu
Reply | Threaded
Open this post in threaded view
|

How to implement a lat/lon grid on the globe?

This post was updated on .
Hi,

I want to draw a lat/lon grid at every integer latitude or longitude, and some of them may hide based on the  LOD (e.g. may show every 5 degrees or 15 degrees).

Here are two screenshots I took from some other software in case I didn't make myself clear.

When zoomed in...


Are there any hints on creating such kind of lat/lon grid on a geocentric earth?
Sorry for my poor English. And thanks for your attention.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How to implement a lat/lon grid on the globe?

You can look at the osgEarth::Util::GeodeticGraticule class and see if that either meets your needs or is a good starting point.
Glenn Waldron / Pelican Mapping
Yukosu Yukosu
Reply | Threaded
Open this post in threaded view
|

Re: How to implement a lat/lon grid on the globe?

Thanks a lot! I also found an example "osgearth_graticule" which is almost what I want. I'll see what I can do with it.