Skip to content
/ turtle Public

Topographic Utilities for tRansporting parTicules over Long rangEs

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
LICENSE
Notifications You must be signed in to change notification settings

niess/turtle

Repository files navigation

Tests codecov

TURTLE

( Topographic Utilities for tRansporting parTicules over Long rangEs )

Description

TURTLE is a C library providing utilities for the long range transport of Monte-Carlo particles through a topography, described by Digital Elevation Models (DEMs). The library was built upon a versatile optimistic ray tracing algorithm. This algorithm uses only local topography data at each Monte-Carlo step, which makes it very efficient for scattering particles. The added cpu per Monte-Carlo step is only of a few hundreds of ns. In addition, this algorithm allows to traverse a topography in constant time, i.e. indepently of the number of DEM nodes, and with zero extra memory cost. As a result, TURTLE is also very efficient for ray tracing problems in large scale topographies, comprising bilions of nodes.

The main technical features of the TURTLE library are:

  • Support for local projection maps (UTM, Lambert, RGF93) as well as for tiled world wide models, e.g. SRTMGL1 or ASTER-GDEM2.

  • Provide utilities for frame transforms between the supported projections, geodetic coordinates and Cartesian Earth-Centered, Earth-Fixed (ECEF) coordinates.

  • Provide a thread safe interface for accessing DEMs from multiple sources, optimised for transport problems. It allows to balance execution speed, I/Os and memory usage.

Note that TURTLE is nor an image library neither a Monte-Carlo transport engine. It can only load a few commonly used data formats for geographic maps, i.e: ASC, GEOTIFF, GRD and HGT. Binary data formats must be 16b and grayscale. In addition, maps can be loaded and dumped in PNG, enriched with a custom header (as a tEXt chunk).

Installation

The TURTLE library should be straightforward to compile on Linux and OSX. It wasn't tested on Windows however. It can be built and installed using CMake. Alternatively, an example of Makefile is provided with the sources as well. It allows to build TURTLE (as a shared library: libturtle.so) and the examples, e.g. as:

make && make examples

The TURTLE source code conforms to C99 and has little dependencies except on the C89 standard library. Note however that for loading or dumping some DEMs, you might also need the following external libraries:

  • libpng for custom TURTLE dumps (version >= 1.4).
  • libtiff for loading GEOTIFF data, e.g. ASTER-GDEM2 or GEBCO.

Those are rather standard though and might already be installed on your system. In addition, build options allow to disable either or both of PNG or TIFF formats if not needed. By default libturtle is built with modular linkage to libpng and libtiff, i.e. on demand using dynamic loading.

Documentation

The API documentation can be found here. You might directly check the examples as well. A summary of the relevant package files is provided in CONTENT.md.

License

The TURTLE library is under the GNU LGPLv3 license. See the provided LICENSE and COPYING.LESSER files. The examples however have a separate public domain license allowing them to be copied without restrictions.