Skip to content
Projects

pelicanmapping/osgearth has 1,820 GitHub stars and 848 forks. GitHot measured 0 stars in 24 hours and +3 in 7 days. Last checked 2026-11-09 00:23 UTC. Last push 2026-11-02.

How these counts are measured

3D Maps & Terrain SDK (C++)

Measured star growth

in 24h
0
in 7 days
+3
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Windows Linux OSX

Welcome to osgEarth!

osgEarth adds geospatially accurate 3D maps to your C++ application.

osgEarth builds on trusted open source technologies like OpenSceneGraph and GDAL to give you high-performance, accurate terrain and map rendering. It supports a myriad of geospatial data formats and map projections.

Install the SDK

Building osgEarth or using its SDK requires C++17 or later.

Install the latest version of osgEarth from vcpkg:

vcpkg install osgearth:x64-windows
vcpkg install osgearth[tools]:x64-windows

Check out some examples

osgearth_imgui is the main command-line viewer. osgearth_viewer is a stripped-down viewer without any GUI. Both of these read "earth files", XML files that describe the contents of a map.

You can find example earth files in the tests folder of the repo.

cd tests

:: Online imagery and elevation:
osgearth_imgui readymap.earth

:: Local GeoTIFFs:
osgearth_imgui simple.earth 

:: OpenStreetMap:
osgearth_imgui osm.earth

Integrate it into your project

CMakeLists.txt

cmake_minimum_required(VERSION 3.20)
project(myApp)
find_package(osgEarth CONFIG REQUIRED)
add_executable(myApp main.cpp)
target_link_libraries(myApp PRIVATE osgEarth::osgEarth)
install(TARGETS myApp RUNTIME DESTINATION bin)

main.cpp

#include <osgEarth/MapNode>
#include <osgEarth/TMS>
#include <osgEarth/EarthManipulator>
#include <osgEarth/GLUtils>
#include <osg/ArgumentParser>
#include <osgViewer/Viewer>

int main(int argc, char** argv)
{
    osgEarth::initialize();
    
    osg::ArgumentParser args(&argc, argv);
    osgViewer::Viewer viewer(args);
    viewer.setRealizeOperation(new osgEarth::GL3RealizeOperation());
    
    auto imagery = new osgEarth::TMSImageLayer();
    imagery->setURL("https://readymap.org/readymap/tiles/1.0.0/7/");
    
    auto mapNode = new osgEarth::MapNode();
    mapNode->getMap()->addLayer(imagery);
    
    viewer.setSceneData(mapNode);
    viewer.setCameraManipulator(new osgEarth::EarthManipulator(args));
    
    return viewer.run();
}

Build it yourself

To build osgEarth yourself, follow the instructions here.

Resources


© Copyright Pelican Mapping

Explore related projects