GeoTessCPP: geotess::GeoTessPosition 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::GeoTessPosition Class Reference

Information about an interpolated point at an arbitrary position in a model. More...

`#include <GeoTessPosition.h>`

Inheritance diagram for geotess::GeoTessPosition:

## Public Member Functions
virtual | ~GeoTessPosition ()
virtual const GeoTessInterpolatorType & | getInterpolatorType () const
virtual long | getMemory ()
virtual double | getValue (int attribute)
void | setModel (GeoTessModel *newModel)
bool | noEmptyProfiles ()
void | set (double lat, double lon, double depth)
void | set (const double *const uVector, const double &newRadius)
void | set (int layid, double lat, double lon, double depth)
void | set (int layid, const double *const uVector, double rad)
void | setTop (int layid, const double *const uVector)
void | setBottom (int layid, const double *const uVector)
void | setRadius (int layid, double rad)
void | setRadius (double rad)
void | setDepth (int layer, double depth)
void | setDepth (double depth)
void | setTop (int layid)
void | setBottom (int layid)
double | getRadiusTop (int layid)
double | getRadiusBottom (int layid)
double | getEarthRadius ()
double * | getVector ()
void | copyVector (double *u)
int | getTriangle ()
int | getNVertices ()
const vector< int > & | getVertices () const
int | getIndexOfClosestVertex () const
const double * | getClosestVertex () const
int | getVertex (int index)
void | getCoefficients (map< int, double > &coefficients)
void | setMaxTessLevel (int layid, int maxTess)
int | getMaxTessLevel (int layid)
int | getTessLevel () const
int | getTessLevel (const int &tId)
double | getRadiusTop ()
double | getRadiusBottom ()
double | getDepthTop ()
double | getDepthBottom ()
double | getDepthTop (int layid)
double | getDepthBottom (int layid)
double | getLayerThickness (int layid)
double | getLayerThickness ()
double | getRadius ()
double | getDepth ()
GeoTessModel * | getModel ()
int | getTessID ()
int | getLayerId (double rad)
int | getLayerId ()
string | toString ()
double | getErrorValue ()
void | setErrorValue (double errVal)
int | getVertexIndex ()
void | getWeights (map< int, double > &weights, double dkm)
const vector< double > & | getHorizontalCoefficients () const
double | getHorizontalCoefficient (int index) const
bool | isRadiusOutOfRangeAllowed ()
void | setRadiusOutOfRangeAllowed (bool allowed)
void | addReference ()
void | removeReference ()
int | getReferenceCount ()
bool | isNotReferenced ()

## Static Public Member Functions
static GeoTessPosition * | getGeoTessPosition (GeoTessModel *model)
static GeoTessPosition * | getGeoTessPosition (GeoTessModel *model, const GeoTessInterpolatorType &horizontalType)
static GeoTessPosition * | getGeoTessPosition (GeoTessModel *model, const GeoTessInterpolatorType &horizontalType, const GeoTessInterpolatorType &radialType)

## Detailed Description

Information about an interpolated point at an arbitrary position in a model.

Manages information about a single point at an arbitrary position in a triangular tessellation. It provides access to:

- the position of the point (latitude-longitude, or unit vector)
- the index of the triangle in which the point resides
- the indexes of the nodes used to interpolate data
- the interpolation coefficients used to interpolate data

GeoTessModel has method getGeoTessPosition() that returns a pointer to a new GeoTessPosition object.

GeoTessPosition supports separate interpolation algorithms in the geographic and radial dimensions. In the geographic dimensions, LINEAR and NATURAL_NEIGHBOR interpolation algorithms are supported. LINEAR and CUBIC_SPLINE interpolation are supported in the radial dimension.

GeoTessPosition is not thread-safe in that it's internal state is mutable. The design intention is that single instances of a GeoTessGrid object and GeoTessData object can be shared among all the threads in a multi-threaded application and each thread will have it's own instance of a GeoTessPosition object that references the common GeoTessGrid + GeoTessData combination.

Author
  Sandy Ballard

Definition at line 103 of file GeoTessPosition.h.

## Constructor & Destructor Documentation

## ◆ ~GeoTessPosition()

