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

Basic metadata information about a GeoTessModel. More...

`#include <GeoTessMetaData.h>`

## Public Member Functions
| GeoTessMetaData ()
| GeoTessMetaData (const string &fileName)
| GeoTessMetaData (const GeoTessMetaData &md)
GeoTessMetaData & | operator= (const GeoTessMetaData &other)
bool | operator== (const GeoTessMetaData &other)
bool | operator!= (const GeoTessMetaData &other)
virtual | ~GeoTessMetaData ()
LONG_INT | getMemory ()
GeoTessMetaData * | copy ()
bool | isGridReuseOn ()
void | setReuseGrids (bool rg)
EarthShape & | getEarthShape ()
void | setEarthShape (const string &earthShapeName)
const string & | getInputModelFile () const
const string & | getInputGridFile () const
double | getLoadTimeModel () const
const string & | getOutputModelFile () const
const string & | getOutputGridFile () const
double | getWriteTimeModel () const
const string & | getDescription () const
void | setDescription (const string &dscr)
void | setLayerNames (const string &lyrNms)
void | setLayerNames (vector< string > &layrNms)
int | getNVertices () const
int | getNLayers () const
int | getLayerIndex (const string &layerName) const
void | getLayerNames (vector< string > &layers)
const string *const | getLayerNames ()
string | getLayerName (const int &layerIndex)
string | getLayerNamesString ()
void | setLayerTessIds (int layrTsIds[])
void | setLayerTessIds (vector< int > &layrTsIds)
const int * | getLayerTessIds () const
int | getTessellation (int layer) const
void | getLayers (const int &tessId, vector< int > &layers)
int | getFirstLayer (const int &tessId)
int | getLastLayer (const int &tessId)
const GeoTessDataType & | getDataType () const
void | setDataType (const GeoTessDataType &dt)
void | setDataType (const string &dt)
void | getAttributeNames (vector< string > &attributes)
void | getAttributeUnits (vector< string > &units)
const string *const | getAttributeNames ()
const string *const | getAttributeUnits ()
void | setAttributes (const string &nms, const string &unts)
void | setAttributes (const vector< string > &names, const vector< string > &units)
int | getNAttributes () const
const string & | getAttributeName (int attributeIndex) const
int | getAttributeIndex (string name)
string | getAttributeNamesString () const
string | getAttributeUnitsString () const
const string & | getAttributeUnit (int attributeIndex) const
string | getAttributeString (int attributeIndex) const
string | toString (const string &className, LONG_INT memory) const
string | toString () const
const string & | getModelSoftwareVersion ()
const string & | getModelGenerationDate ()
void | setModelSoftwareVersion (const string &swVersion)
void | setModelGenerationDate (const string &genDate)

## Static Public Member Functions
static string | class_name ()

## Detailed Description

Basic metadata information about a GeoTessModel.

GeoTessMetaData stores basic information about a GeoTessModel, including:

- Description of the model.
- The names of the layers that comprise the model.
- Map from layer index to grid tessellation index.
- The names of the attributes supported by the model.
- The units of the attributes
- The DataType of the attributes (DOUBLE, FLOAT, LONG_INT, INT, SHORT, BYTE).
- The name and version number of the software that generated the model.
- The date that the model was generated.
- The computer platform upon which the code was compiled.
- The name of the file from which the model was loaded.
- The amount of time required to load the model from file.

Each GeoTessModel has a single instance of MetaData that it passes around to wherever the information is needed.

Author
  Sandy Ballard

Definition at line 97 of file GeoTessMetaData.h.

## Constructor & Destructor Documentation

## ◆ GeoTessMetaData() [1/3]

geotess::GeoTessMetaData::GeoTessMetaData | ( |  | ) |
| inline

Default constructor.

During construction of a GeoTessModel object, the following methods should be called to make the MetaData object complete.

- setDescription()
- setLayerNames()
- setAttributes()
- setDataType()
- setLayerTessIds() (only required if grid has more than one multi-level tessellation)
- setModelSoftwareVersion()
- setModelGenerationDate()

