LuciadLightspeed handles two types of elevation:

  • Terrain elevation: the visualization of rasters and tilesets with elevation information as background data.

  • 3D object altitude: the visualization of 3D objects, which contain altitude information, on the terrain. For more information, see Visualizing objects in 3D.

Visualizing terrain elevation

In each view, a global terrain layer is constructed automatically. A global terrain displays the elevation of the Earth surface in 3D. Raster layers and Earth tileset layers typically serve to construct a global terrain. Both rasters and tilesets may contain elevation data or not. The presence of elevation data determines how a layer is used to build a global terrain. In Lightspeed views, ILspTerrainSupport takes care of terrain construction. You can obtain it from the view by calling ILspView.getServices().getTerrainSupport().

ILspTerrainSupport automatically picks up and uses the elevation data from raster layers and Earth tileset layers. To determine if a raster layer contains elevation data, it checks whether TLcd(Multilevel)RasterModelDescriptor.isElevation() returns true. To determine if an ILcdEarthTileSet consists of elevation data, it checks whether CoverageType.ELEVATION is used to identify the data type of the tileset.

If multiple layers with elevation data are available, and if they overlap in certain areas, only the elevation of the topmost layer is used. Which layer is the top layer is determined by the ordering of the layers. For more information about layer ordering, see Working with layers in a Lightspeed view. This means that you can take control of the layer order to display coarse elevation data on a worldwide scale, and move to a layer with more detailed data when a user zooms in on a smaller area.

To obtain the best performance, use a single Earth tileset with elevation data.

Data without 3D coordinates is draped over the constructed terrain in the order of the layers containing the data. Draping means that a layer is spread across the terrain in such a manner that the draped layer is positioned directly on top of the terrain’s surface relief. This applies to vector as well as raster data. Both background raster layers and a vector layer displaying rivers can be painted on top of the available terrain, for example. See Visualizing objects in 3D for more information about displaying objects on top of a terrain.

In both 2D and 3D, you can also use the global terrain as input for analysis operations such as line-of-sight calculations.

Customizing the terrain visualization

You can change terrain styling such as the terrain’s brightness, contrast or opacity with the help of ILspTerrainSupport. The method setBackgroundStyler() lets you set a styler for the terrain.

For more information about working with ILspTerrainSupport, see Retrieving terrain data from a Lightspeed view.