virtual geotess::GeoTessPosition::~GeoTessPosition | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ addReference()

void geotess::GeoTessPosition::addReference | ( |  | ) |
| inline

Add reference count;

Definition at line 1256 of file GeoTessPosition.h.

## ◆ copyVector()

void geotess::GeoTessPosition::copyVector | ( | double * | u | ) |
| inline

Copy the contents of the unit vector that corresponds to the current position into the supplied double* which must have at least 3 elements.

Parameters

  u | a 3-element array into which the current position will be copied.

Definition at line 863 of file GeoTessPosition.h.

## ◆ getClosestVertex()

const double* geotess::GeoTessPosition::getClosestVertex | ( |  | ) | const
| inline

Retrieve the unit vector of the vertex wiht the highest interpolation coefficient.

Returns
  a reference to the vertex that is closest to this position.

Definition at line 901 of file GeoTessPosition.h.

## ◆ getCoefficients()

void geotess::GeoTessPosition::getCoefficients | ( | map< int, double > & | coefficients | ) |
| inline

Retrieve a map from pointIndex to interpolation coefficient. The returned coefficients sum to one.

Parameters

  coefficients | HashMap<Integer, Double> from pointIndex to interpolation coefficient

Definition at line 920 of file GeoTessPosition.h.

## ◆ getDepth()

double geotess::GeoTessPosition::getDepth | ( |  | ) |
| inline

Retrieve the depth of the current position in km. Assumes GRS80 ellipsoid.

Returns
  the depth of the current position in km.

Definition at line 1066 of file GeoTessPosition.h.

## ◆ getDepthBottom() [1/2]

double geotess::GeoTessPosition::getDepthBottom | ( |  | ) |
| inline

Retrieve an interpolated value of the depth of the bottom of the current layer.

Returns
  interpolated value of the depth of the bottom of the current layer.

Definition at line 1006 of file GeoTessPosition.h.

## ◆ getDepthBottom() [2/2]

double geotess::GeoTessPosition::getDepthBottom | ( | int | layid | ) |
| inline

Retrieve an interpolated value of the depth of the bottom of the current layer.

Parameters

  layid |

Returns
  interpolated value of the depth of the bottom of the current layer.

Definition at line 1028 of file GeoTessPosition.h.

## ◆ getDepthTop() [1/2]

double geotess::GeoTessPosition::getDepthTop | ( |  | ) |
| inline

Retrieve an interpolated value of the depth of the top of the current layer.

Returns
  interpolated value of the depth of the top of the current layer.

Definition at line 996 of file GeoTessPosition.h.

## ◆ getDepthTop() [2/2]

double geotess::GeoTessPosition::getDepthTop | ( | int | layid | ) |
| inline

Retrieve an interpolated value of the depth of the top of the current layer.

Parameters

  layid |

Returns
  interpolated value of the depth of the top of the current layer.

Definition at line 1017 of file GeoTessPosition.h.

## ◆ getEarthRadius()

double geotess::GeoTessPosition::getEarthRadius | ( |  | ) |
| inline

Retrieve the radius of the Earth at this position, in km. Assumes GRS80 ellipsoid.

Returns
  the radius of the Earth at this position, in km.

Definition at line 842 of file GeoTessPosition.h.

## ◆ getErrorValue()

double geotess::GeoTessPosition::getErrorValue | ( |  | ) |
| inline

If any calculated value is Double.NaN, then functions like getValue() or getRadiusTop() or getRadiusBottom() will return this errorValue. The default is NaN, but it can be set by calling setErrorValue();

Returns
  errorValue

Definition at line 1119 of file GeoTessPosition.h.

## ◆ getGeoTessPosition() [1/3]

static GeoTessPosition* geotess::GeoTessPosition::getGeoTessPosition | ( | GeoTessModel * | model | ) |
| static

Static factory method to create a new GeoTessPosition object. Linear interpolation will be performed in both the horizontal and radial dimensions.

It is the caller's responsibility to delete this object when it is no longer needed.

Parameters

  model | pointer to the model that supports this position

Returns
  a GeoTessPosition object.

## ◆ getGeoTessPosition() [2/3]