Definition at line 256 of file GeoTessMetaData.h.

## ◆ GeoTessMetaData() [2/3]

geotess::GeoTessMetaData::GeoTessMetaData | ( | const string & | fileName | ) |

Load just the metaData object from a GeoTessModel file.

Parameters

  fileName | name of GeoTessModel from which to read meta data

## ◆ GeoTessMetaData() [3/3]

geotess::GeoTessMetaData::GeoTessMetaData | ( | const GeoTessMetaData & | md | ) |

Copy constructor.

Parameters

  md | reference to meta data object to copy.

## ◆ ~GeoTessMetaData()

virtual geotess::GeoTessMetaData::~GeoTessMetaData | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ class_name()

static string geotess::GeoTessMetaData::class_name | ( |  | ) |
| inlinestatic

Returns the class name.

Returns
  class name

Definition at line 307 of file GeoTessMetaData.h.

## ◆ copy()

GeoTessMetaData* geotess::GeoTessMetaData::copy | ( |  | ) |
| inline

Retrieve a deep copy of this GeoTessMetaData object.

Returns
  a pointer to a deep copy of this GeoTessMetaData object.

Definition at line 361 of file GeoTessMetaData.h.

## ◆ getAttributeIndex()

int geotess::GeoTessMetaData::getAttributeIndex | ( | string | name | ) |

Retrieve the index of the attribute that has the specified name.

Parameters

  name |

Returns
  the index of the attribute that has the specified name.

## ◆ getAttributeName()

const string& geotess::GeoTessMetaData::getAttributeName | ( | int | attributeIndex | ) | const
| inline

Retrieve the name of the i'th attribute supported by the model.

Parameters

  attributeIndex |

Returns
  the name of the i'th attribute supported by the model.

Definition at line 853 of file GeoTessMetaData.h.

## ◆ getAttributeNames() [1/2]

const string* const geotess::GeoTessMetaData::getAttributeNames | ( |  | ) |
| inline

Retrieve the names of the attributes supported by the model. There will be nAttributes elements in the returned string array.

Returns
  the names of the attributes supported by the model.

Definition at line 790 of file GeoTessMetaData.h.

## ◆ getAttributeNames() [2/2]

void geotess::GeoTessMetaData::getAttributeNames | ( | vector< string > & | attributes | ) |
| inline

Retrieve the names of the attributes supported by the model.

Parameters

  attributes | a vector of strings that will be cleared and populated with the names of the attributes

Definition at line 766 of file GeoTessMetaData.h.

## ◆ getAttributeNamesString()

string geotess::GeoTessMetaData::getAttributeNamesString | ( |  | ) | const

Retrieve the names of all the attributes assembled into a single, semi-colon separated string.

Returns
  the names of all the attributes assembled into a single, semi-colon separated string.

## ◆ getAttributeString()

string geotess::GeoTessMetaData::getAttributeString | ( | int | attributeIndex | ) | const
| inline

Retrieve the units of the i'th attribute supported by the model.

Parameters

  attributeIndex |

Returns
  the units of the i'th attribute supported by the model.

Definition at line 915 of file GeoTessMetaData.h.

## ◆ getAttributeUnit()

const string& geotess::GeoTessMetaData::getAttributeUnit | ( | int | attributeIndex | ) | const
| inline

Retrieve the units of the i'th attribute supported by the model.

Parameters

  attributeIndex |

Returns
  the units of the i'th attribute supported by the model.

Definition at line 896 of file GeoTessMetaData.h.

## ◆ getAttributeUnits() [1/2]

const string* const geotess::GeoTessMetaData::getAttributeUnits | ( |  | ) |
| inline

Retrieve the units of the attributes supported by the model. There will be nAttributes elements in the returned string array.

Returns
  the units of the attributes supported by the model.

Definition at line 800 of file GeoTessMetaData.h.

