Get up and running

osgEarth is a cross-platform library. It uses the  CMake cross-platform build system, version 2.6.2 or newer. This is the same build system that  OpenSceneGraph uses.

Prerequisites

Required dependencies:

  •  GDAL 1.6 or later - Geospatial Data Abstraction Layer (version 1.5 will work too)
  •  Expat 2.0.1, an XML parsing library
  •  CURL - HTTP transfer library (comes with OSG 3rd party library distros)

Optional dependencies:

  •  GEOS 3.2.0 or later - C++ library for topological operations (Optional - used by the osgEarthFeatures module to perform various geometry manipulation operations like buffering and intersection).
  •  SQLite 3.6 or later - embedded relational database engine (Optional - used by the cache_sqlite driver).
  •  LibZIP - C library for reading, creating, and modifying zip archives (Optional - needed to build the experimental zipfile-based caching support - Win32 binaries at the bottom of this page)

Pre-Built 3rd Party Binaries for Win32 VS8 SP1

Ubuntu Packages

For Ubuntu karmic and lucid, packages are available from the UbuntuGis? PPA. Installation:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo aptitude install osgearth

For trying OSGEarth without installation you can download the OSGeo Live-DVD from  http://download.osgeo.org/livedvd/

Thanks to Pirmin Kalberer for developing and maintaining these packages.

Source Code

osgEarth is stored in Subversion (SVN). You will need an SVN client to access it. We recommend  TortoiseSVN for Windows users.

For the latest working revision, point your client at:

 http://svn.osgearth.org/trunk

For the latest tagged release, point your client at:

 http://svn.osgearth.org/tags/osgearth_1.4_T2010-08-27 (Version 1.4)

To download a tarball, visit the TAGS page and click on "Tarball":

 Tags Download Page

Note: please report bugs or ask questions via the osgEarth forums or the  !OpenSceneGraph forums.

Building

osgEarth uses the  CMake build system, version 2.6.2 or newer.

Tips:

  • For optional dependencies (like LibZIP) you can just leave the entries blank (even if CMake complains).
  • For OSG, just input the OSG_DIR variable, generate, and CMake will find all the other OSG folder automatically.
  • Ensure the "DYNAMIC_OSGEARTH" flag is ON. Building osgEarth as a static library does not yet work on all platforms.
  • For the OPTIONAL dependencies listed above, just leave the corresponding entries blank if you don't want to use them.
  • Sometimes CMake will complain that it cannot run osgversion. You can safely ignore this in most cases.

Testing

Sample earth files are located within the subversion repository  here. Simple use 'osgviewer' (from the OpenSceneGraph? distribution) to view a .earth file:

osgviewer sample.earth

Basic Troubleshooting

The most common pitfall is shared libraries missing from your path. Your path should include:

  • OSG and osgEarth binaries
  • All of osgEarth's dependencies (Expat, CURL, and GDAL shared libs)
  • OSG's 3rd-party dependencies (particularly zlib and the libpng)

If you get an error complaining about a missing CURL plugin:

  • The CURL plugin is optional in the OSG CMake configuration. Make sure you enable and build it.

If you cannot get the GDAL driver to work properly:

  • Make sure the GDAL shared library is in your path
  • Set the GDAL_DATA environment variable to point to the folder containing GDAL's .csv files

If you still have problems, please  search the forums or post a question.

Attachments