static GeoTessPosition* geotess::GeoTessPosition::getGeoTessPosition | ( | GeoTessModel * | model,
|  | const GeoTessInterpolatorType & | horizontalType
| ) |  |
| static

Static factory method to create a new GeoTessPosition object. If the horizontal InterpolatorType is LINEAR then the radial InterpolatorType will be LINEAR as well. If the horizontal InterpolatorType is NATUAL_NEIGHBOR then the radial InterpolatorType will be CUBIC_SPLINE.

It is the caller's responsibility to delete this object when it is no longer needed.

Parameters

  model | the GeoTessModel from which values will be interpolated.
  horizontalType | the type of interpolation that is to be used for interpolation in the geographic dimensions; either InterpolatorType:LINEAR or InterpolatorType::NATURAL_NEIGHBOR

Returns
  a GeoTessPosition object.

## ◆ getGeoTessPosition() [3/3]

static GeoTessPosition* geotess::GeoTessPosition::getGeoTessPosition | ( | GeoTessModel * | model,
|  | const GeoTessInterpolatorType & | horizontalType,
|  | const GeoTessInterpolatorType & | radialType
| ) |  |
| static

Static factory method to create a new GeoTessPosition object.

It is the caller's responsibility to delete this object when it is no longer needed.

Parameters

  model | the GeoTessModel from which values will be interpolated.
  horizontalType | the type of interpolation that is to be used for interpolation in the geographic dimensions; either InterpolatorType:LINEAR or InterpolatorType::NATURAL_NEIGHBOR
  radialType | the type of interpolation that is to be used in the radia dimension; either InterpolatorType:LINEAR or InterpolatorType::CUBIC_SPLINE

Returns
  a GeoTessPosition object.

## ◆ getHorizontalCoefficient()

double geotess::GeoTessPosition::getHorizontalCoefficient | ( | int | index | ) | const
| inline

Retrieve the interpolation coefficient associated with one of the vertices of the tessellation used to interpolate data.

Parameters

  index | the index of the desired coefficient.

Returns
  one of the interpolation coefficients

Definition at line 1205 of file GeoTessPosition.h.

## ◆ getHorizontalCoefficients()

const vector<double>& geotess::GeoTessPosition::getHorizontalCoefficients | ( |  | ) | const
| inline

Retrieve a reference to the horizontal interpolation coefficients associated with the vertices of the tessellation used to interpolate data.

Returns
  a reference to the horizontal interpolation coefficients associated with the vertices of the tessellation used to interpolate data.

Definition at line 1192 of file GeoTessPosition.h.

## ◆ getIndexOfClosestVertex()

int geotess::GeoTessPosition::getIndexOfClosestVertex | ( |  | ) | const

Retrieve the index of the highest interpolation coefficient.

Returns
  the index of the vertex that is closest to this position.

## ◆ getInterpolatorType()

virtual const GeoTessInterpolatorType& geotess::GeoTessPosition::getInterpolatorType | ( |  | ) | const
| virtual

Retrieve the type of interpolator being used for interpolation in geographic dimensions.

Returns
  either InterpolatorType::LINEAR or InterpolatorType::NATURAL_NEIGHBOR

Reimplemented in geotess::GeoTessPositionNaturalNeighbor, and geotess::GeoTessPositionLinear.

## ◆ getLayerId() [1/2]

int geotess::GeoTessPosition::getLayerId | ( |  | ) |
| inline

Returns
  the layerId

Definition at line 1105 of file GeoTessPosition.h.

## ◆ getLayerId() [2/2]

int geotess::GeoTessPosition::getLayerId | ( | double | rad | ) |
| inline

Retrieve the index of the layer that contains the specified radius. If radius is less than bottom of model, returns 0. If radius greater than top of model, returns index of shallowest layer that has finite thickness. If radius greater than top of model and all layers have zero thickness, returns nLayers-1.

Parameters

  rad | radius in km

Returns

Definition at line 1089 of file GeoTessPosition.h.

## ◆ getLayerThickness() [1/2]

double geotess::GeoTessPosition::getLayerThickness | ( |  | ) |
| inline

Retrieve the thickness of specified layer, in km.

Returns
  the thickness of specified layer, in km.

Definition at line 1049 of file GeoTessPosition.h.

