Air traffic simulation and visualization platform.
|
Earth Visualization
This module provides a 3D visualization of Earth.
For example:
import _ossimPlanet
import _logoHUD
globe = _ossimPlanet.ossimPlanet()
globe.addGeoid("share/ossimPlanet/geoid/egm96.grd")
globe.addTerrain(1.0)
globe.addImage("share/ossimPlanet/earthlowres/earth.jpg")
globe.addLatLonHud()
logo = _logoHUD.logoHUD(globe)
logo.setFilename("share/logo-fimu.png")
while not globe.renderDone():
globe.renderFrame()
Class ossimPlanet
-
class ossimPlanet
The ossimPlanet provides planet visualization based on the
ossimPlanet library.
Note: To use this class you need to install the ossimPlanet library and
relevant data files from http://download.osgeo.org/ossim.
ossimPlanet instances have the following methods:
-
ossimPlanet.addGeoid(filename)
Elevation data is typically relative to mean sea level. The geoid grids
are used to shift the Mean Sea Level to ellipsoidal heights.
The addGeoid() method inserts new geoid data to ossimPlanet.
This method is optional. If not called, the ellipsoidal height is used.
-
ossimPlanet.addElevation(filename)
The addElevation() method inserts new elevation data to ossimPlanet.
This method is optional. If not called, the geoidal or ellipsoidal height
is used.
-
ossimPlanet.addTerrain(exaggeration=1.0)
The addTerrain() method displays Earth terrain based on previously
inserted geoid and elevation data.
The parameter exaggeration may be used to emphasize the terrain data by
multiplying the elevation data by the given rate (> 1.0).
-
ossimPlanet.addImage(filename)
The addImage() method inserts new Earth image to ossimPlanet.
You may download a low resolution image earthlowres.tgz
-
ossimPlanet.addKml(filename)
- The addKml() method inserts new KML (Keyhole Markup Language) object
to the visualization.
-
ossimPlanet.addLatLonHud()
- The addLatLonHud() method enables a Head-Up Display (HUD), that
displays latitude and longitude of the actual viewpoint.
-
ossimPlanet.setEyePosition((lat, lon, altitude)[, (heading, pitch, roll)])
The setEyePosition() method changes position of the view camera. The
first parameter is a 3-tuple that describes camera position. The altitude
is specified in meters above ellipsoid.
The optional second parameter is a 3-tuple that describes the camera attitude
as Tait-Bryan angles in degrees. If not specified, the camera looks
straight down.
-
ossimPlanet.renderDone()
- Return True if the user requested termination of the visualization loop,
or False if visualization should continue.
-
ossimPlanet.renderFrame()
- The renderFrame() method is the main rendering step. This will
render 1 frame.
Class logoHUD
-
class logoHUD
- The logoHUD provides a logo Head-Up Display (HUD), that displays a
custom image in the upper-right corner of the Earth visualization window.
logoHUD instances have the following methods:
-
logoHUD.logo_setFilename(filename)
- The logo_setFilename() method configures the displayed image. You may
use any image format supported by OSG, including .rgb, .gif, .jpg, .png,
.tiff, .pic, or .bmp.
|