CMake Example

Customized Geometry Nodes | | Most Simple CMake Example

The procedure of adding ecef geometry, as explained in the previous sections, is illustrated in the CMake example (in the example.cmake folder). It shows a rotating earth with an additional pole axis (mininode_geometry_tube) and an equator ring (mininode_geometry_band).

This example is a good starting point to code your own geographic applications. For example, you can show a tileset that has been resampled with the qtviewer (or vtbuilder) just by issuing the following commands in the MainWindow::timerEvent method:

static bool loaded=false;
if (!loaded)
   viewerWindow->getViewer()->loadMap("url or file path to tileset");

Then you can navigate to a particular view point given in a geografic coordinate system (Lat/Lon, UTM, Mercator, etc.):

// define eye coordinates
minicoord eye;
double lat=49.5,lon=11.05, height=1000.0; // 1 km above Nuremberg airport

// set camera to eye coordinates looking down by default

Or just let the earth rotate:

// rotate camera left so that earth rotates right

Customized Geometry Nodes | | Most Simple CMake Example