## ◆ getLayerThickness() [2/2]

double geotess::GeoTessPosition::getLayerThickness | ( | int | layid | ) |
| inline

Retrieve the thickness of specified layer, in km.

Parameters

  layid | layer index

Returns
  the thickness of specified layer, in km.

Definition at line 1039 of file GeoTessPosition.h.

## ◆ getMaxTessLevel()

int geotess::GeoTessPosition::getMaxTessLevel | ( | int | layid | ) |
| inline

Retrieve the current value of maxTessLevel, which is the maximum tessellation level such that the triangle that is found during a walking triangle search will be on a tessellation level that is no higher than the specified value. Default value is Integer.maxValue-1.

Parameters

  layid |

Returns
  current value of maxTessLevel

Definition at line 954 of file GeoTessPosition.h.

## ◆ getMemory()

virtual long geotess::GeoTessPosition::getMemory | ( |  | ) |
| virtual

Retrieve the amount of memory consumed by this GeoTessPosition object.

Returns
  memory in bytes.

Reimplemented in geotess::GeoTessPositionNaturalNeighbor, and geotess::GeoTessPositionLinear.

## ◆ getModel()

GeoTessModel* geotess::GeoTessPosition::getModel | ( |  | ) |
| inline

Returns
  a pointer to the current model

Definition at line 1072 of file GeoTessPosition.h.

## ◆ getNVertices()

int geotess::GeoTessPosition::getNVertices | ( |  | ) |
| inline

Return the number of vertices (3 for LINEAR interpolation, more for natural neighbor).

Returns
  number of vertices involved in horizontal interpolation.

Definition at line 877 of file GeoTessPosition.h.

## ◆ getRadius()

double geotess::GeoTessPosition::getRadius | ( |  | ) |
| inline

Retrieve the radius of the current position, in km.

Returns
  the radius of the current position, in km.

Definition at line 1059 of file GeoTessPosition.h.

## ◆ getRadiusBottom() [1/2]

double geotess::GeoTessPosition::getRadiusBottom | ( |  | ) |
| inline

Retrieve an interpolated value of the radius of the bottom of the current layer.

Returns
  an interpolated value of the radius of the bottom of the specified layer.

Definition at line 988 of file GeoTessPosition.h.

## ◆ getRadiusBottom() [2/2]

double geotess::GeoTessPosition::getRadiusBottom | ( | int | layid | ) |

Retrieve an interpolated value of the radius of the bottom of the specified layer, in km.

Parameters

  layid | the index of the layer

Returns
  interpolated value of the radius, in km.

## ◆ getRadiusTop() [1/2]

double geotess::GeoTessPosition::getRadiusTop | ( |  | ) |
| inline

Retrieve an interpolated value of the radius of the top of the current layer.

Returns
  interpolated value of the radius of the top of the specified layer.

Definition at line 980 of file GeoTessPosition.h.

## ◆ getRadiusTop() [2/2]

double geotess::GeoTessPosition::getRadiusTop | ( | int | layid | ) |

Retrieve an interpolated value of the radius of the top of the specified layer, in km.

Parameters

  layid | the index of the layer

Returns
  interpolated value of the radius, in km.

## ◆ getReferenceCount()

int geotess::GeoTessPosition::getReferenceCount | ( |  | ) |
| inline

Retrieve reference count - number of other objects that hold a reference to this position object.

Returns
  current reference count

Definition at line 1279 of file GeoTessPosition.h.

## ◆ getTessID()

int geotess::GeoTessPosition::getTessID | ( |  | ) |
| inline

Returns
  the tessID

Definition at line 1077 of file GeoTessPosition.h.

## ◆ getTessLevel() [1/2]

int geotess::GeoTessPosition::getTessLevel | ( |  | ) | const
| inline

Retrieve the index of the tessellation level of the triangle that was found the last time that the walinkg triangle algorithm was executed.

Returns
  index of current tessellation level

Definition at line 963 of file GeoTessPosition.h.

## ◆ getTessLevel() [2/2]

int geotess::GeoTessPosition::getTessLevel | ( | const int & | tId | ) |
| inline

Retrieve the index of the tessellation level of the triangle that was found the last time that the walking triangle algorithm was executed.

