osgEarth for the Moon

classic Classic list List threaded Threaded
2 messages Options
ravidavi ravidavi
Reply | Threaded
Open this post in threaded view
|

osgEarth for the Moon

Hello all,

I have been working on rendering Lunar terrain with osgEarth, and wanted to share what I've learned with the community. I know there are other forum posts that discuss using osgEarth to model various celestial bodies (Moon, Moon/Mars, Phobos), but they only address the specific question asked. So I did some digging and here's what I found. I'll include my .earth file contents so others can reproduce my results. This writeup will be verbose to preserve the bulk of my methodology.

My initial goal was to find a public tileserver that offered both Lunar imagery and Lunar terrain data. I looked on the WMS tileserver for NASA's Lunar Reconnaissance Orbiter (LRO), which has many layers (including ones for Mars other planets). Lunar imagery was easy to find and incorporate, using the "luna_wac_global" layer. However, all available topography layers were colorized versions of an original digital elevation model (DEM). This was useless to me since osgEarth requires single-channel elevation data. I found this out by trying many different layers that APPEARED to be topography, including some that offered single-channel geotiffs, but found that they did not actually represent true elevation. E.g. the "luna_clem750" layer contains what appears to be laser return values instead of elevation, so while it produces terrain that matches the trends of actual lunar terrain (highs/lows), it can't be used where actual terrain is needed.

After performing a fairly exhaustive search and turning up empty-handed, I made peace with the fact that there are no pre-tiled DEMs on public tileservers at this time (in a format that osgEarth can use). So then I looked for raw lunar DEM files that I could manually tile. These were not hard to find, and are provided for public use by the LRO mission. Here's info on them:
 - Hybrid between the LRO LOLA and Kaguya Terrain Camera DEMs. This is currently the most advanced publicly available lunar terrain model. You can download a geotiff from USGS, or jpeg2000-compressed from the LOLA PDS Data Node (+- 60-deg latitude data, polar data).
 - The LRO LROC/WAC GLD100 DEM from USGS. This has been superceded by the LOLA/KaguyaTC DEM above.

I downloaded the GLD100 DEM geotiff (since it was much smaller than the LOLA/KaguyaTC DEM) and tiled it as described in the Wiki:  "osgearth_conv --in driver gdal --in url GLD100DEM.tif --out driver tms --out url GLD100DEM/tms.xml --out format tiff --elevation"

Finally, here's a minimal .earth file that combines the WMS-based imagery with pre-tiled terrain:

<map name="Moon" type = "geocentric" version = "2">
  <options>
    <profile srs="+proj=longlat +a=1737400 +b=1737400 +units=m +no_defs"/>
  </options>

  <image name="LROC" driver="wms">
    <url>http://webmap.lroc.asu.edu</url>
    <format>png</format>
    <layers>luna_wac_global</layers>
    <wms_version>1.1.1</wms_version>
  </image>

  <elevation name="GLD100" driver="tms">
    <url>D:/path/to/GLD100DEM/tms.xml</url>
  </elevation>
</map>

That's "all" there is to it! Of course, it took me several days to figure this out (with help from Jason and from folks on the LRO mission science team), but hopefully this post will make it easier for others. And it can easily be adapted to other planets/moons if you have the data (or can access a tileserver that does).

I made a YouTube video as part of my work for this. It shows how osgEarth can be used to show both the Earth and Moon in the same simulation, using the NASA General Mission Analysis Tool (GMAT). My company has developed new visualizations for GMAT using the OpenFrames API (based on OSG), which in turn uses osgEarth for planetary terrain.

I hope this helps others, and of course I welcome feedback. Especially if someone else knows of a publicly-available Lunar DEM tileserver that can be used with osgEarth.

Thanks!
Ravi
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth for the Moon

Awesome work Ravi!   Thanks for sharing your process for tiling the data and the YouTube video looks great.   

On Sat, May 25, 2019, 1:51 PM ravidavi [via osgEarth] <[hidden email]> wrote:
Hello all,

I have been working on rendering Lunar terrain with osgEarth, and wanted to share what I've learned with the community. I know there are other forum posts that discuss using osgEarth to model various celestial bodies (Moon, Moon/Mars, Phobos), but they only address the specific question asked. So I did some digging and here's what I found. I'll include my .earth file contents so others can reproduce my results. This writeup will be verbose to preserve the bulk of my methodology.

My initial goal was to find a public tileserver that offered both Lunar imagery and Lunar terrain data. I looked on the WMS tileserver for NASA's Lunar Reconnaissance Orbiter (LRO), which has many layers (including ones for Mars other planets). Lunar imagery was easy to find and incorporate, using the "luna_wac_global" layer. However, all available topography layers were colorized versions of an original digital elevation model (DEM). This was useless to me since osgEarth requires single-channel elevation data. I found this out by trying many different layers that APPEARED to be topography, including some that offered single-channel geotiffs, but found that they did not actually represent true elevation. E.g. the "luna_clem750" layer contains what appears to be laser return values instead of elevation, so while it produces terrain that matches the trends of actual lunar terrain (highs/lows), it can't be used where actual terrain is needed.

After performing a fairly exhaustive search and turning up empty-handed, I made peace with the fact that there are no pre-tiled DEMs on public tileservers at this time (in a format that osgEarth can use). So then I looked for raw lunar DEM files that I could manually tile. These were not hard to find, and are provided for public use by the LRO mission. Here's info on them:
 - Hybrid between the LRO LOLA and Kaguya Terrain Camera DEMs. This is currently the most advanced publicly available lunar terrain model. You can download a geotiff from USGS, or jpeg2000-compressed from the LOLA PDS Data Node (+- 60-deg latitude data, polar data).
 - The LRO LROC/WAC GLD100 DEM from USGS. This has been superceded by the LOLA/KaguyaTC DEM above.

I downloaded the GLD100 DEM geotiff (since it was much smaller than the LOLA/KaguyaTC DEM) and tiled it as described in the Wiki:  "osgearth_conv --in driver gdal --in url GLD100DEM.tif --out driver tms --out url GLD100DEM/tms.xml --out format tiff --elevation"

Finally, here's a minimal .earth file that combines the WMS-based imagery with pre-tiled terrain:

<map name="Moon" type = "geocentric" version = "2">
  <options>
    <profile srs="+proj=longlat +a=1737400 +b=1737400 +units=m +no_defs"/>
  </options>

  <image name="LROC" driver="wms">
    <url>http://webmap.lroc.asu.edu</url>
    <format>png</format>
    <layers>luna_wac_global</layers>
    <wms_version>1.1.1</wms_version>
  </image>

  <elevation name="GLD100" driver="tms">
    <url>D:/path/to/GLD100DEM/tms.xml</url>
  </elevation>
</map>

That's "all" there is to it! Of course, it took me several days to figure this out (with help from Jason and from folks on the LRO mission science team), but hopefully this post will make it easier for others. And it can easily be adapted to other planets/moons if you have the data (or can access a tileserver that does).

I made a YouTube video as part of my work for this. It shows how osgEarth can be used to show both the Earth and Moon in the same simulation, using the NASA General Mission Analysis Tool (GMAT). My company has developed new visualizations for GMAT using the OpenFrames API (based on OSG), which in turn uses osgEarth for planetary terrain.

I hope this helps others, and of course I welcome feedback. Especially if someone else knows of a publicly-available Lunar DEM tileserver that can be used with osgEarth.

Thanks!
Ravi



If you reply to this email, your message will be added to the discussion below:
http://forum.osgearth.org/osgEarth-for-the-Moon-tp7592618.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.
NAML