GeoTessCPP: geotess::GeoTessModelUtils Class Reference

GeoTessCPP 2.2.3 Software to facilitate storage and retrieval of 3D information about the Earth.

Public Member Functions | Static Public Member Functions | List of all members
geotess::GeoTessModelUtils Class Reference

A collection of static utilities that extract organized information from a GeoTessModel. More...

`#include <GeoTessModelUtils.h>`

## Public Member Functions
| GeoTessModelUtils ()
virtual | ~GeoTessModelUtils ()

## Static Public Member Functions
static int | updatePointsPerLayer (GeoTessPosition &pos, int firstLayer, int lastLayer, double maxSpacing, vector< int > &pointsPerLayer)
static string | getBoreholeString (GeoTessModel &pos, double lat, double lon)
static string | getBoreholeString (GeoTessPosition &pos, double maxSpacing, int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal, vector< int > &attributes)
static void | getBorehole (GeoTessPosition &pos, double maxSpacing, int firstLayer, int lastLayer, bool convertToDepth, bool reciprocal, vector< int > &attributes, vector< vector< double > > &borehole)
static void | getBorehole (GeoTessPosition &pos, vector< int > &pointsPerLayer, bool convertToDepth, bool reciprocal, const vector< int > &attributes, vector< vector< double > > &borehole)
static void | getMapValuesDepth (GeoTessModel &model, vector< double > &latitudes, vector< double > &longitudes, int layerId, double depth, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, bool reciprocal, vector< int > &attributes, vector< vector< vector< double > > > &values)
static void | getSlice (GeoTessModel &model, const double *const x0, const double *const x1, int nx, double maxRadialSpacing, int firstLayer, int lastLayer, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, const string &spatialCoordinates, bool reciprocal, const vector< int > &attributes, vector< vector< vector< double > > > &transect)
static void | getMapValuesLayer (GeoTessModel &model, vector< double > &latitudes, vector< double > &longitudes, int layerId, double fractionalRadius, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, bool reciprocal, vector< int > &attributes, vector< vector< vector< double > > > &values)
static void | getMapLayerBoundary (GeoTessModel &model, vector< double > &latitudes, vector< double > &longitudes, int layerId, bool top, bool convertToDepth, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType, vector< vector< double > > &values)

## Detailed Description

A collection of static utilities that extract organized information from a GeoTessModel.

A collection of static utilities that extract organized information from a GeoTessModel. There are utilities to retrieve:

- a map of attribute values at a constant specified depth on a regular latitude-longitude grid.
- a map of attribute values at top or bottom of a layer on a regular latitude-longitude grid.
- a map of the depth of the top or bottom of a specified layer on a regular latitude-longitude grid.
- attribute values interpolated on a vertical slice through a model.
- attribute values along a radial 'borehole' at a specified position.

Author
  sballar

Definition at line 85 of file GeoTessModelUtils.h.

## Constructor & Destructor Documentation

## ◆ GeoTessModelUtils()

geotess::GeoTessModelUtils::GeoTessModelUtils | ( |  | ) |
| inline

Definition at line 92 of file GeoTessModelUtils.h.

## ◆ ~GeoTessModelUtils()

virtual geotess::GeoTessModelUtils::~GeoTessModelUtils | ( |  | ) |
| inlinevirtual

Definition at line 93 of file GeoTessModelUtils.h.

## Member Function Documentation

## ◆ getBorehole() [1/2]

static void geotess::GeoTessModelUtils::getBorehole | ( | GeoTessPosition & | pos,
|  | double | maxSpacing,
|  | int | firstLayer,
|  | int | lastLayer,
|  | bool | convertToDepth,
|  | bool | reciprocal,
|  | vector< int > & | attributes,
|  | vector< vector< double > > & | borehole
| ) |  |
| static

Retrieve interpolated attribute values along a radial 'borehole' at the specified position.

## ◆ getBorehole() [2/2]

static void geotess::GeoTessModelUtils::getBorehole | ( | GeoTessPosition & | pos,
|  | vector< int > & | pointsPerLayer,
|  | bool | convertToDepth,
|  | bool | reciprocal,
|  | const vector< int > & | attributes,
|  | vector< vector< double > > & | borehole
| ) |  |
| static

Retrieve interpolated attribute values along a radial 'borehole' at the specified position.

## ◆ getBoreholeString() [1/2]

static string geotess::GeoTessModelUtils::getBoreholeString | ( | GeoTessModel & | pos,
|  | double | lat,
|  | double | lon
| ) |  |
| static

Retrieve interpolated attribute values along a radial 'borehole' at the specified latitude and longitude, in degrees.

## ◆ getBoreholeString() [2/2]

static string geotess::GeoTessModelUtils::getBoreholeString | ( | GeoTessPosition & | pos,
|  | double | maxSpacing,
|  | int | firstLayer,
|  | int | lastLayer,
|  | bool | convertToDepth,
|  | bool | reciprocal,
|  | vector< int > & | attributes
| ) |  |
| static

Retrieve interpolated attribute values along a radial 'borehole' at the specified position.

Parameters

  pos | the position where the borehole is to be generated
  maxSpacing | the maximum radial spacing in km. Actual spacing will generally somewhat less than this value so that an integer number of equally spaced nodes will span each layer.
  firstLayer |
  lastLayer |
  convertToDepth | if true, depths are reported otherwise radii are reported.
  reciprocal | if true, 1/value are reported, otherwise values are reported as-is.
  attributes | the indexes of the attributes to include.

## ◆ getMapLayerBoundary()

