osgEarth - Terrain On Demand
The objectives of osgEarth are to:
- Enable the development of geospatial applications in OSG.
- Make it as easy as possible to visualize terrain models.
- Interoperate with open mapping standards, technologies, and data.
What it is
osgEarth is a terrain generation system for OpenSceneGraph applications. There are two ways to render terrain using osgEarth:
- On-demand terrain: Generate and display a terrain at run-time with no pre-processing; osgEarth will access the raw data sources at application run time and composite them into a terrain model on the fly. No terrain model is actually stored to disk.
- Pre-built terrain: Use the osgearth_seed utility to pre-cache image, elevation, and vector data from your raw data sources, and then run off the cache. This is similar to the way traditional terrain generation systems work - you build your terrain offline, then load it into your application.
Design
osgEarth's internal design reflects its focus on real-time data ingestion. Data sources are generally optimized into tile hierarchies for fast serving and consumption over the web. osgEarth deals with map data in terms of these tile hierarchies. Any raster source, no matter its organization or location, will be broken down into a hierarchy of optimized tiles by osgEarth for display.
Now, the farther away the structure of your source data is from a tile hierarchy, the more processing osgEarth will need to apply to it before display - and more processing means less performance. (Caching can mitigate this to a great extent.) Yes, osgEarth can and will mosaic, reproject, and crop data to get it onto the terrain ... but it's happiest and fastest when the source data is already optimized. Read the section of Data Preparation for more details on how to prepare source data for best results.
Try it on
The quickest and easiest way to get up and running with osgEarth is to simply load a .earth file. Find the tests folder and fire it up from the command line:
osgviewer gdal_tiff.earth
We call this the zero-integration approach to using osgEarth. osgEarth includes a standard OSG loader that will read these files and produce a scene graph. If you have the osgEarth runtime libraries in your path, you can incorporate osgEarth terrains into your application without any additional coding.
Is it for you?
So: does osgEarth replace the need for offline terrain database creation tools? In many cases it does, but that will depend entirely on your particular application.
Consider using osgEarth if you need to:
- Get a terrain base map up and running quickly and easily
- Access open-standards map data services like WMS, WCS, or TMS
- Integrate locally-stored data with web-service-based data
- Incorporate new geospatial data layers at run-time
- Run in a "thin-client" environment
- Deal with data that may change over time
- Integrate with a commercial data provider