## ◆ getAttributeUnits() [2/2]

void geotess::GeoTessMetaData::getAttributeUnits | ( | vector< string > & | units | ) |
| inline

Retrieve the units of the attributes supported by the model.

Parameters

  units | a vector of strings that will be cleared and populated with the units of the attributes

Definition at line 778 of file GeoTessMetaData.h.

## ◆ getAttributeUnitsString()

string geotess::GeoTessMetaData::getAttributeUnitsString | ( |  | ) | const

Retrieve the units of all the attributes assembled into a single, semi-colon separated string.

Returns
  the units of all the attributes assembled into a single, semi-colon separated string.

## ◆ getDataType()

const GeoTessDataType& geotess::GeoTessMetaData::getDataType | ( |  | ) | const
| inline

Return the type of all the data stored in the model; Will be one of DOUBLE, FLOAT, LONG, INT, SHORTINT, BYTE.

Returns
  the dataType

Definition at line 741 of file GeoTessMetaData.h.

## ◆ getDescription()

const string& geotess::GeoTessMetaData::getDescription | ( |  | ) | const
| inline

Retrieve the description of the model.

Returns
  the description of the model.

Definition at line 513 of file GeoTessMetaData.h.

## ◆ getEarthShape()

EarthShape& geotess::GeoTessMetaData::getEarthShape | ( |  | ) |
| inline

Retrieve a reference to the ellipsoid that is stored in this GeoTessModel. This EarthShape object can be used to convert between geographic and geocentric latitude, and between radius and depth in the Earth.

The following EarthShapes are supported:

- SPHERE - Geocentric and geographic latitudes are identical and conversion between depth and radius assume the Earth is a sphere with constant radius of 6371 km.
- GRS80 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the GRS80 ellipsoid.
- GRS80_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the GRS80 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
- WGS84 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the WGS84 ellipsoid.
- WGS84_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the WGS84 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
- IERS2003 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the IERS2003 ellipsoid.
- IERS2003_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the IERS2003 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.

Returns
  a reference to the EarthShape currently in use.

Definition at line 414 of file GeoTessMetaData.h.

## ◆ getFirstLayer()

int geotess::GeoTessMetaData::getFirstLayer | ( | const int & | tessId | ) |
| inline

Retrieve the index of the first layer associated with the specified tessellation.

Parameters

  tessId | tessellation index

Returns
  the index of the first layer associated with the specified tessellation.

Definition at line 712 of file GeoTessMetaData.h.

## ◆ getInputGridFile()

const string& geotess::GeoTessMetaData::getInputGridFile | ( |  | ) | const
| inline

Retrieve the name of the file from which the grid was loaded, or "none".

Returns
  the name of the file from which the grid was loaded, or "none".

Definition at line 460 of file GeoTessMetaData.h.

## ◆ getInputModelFile()

const string& geotess::GeoTessMetaData::getInputModelFile | ( |  | ) | const
| inline

Retrieve the name of the file from which the model was loaded, or "none".

Returns
  the name of the file from which the model was loaded, or "none".

Definition at line 449 of file GeoTessMetaData.h.

## ◆ getLastLayer()

int geotess::GeoTessMetaData::getLastLayer | ( | const int & | tessId | ) |
| inline

Retrieve the index of the last layer associated with the specified tessellation.

Parameters

  tessId | tessellation index

Returns
  the index of the last layer associated with the specified tessellation.

Definition at line 727 of file GeoTessMetaData.h.

## ◆ getLayerIndex()

int geotess::GeoTessMetaData::getLayerIndex | ( | const string & | layerName | ) | const

Retrieve the index of the layer that has the specified name, or -1.

Parameters

  layerName | the name of the layer whose index is sought.

Returns
  the index of the layer that has the specified name, or -1.

## ◆ getLayerName()

string geotess::GeoTessMetaData::getLayerName | ( | const int & | layerIndex | ) |
| inline

Retrieve the name of one of the layers supported by the model.