Parameters

  tId | tessellation index

Returns
  index of current tessellation level, relative to the first tessellation level in the current tessellation

Definition at line 973 of file GeoTessPosition.h.

## ◆ getTriangle()

int geotess::GeoTessPosition::getTriangle | ( |  | ) |
| inline

Retrieve the index of the triangle within which the current position is located

Returns
  the index of the triangle within which the current position is located

Definition at line 871 of file GeoTessPosition.h.

## ◆ getValue()

virtual double geotess::GeoTessPosition::getValue | ( | int | attribute | ) |
| virtual

Retrieve an interpolated value of the specified model attribute.

Parameters

  attribute | index

Returns
  the value of the specified attribute interpolated at the current position

## ◆ getVector()

double* geotess::GeoTessPosition::getVector | ( |  | ) |
| inline

Retrieve a reference to the 3 component unit vector that corresponds to the current position. Do not modify the values of this array.

Returns
  a reference to the 3 component unit vector that corresponds to the current position

Definition at line 855 of file GeoTessPosition.h.

## ◆ getVertex()

int geotess::GeoTessPosition::getVertex | ( | int | index | ) |
| inline

Return the index of one of the vertices used to interpolate data.

Parameters

  index | the index of the desired coefficient.

Returns
  the index of one of the vertices used to interpolate data.

Definition at line 912 of file GeoTessPosition.h.

## ◆ getVertexIndex()

int geotess::GeoTessPosition::getVertexIndex | ( |  | ) |
| inline

If the position of this GeoTessPosition object is currently set to a location that coincides with one of the grid vertices, return the index of that vertex. Otherwise return -1;

Returns
  index of colocated vertex or -1.

Definition at line 1142 of file GeoTessPosition.h.

## ◆ getVertices()

const vector<int>& geotess::GeoTessPosition::getVertices | ( |  | ) | const
| inline

Return a reference to the array containing the indexes of vertices in the 2D grid that will be involved in the interpolation of data.

Returns
  vector<int>& a reference to the array containing the indexes of vertices in the 2D grid that will be involved in the interpolation of data.

Definition at line 886 of file GeoTessPosition.h.

## ◆ getWeights()

void geotess::GeoTessPosition::getWeights | ( | map< int, double > & | weights,
|  | double | dkm
| ) |  |
| inline

Add the weights of the current interpolation position to the supplied map of weights. Weights is a map from a pointIndex to the 'weight' associated with that point. For an individual point, the weight associated with that point is the product of the interpoation coefficient times the supplied value of dkm.

1. Consider all the points in the model that contribute interpolation coefficients to the position where this GeoTessPosition object is currently located.
2. For each of those points, look in the supplied weights and see if there is already an entry for the pointIndex.
3. If there is no entry for the current pointIndex, add an entry with weight = interpolation coefficient * dkm.
4. If there is already an entry for the current pointIndex, add interpolation coefficient * dkm to the weight that is currently associated with the pointIndex.

Parameters

  weights | a map from a point index to the weight assigned to that point.
  dkm | the 'length' in km associated with each interpolation position.

Definition at line 1176 of file GeoTessPosition.h.

## ◆ isNotReferenced()

bool geotess::GeoTessPosition::isNotReferenced | ( |  | ) |
| inline

Returns true if reference count is zero.

Returns
  true if reference count is zero.

Definition at line 1288 of file GeoTessPosition.h.

## ◆ isRadiusOutOfRangeAllowed()

bool geotess::GeoTessPosition::isRadiusOutOfRangeAllowed | ( |  | ) |
| inline

Controls radius out-of-range behavior. If position or radius is set with a specified layer index, and a radius is specified that is outside the bounds of that layer, and radiusOutOfRangeAllowed is true, then interpolated values will be computed using the values from the top or bottom of the specified layer as appropriate. If radiusOutOfRangeAllowed is false then errorValue is returned.

If position or radius is set without a specified layer index, and a radius is specified that is above the surface of the Earth, and radiusOutOfRangeAllowed is true, then interpolated values will be computed using the values from the top of the shallowest layer that has finite thickness. If radiusOutOfRangeAllowed is false then errorValue is returned.