static void geotess::GeoTessModelUtils::getMapLayerBoundary | ( | GeoTessModel & | model,
|  | vector< double > & | latitudes,
|  | vector< double > & | longitudes,
|  | int | layerId,
|  | bool | top,
|  | bool | convertToDepth,
|  | const GeoTessInterpolatorType & | horizontalType,
|  | const GeoTessInterpolatorType & | radialType,
|  | vector< vector< double > > & | values
| ) |  |
| static

Retrieve a map of the depth or radius of the top or bottom of a specified layer.

Parameters

  model | the GeoTessModel to be interrogated.
  latitudes | array of latitude values in degrees.
  longitudes | array of longitude values in degrees.
  layerId | layer index
  top | if true return top of layer otherwise bottom.
  convertToDepth | if true, return depth, otherwise radius.
  horizontalType | either InterpolatorType.LINEAR or InterpolatorType.NATURAL_NEIGHBOR
  radialType | either InterpolatorType.LINEAR or InterpolatorType.CUBIC_SPLINE
  values | 2D vector of values: [nlat][nlon]

Exceptions

  GeoTessException |

## ◆ getMapValuesDepth()

static void geotess::GeoTessModelUtils::getMapValuesDepth | ( | GeoTessModel & | model,
|  | vector< double > & | latitudes,
|  | vector< double > & | longitudes,
|  | int | layerId,
|  | double | depth,
|  | const GeoTessInterpolatorType & | horizontalType,
|  | const GeoTessInterpolatorType & | radialType,
|  | bool | reciprocal,
|  | vector< int > & | attributes,
|  | vector< vector< vector< double > > > & | values
| ) |  |
| static

Retrieve a map of attribute values at a constant specified depth on a regular latitude-longitude grid. For every point on the map, if the specified depth is greater than the depth of the bottom of the specified layer, then attribute values are interpolated at the bottom of the specified layer. Similarly, if the specified depth is less than the depth of the top of the specified layer, then attribute values at the top of the specified layer are interpolated.

Parameters

  model | the GeoTessModel to be interrogated.
  latitudes | array of latitude values in degrees.
  longitudes | array of longitude values in degrees.
  layerId | layer index
  depth | the depth at which samples should be interpolated, in km.
  horizontalType | either InterpolatorType.LINEAR or InterpolatorType.NATURAL_NEIGHBOR
  radialType | either InterpolatorType.LINEAR or InterpolatorType.CUBIC_SPLINE
  reciprocal | if false, return value; if true, return 1./value.
  attributes | index(es) of the attributes to interpolate. If omitted, all attributes are reported.
  values | 3D vector of doubles: [nlat][nlon][nAttributes]

Exceptions

  GeoTessException |

## ◆ getMapValuesLayer()

static void geotess::GeoTessModelUtils::getMapValuesLayer | ( | GeoTessModel & | model,
|  | vector< double > & | latitudes,
|  | vector< double > & | longitudes,
|  | int | layerId,
|  | double | fractionalRadius,
|  | const GeoTessInterpolatorType & | horizontalType,
|  | const GeoTessInterpolatorType & | radialType,
|  | bool | reciprocal,
|  | vector< int > & | attributes,
|  | vector< vector< vector< double > > > & | values
| ) |  |
| static

Retrieve a map of attribute values at some fractional thickness with a layer. FractionalRadius <= 0. will result in samples at the bottom of the layer while fractionalRadius >= 1. will result in samples at the top of the layer.

Parameters

  model | the GeoTessModel to be interrogated.
  latitudes | array of latitude values in degrees.
  longitudes | array of longitude values in degrees.
  layerId | layer index
  fractionalRadius | the fractional radius within the layer at which samples should be interpolated.
  horizontalType | either InterpolatorType.LINEAR or InterpolatorType.NATURAL_NEIGHBOR
  radialType | either InterpolatorType.LINEAR or InterpolatorType.CUBIC_SPLINE
  reciprocal | if false, return value; if true, return 1./value.
  attributes | index(es) of the attributes to interpolate.
  values | a 3D array of doubles: [nlat][nlon][nAttributes]

Exceptions

  GeoTessException |

## ◆ getSlice()

static void geotess::GeoTessModelUtils::getSlice | ( | GeoTessModel & | model,
|  | const double *const | x0,
|  | const double *const | x1,
|  | int | nx,
|  | double | maxRadialSpacing,
|  | int | firstLayer,
|  | int | lastLayer,
|  | const GeoTessInterpolatorType & | horizontalType,
|  | const GeoTessInterpolatorType & | radialType,
|  | const string & | spatialCoordinates,
|  | bool | reciprocal,
|  | const vector< int > & | attributes,
|  | vector< vector< vector< double > > > & | transect
| ) |  |
| static

## ◆ updatePointsPerLayer()

static int geotess::GeoTessModelUtils::updatePointsPerLayer | ( | GeoTessPosition & | pos,
|  | int | firstLayer,
|  | int | lastLayer,
|  | double | maxSpacing,
|  | vector< int > & | pointsPerLayer
| ) |  |
| static

Evaluates maximum number of nodes per layer. On input, pointsPerLayer is an array of length nLayers where each element contains a current estimate of the number of nodes that must be deployed on the corresponding layer so that the node spacing will be no greater than maxSpacing (in km). The values in pointsPerLayer will be evaluated at the specified position and increased if necessary. Only layers between firstLayer and lastLayer, inclusive, will be evaluated.

The documentation for this class was generated from the following file:

- rstt/GeoTessCPP/include/GeoTessModelUtils.h