Parameters

  layerIndex | the index of the layer

Returns
  the name of the layer

Definition at line 613 of file GeoTessMetaData.h.

## ◆ getLayerNames() [1/2]

const string* const geotess::GeoTessMetaData::getLayerNames | ( |  | ) |
| inline

Retrieve the names of the layers supported by the model. There will be nLayers elements in the returned string array.

Returns
  a reference to the array of layer names

Definition at line 603 of file GeoTessMetaData.h.

## ◆ getLayerNames() [2/2]

void geotess::GeoTessMetaData::getLayerNames | ( | vector< string > & | layers | ) |
| inline

Retrieve the names of the layers supported by the model.

Parameters

  layers | a vector of strings that will be cleared and populated with the layer names

Definition at line 591 of file GeoTessMetaData.h.

## ◆ getLayerNamesString()

string geotess::GeoTessMetaData::getLayerNamesString | ( |  | ) |

Retrieve the names of all the layers assembled into a single, semi-colon separated string.

Returns
  the names of all the layers assembled into a single, semi-colon separated string.

## ◆ getLayers()

void geotess::GeoTessMetaData::getLayers | ( | const int & | tessId,
|  | vector< int > & | layers
| ) |  |
| inline

Retrieve a list of all the layer indexes that are associated with a specific tessellation index.

Parameters

  tessId | tessellation index
  layers | (output) a list of all the layer indexes that are associated with a specific tessellation index.

Definition at line 697 of file GeoTessMetaData.h.

## ◆ getLayerTessIds()

const int* geotess::GeoTessMetaData::getLayerTessIds | ( |  | ) | const
| inline

Retrieve a reference to layerTessIds; an int[] with an entry for each layer specifying the index of the tessellation that supports that layer.

Returns
  a reference to layerTessIds

Definition at line 673 of file GeoTessMetaData.h.

## ◆ getLoadTimeModel()

double geotess::GeoTessMetaData::getLoadTimeModel | ( |  | ) | const
| inline

Retrieve the amount of time, in seconds, required to load the model, or -1.

Returns
  the amount of time, in seconds, required to load the model, or -1.

Definition at line 470 of file GeoTessMetaData.h.

## ◆ getMemory()

LONG_INT geotess::GeoTessMetaData::getMemory | ( |  | ) |
| inline

Definition at line 314 of file GeoTessMetaData.h.

## ◆ getModelGenerationDate()

const string& geotess::GeoTessMetaData::getModelGenerationDate | ( |  | ) |
| inline

Retrieve the date when the content of this model was generated. This is not necessarily the same as the date when the file was copied or translated.

Returns
  the date when the content of this model was generated. This is not necessarily the same as the date when the file was copied or translated.

Definition at line 956 of file GeoTessMetaData.h.

## ◆ getModelSoftwareVersion()

const string& geotess::GeoTessMetaData::getModelSoftwareVersion | ( |  | ) |
| inline

Get the name and version of the software that generated the content of this model.

Returns
  the name and version of the software that generated this model.

Definition at line 946 of file GeoTessMetaData.h.

## ◆ getNAttributes()

int geotess::GeoTessMetaData::getNAttributes | ( |  | ) | const
| inline

Retrieve the number of attributes supported by the model.

Returns
  the number of attributes supported by the model.

Definition at line 842 of file GeoTessMetaData.h.

## ◆ getNLayers()

int geotess::GeoTessMetaData::getNLayers | ( |  | ) | const
| inline

Retrieve the number of layers represented in the model.

Returns
  number of layers represented in the model.

Definition at line 573 of file GeoTessMetaData.h.

## ◆ getNVertices()

int geotess::GeoTessMetaData::getNVertices | ( |  | ) | const
| inline

Retrieve the number of vertices in the 2D grid.

Returns
  number of layers represented in the model.

Definition at line 562 of file GeoTessMetaData.h.

## ◆ getOutputGridFile()

const string& geotess::GeoTessMetaData::getOutputGridFile | ( |  | ) | const
| inline

Retrieve the name of the file to which the grid was most recently written, or "none".

Returns
  the name of the file to which the grid was most recently written, or "none".

Definition at line 491 of file GeoTessMetaData.h.

## ◆ getOutputModelFile()

const string& geotess::GeoTessMetaData::getOutputModelFile | ( |  | ) | const
| inline

Retrieve the name of the file to which the model was most recently written, or "none".

Returns
  the name of the file to which the model was most recently written, or "none".

Definition at line 480 of file GeoTessMetaData.h.

## ◆ getTessellation()

int geotess::GeoTessMetaData::getTessellation | ( | int | layer | ) | const
| inline

Retrieve the index of the tessellation that supports the specified layer.

Parameters

  layer |

Returns
  the index of the tessellation that supports the specified layer.

Definition at line 685 of file GeoTessMetaData.h.

## ◆ getWriteTimeModel()

double geotess::GeoTessMetaData::getWriteTimeModel | ( |  | ) | const
| inline

Retrieve the amount of time, in seconds, required to write the model to file, or -1.

Returns
  the amount of time, in seconds, required to write the model to file, or -1.

Definition at line 502 of file GeoTessMetaData.h.

## ◆ isGridReuseOn()

bool geotess::GeoTessMetaData::isGridReuseOn | ( |  | ) |
| inline

Returns true if grid reuse is on.

Returns
  true if grid reuse is on.

Definition at line 371 of file GeoTessMetaData.h.

## ◆ operator!=()

bool geotess::GeoTessMetaData::operator!= | ( | const GeoTessMetaData & | other | ) |
| inline

Overloaded inequality operator

Parameters

  other | reference to the other meta data object to which this meta data object is to be compared

Returns
  true if this and other are not equal.

Definition at line 298 of file GeoTessMetaData.h.

## ◆ operator=()

GeoTessMetaData& geotess::GeoTessMetaData::operator= | ( | const GeoTessMetaData & | other | ) |

Overloaded assignment operator

Parameters

  other | reference to meta data object to copy.

Returns
  reference to copy of other

## ◆ operator==()

bool geotess::GeoTessMetaData::operator== | ( | const GeoTessMetaData & | other | ) |

Overloaded equality operator

Parameters

  other | reference to the other meta data object to which this meta data object is to be compared

Returns
  true if this and other are equal.

## ◆ setAttributes() [1/2]

void geotess::GeoTessMetaData::setAttributes | ( | const string & | nms,
|  | const string & | unts
| ) |  |
| inline

Specify the names of all the layers that comprise the model. This will determine the value of nLayers as well. The input lyrNms is a semicolon concatenation of all layer names (i.e. LAYERNAME1; LAYERNAME2; ...).

Parameters

  nms | the names of the attributes
  unts | the units of the attributes

Definition at line 812 of file GeoTessMetaData.h.

## ◆ setAttributes() [2/2]

void geotess::GeoTessMetaData::setAttributes | ( | const vector< string > & | names,
|  | const vector< string > & | units
| ) |  |

Specify the names and units of the attributes that comprise the model. The number names and units must be equal.

Parameters

  names | names of the attributes.
  units | units of the attributes.

## ◆ setDataType() [1/2]

void geotess::GeoTessMetaData::setDataType | ( | const GeoTessDataType & | dt | ) |

Specify the type of the data that is stored in the model.

Parameters

  dt | the dataType to set

## ◆ setDataType() [2/2]

void geotess::GeoTessMetaData::setDataType | ( | const string & | dt | ) |

Specify the type of the data that is stored in the model; Must be one of DOUBLE, FLOAT, LONG, INT, SHORTINT, BYTE.

Parameters

  dt | the dataType to set

## ◆ setDescription()

void geotess::GeoTessMetaData::setDescription | ( | const string & | dscr | ) |
| inline

Set the description of the model.

Parameters

  dscr | the description of the model.

Definition at line 524 of file GeoTessMetaData.h.

## ◆ setEarthShape()

void geotess::GeoTessMetaData::setEarthShape | ( | const string & | earthShapeName | ) |
| inline

Specify the name of the ellipsoid that is to be used to convert between geocentric and geographic latitude and between depth and radius. This ellipsoid will be save in this GeoTessModel if it is written to file. The following EarthShapes are supported:

- SPHERE - Geocentric and geographic latitudes are identical and conversion between depth and radius assume the Earth is a sphere with constant radius of 6371 km.
- GRS80 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the GRS80 ellipsoid.
- GRS80_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the GRS80 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
- WGS84 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the WGS84 ellipsoid.
- WGS84_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the WGS84 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
- IERS2003 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the IERS2003 ellipsoid.
- IERS2003_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the IERS2003 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.

Parameters

  earthShapeName | the name of the ellipsoid that is to be used.

Definition at line 442 of file GeoTessMetaData.h.

## ◆ setLayerNames() [1/2]

void geotess::GeoTessMetaData::setLayerNames | ( | const string & | lyrNms | ) |
| inline

Specify the names of all the layers that comprise the model. This will determine the value of nLayers as well. The input lyrNms is a semicolon concatenation of all layer names (i.e. LAYERNAME1; LAYERNAME2; ...).

Parameters

  lyrNms | single string containing all the layer names separated by semi-colons

Definition at line 543 of file GeoTessMetaData.h.

## ◆ setLayerNames() [2/2]

void geotess::GeoTessMetaData::setLayerNames | ( | vector< string > & | layrNms | ) |

Specify the names of all the layers that comprise the model. This will determine the value of nLayers as well.

Parameters

  layrNms | the names of the layers that comprise the model.

## ◆ setLayerTessIds() [1/2]

void geotess::GeoTessMetaData::setLayerTessIds | ( | int | layrTsIds[] | ) |
| inline

LayerTessIds is a map from a layer index to a tessellation index. There is an element for each layer. This method can only be called after the names of the layers have been specified with call to GeoTessMetaData::setLayerNames().

This method makes a copy of the supplied interger array.

Parameters

  layrTsIds | an int[] of length equal to the number of layers in the model.

Definition at line 643 of file GeoTessMetaData.h.

## ◆ setLayerTessIds() [2/2]

void geotess::GeoTessMetaData::setLayerTessIds | ( | vector< int > & | layrTsIds | ) |

LayerTessIds is a map from a layer index to a tessellation index. There is an element for each layer.

Parameters

  layrTsIds | an vector<int> of length equal to the number of layers in the model.

## ◆ setModelGenerationDate()

void geotess::GeoTessMetaData::setModelGenerationDate | ( | const string & | genDate | ) |
| inline

Set the date when this model was generated. This is not necessarily the same as the date when the file was copied or translated.

Parameters

  genDate |

Definition at line 973 of file GeoTessMetaData.h.

## ◆ setModelSoftwareVersion()

void geotess::GeoTessMetaData::setModelSoftwareVersion | ( | const string & | swVersion | ) |
| inline

Set the name and version number of the software that generated the contents of this model.

Parameters

  swVersion |

Definition at line 964 of file GeoTessMetaData.h.

## ◆ setReuseGrids()

void geotess::GeoTessMetaData::setReuseGrids | ( | bool | rg | ) |
| inline

Set grid reuse on or off.

Parameters

  rg | true turns grid reuse on.

Definition at line 381 of file GeoTessMetaData.h.

## ◆ toString() [1/2]

string geotess::GeoTessMetaData::toString | ( |  | ) | const

toString function.

Returns
  string representation of this meta data object

## ◆ toString() [2/2]

string geotess::GeoTessMetaData::toString | ( | const string & | className,
|  | LONG_INT | memory
| ) |  | const

toString function.

Returns
  string representation of this meta data object

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

- rstt/GeoTessCPP/include/GeoTessMetaData.h