Returns
  current setting of radiusOutOfRangeAllowed.

Definition at line 1225 of file GeoTessPosition.h.

## ◆ noEmptyProfiles()

bool geotess::GeoTessPosition::noEmptyProfiles | ( |  | ) |

Returns true if the current interpolation position has no empty profiles

Returns
  true if the current interpolation position has no empty profiles

## ◆ removeReference()

void geotess::GeoTessPosition::removeReference | ( |  | ) |
| inline

Remove reference count;

Definition at line 1261 of file GeoTessPosition.h.

## ◆ set() [1/4]

void geotess::GeoTessPosition::set | ( | const double *const | uVector,
|  | const double & | newRadius
| ) |  |
| inline

Set the interpolation point. This method will perform a walking triangle search for the triangle in which the specified position is located and compute the associated 2D and radial interpolation coefficients.

Parameters

  uVector | the Earth-centered unit vector that defines the position that is to be set.
  newRadius | the radius of the position, in km.

Definition at line 628 of file GeoTessPosition.h.

## ◆ set() [2/4]

void geotess::GeoTessPosition::set | ( | double | lat,
|  | double | lon,
|  | double | depth
| ) |  |
| inline

Set the interpolation point to specified latitude and and longitude in degrees and depth in km below sea level. This method will perform a walking triangle search for the triangle in which the specified position is located and compute the associated interpolation coefficients.

This method is pretty expensive compared to the other version of setPosition where the position is specified as a unit vector and a radius.

Assumes GRS80 ellipsoid.

Parameters

  lat | in degrees.
  lon | in degrees.
  depth | below sea level in km.

Definition at line 608 of file GeoTessPosition.h.

## ◆ set() [3/4]

void geotess::GeoTessPosition::set | ( | int | layid,
|  | const double *const | uVector,
|  | double | rad
| ) |  |
| inline

Set the interpolation point. This method will perform a walking triangle search for the triangle in which the specified position is located and compute the associated 2D and radial interpolation coefficients.

Parameters

  layid | the index of the layer of the model in which the position is to be constrained.
  uVector | the Earth-centered unit vector that defines the position that is to be set.
  rad | the radius of the position, in km.

Definition at line 678 of file GeoTessPosition.h.

## ◆ set() [4/4]

void geotess::GeoTessPosition::set | ( | int | layid,
|  | double | lat,
|  | double | lon,
|  | double | depth
| ) |  |
| inline

Set the interpolation point to specified latitude and longitude in degrees and depth in km below sea level. This method will perform a walking triangle search for the triangle in which the specified position is located and compute the associated interpolation coefficients.

This method is pretty expensive compared to the other version of setPosition where the position is specified as a unit vector and a radius.

Assumes GRS80 ellipsoid.

Parameters

  layid | the index of the layer of the model in which the position is to be constrained.
  lat | in degrees.
  lon | in degrees.
  depth | below sea level in km.

Definition at line 655 of file GeoTessPosition.h.

## ◆ setBottom() [1/2]

void geotess::GeoTessPosition::setBottom | ( | int | layid | ) |
| inline

Set the radius to the radius of the bottom of the specified layer.

Parameters

  layid | the index of the layer of the model in which the position is located.

Definition at line 806 of file GeoTessPosition.h.

## ◆ setBottom() [2/2]

void geotess::GeoTessPosition::setBottom | ( | int | layid,
|  | const double *const | uVector
| ) |  |
| inline

Set the 2D position to unitVector and radius to the radius of the bottom of the specified layer.

Parameters

  layid | the index of the layer of the model in which the position is located.
  uVector | the Earth-centered unit vector that defines the position that is to be set.

Definition at line 710 of file GeoTessPosition.h.

## ◆ setDepth() [1/2]

void geotess::GeoTessPosition::setDepth | ( | double | depth | ) |
| inline

Change the current depth without changing the geographic position.

Parameters

  depth | depth in km.

Definition at line 776 of file GeoTessPosition.h.

## ◆ setDepth() [2/2]

void geotess::GeoTessPosition::setDepth | ( | int | layer,
|  | double | depth
| ) |  |
| inline

Change the current layer and/or depth without changing the geographic position.

Parameters

  layer | the index of the layer of the model in which the position is located.
  depth |

Returns
  reference to this GeoTessPosition object. the depth of the position, in km.

Definition at line 765 of file GeoTessPosition.h.

## ◆ setErrorValue()

void geotess::GeoTessPosition::setErrorValue | ( | double | errVal | ) |
| inline

If any calculated value is NaN, then functions like getValue() or getRadiusTop() or getRadiusBottom() will return this value. The default is NaN, but it can be set by calling this function.

Parameters

  errVal | new value for errVal

Definition at line 1130 of file GeoTessPosition.h.

## ◆ setMaxTessLevel()

void geotess::GeoTessPosition::setMaxTessLevel | ( | int | layid,
|  | int | maxTess
| ) |  |
| inline

Set the maximum tessellation level such that the triangle that is found during a walking triangle search will be on a tessellation level that is no higher than the specified value. Default value is Integer.maxValue.

Parameters

  layid |
  maxTess |

Definition at line 938 of file GeoTessPosition.h.

## ◆ setModel()

void geotess::GeoTessPosition::setModel | ( | GeoTessModel * | newModel | ) |

Replace the model that currently supports this GeoTessPosition object with a new model. For this to work, the new model and the current model must use the same grid.

The benefit of calling this method is that if the application needs to interpolate a value at the same position in multiple models that share the same grid, then the walking triangle algorithm and the calculation of geographic interpolation coefficients do not have to be repeated. The radial interpolation information is updated by this method as well so after the call to this method, GeoTessPosition is ready to interpolate values from the new model.

Parameters

  newModel | model that is to replace the currently supported model.

Exceptions

  GeoTessException | if the new model and current model do not have GeoTessGrids that have the same gridID.

## ◆ setRadius() [1/2]

void geotess::GeoTessPosition::setRadius | ( | double | rad | ) |
| inline

Change the current radius without changing the geographic position.

Parameters

  rad | the new radius in km

Definition at line 741 of file GeoTessPosition.h.

## ◆ setRadius() [2/2]

void geotess::GeoTessPosition::setRadius | ( | int | layid,
|  | double | rad
| ) |  |
| inline

Change the current radius without changing the geographic position.

Parameters

  layid | the index of the layer of the model in which the position is located.
  rad | the new radius in km

Definition at line 723 of file GeoTessPosition.h.

## ◆ setRadiusOutOfRangeAllowed()

void geotess::GeoTessPosition::setRadiusOutOfRangeAllowed | ( | bool | allowed | ) |
| inline

Controls radius out-of-range behavior. If position or radius is set with a specified layer index, and a radius is specified that is outside the bounds of that layer, and radiusOutOfRangeAllowed is true, then interpolated values will be computed using the values from the top or bottom of the specified layer as appropriate. If radiusOutOfRangeAllowed is false then errorValue is returned.

If position or radius is set without a specified layer index, and a radius is specified that is above the surface of the Earth, and radiusOutOfRangeAllowed is true, then interpolated values will be computed using the values from the top of the shallowest layer that has finite thickness. If radiusOutOfRangeAllowed is false then errorValue is returned.

Parameters

  allowed | the new value for radiusOutOfRangeAllowed

Definition at line 1245 of file GeoTessPosition.h.

## ◆ setTop() [1/2]

void geotess::GeoTessPosition::setTop | ( | int | layid | ) |
| inline

Set the radius to the radius of the top of the specified layer.

Parameters

  layid | the index of the layer of the model in which the position is located.

Definition at line 786 of file GeoTessPosition.h.

## ◆ setTop() [2/2]

void geotess::GeoTessPosition::setTop | ( | int | layid,
|  | const double *const | uVector
| ) |  |
| inline

Set the 2D position to unitVector and radius to the radius of the top of the specified layer.

Parameters

  layid | the index of the layer of the model in which the position is located.
  uVector | the Earth-centered unit vector that defines the position that is to be set.

Definition at line 696 of file GeoTessPosition.h.

## ◆ toString()

string geotess::GeoTessPosition::toString | ( |  | ) |

Returns position as a string.

Returns
  string

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

- rstt/GeoTessCPP/include/GeoTessPosition.h