GeoTessCPP  2.6.1
Software to facilitate storage and retrieval of 3D information about the Earth.
All Classes Namespaces Files Functions Variables Typedefs Friends Macros
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 83 of file GeoTessModelUtils.h.

Constructor & Destructor Documentation

◆ GeoTessModelUtils()

geotess::GeoTessModelUtils::GeoTessModelUtils ( )
inline

Definition at line 90 of file GeoTessModelUtils.h.

◆ ~GeoTessModelUtils()

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

Definition at line 91 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
posthe position where the borehole is to be generated
maxSpacingthe 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
convertToDepthif true, depths are reported otherwise radii are reported.
reciprocalif true, 1/value are reported, otherwise values are reported as-is.
attributesthe 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
modelthe GeoTessModel to be interrogated.
latitudesarray of latitude values in degrees.
longitudesarray of longitude values in degrees.
layerIdlayer index
topif true return top of layer otherwise bottom.
convertToDepthif true, return depth, otherwise radius.
horizontalTypeeither InterpolatorType.LINEAR or InterpolatorType.NATURAL_NEIGHBOR
radialTypeeither InterpolatorType.LINEAR or InterpolatorType.CUBIC_SPLINE
values2D 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
modelthe GeoTessModel to be interrogated.
latitudesarray of latitude values in degrees.
longitudesarray of longitude values in degrees.
layerIdlayer index
depththe depth at which samples should be interpolated, in km.
horizontalTypeeither InterpolatorType.LINEAR or InterpolatorType.NATURAL_NEIGHBOR
radialTypeeither InterpolatorType.LINEAR or InterpolatorType.CUBIC_SPLINE
reciprocalif false, return value; if true, return 1./value.
attributesindex(es) of the attributes to interpolate. If omitted, all attributes are reported.
values3D 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
modelthe GeoTessModel to be interrogated.
latitudesarray of latitude values in degrees.
longitudesarray of longitude values in degrees.
layerIdlayer index
fractionalRadiusthe fractional radius within the layer at which samples should be interpolated.
horizontalTypeeither InterpolatorType.LINEAR or InterpolatorType.NATURAL_NEIGHBOR
radialTypeeither InterpolatorType.LINEAR or InterpolatorType.CUBIC_SPLINE
reciprocalif false, return value; if true, return 1./value.
attributesindex(es) of the attributes to interpolate.
valuesa 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: