GeoTessCPP
2.2
Software to facilitate storage and retrieval of 3D information about the Earth.
|
Basic metadata information about a GeoTessModel. More...
#include <GeoTessMetaData.h>
Public Member Functions | |
GeoTessMetaData () | |
Default constructor. More... | |
GeoTessMetaData (const string &fileName) | |
Load just the metaData object from a GeoTessModel file. More... | |
GeoTessMetaData (const GeoTessMetaData &md) | |
Copy constructor. More... | |
virtual | ~GeoTessMetaData () |
Destructor. More... | |
GeoTessMetaData * | copy () |
Retrieve a deep copy of this GeoTessMetaData object. More... | |
int | getAttributeIndex (string name) |
Retrieve the index of the attribute that has the specified name. More... | |
const string & | getAttributeName (int attributeIndex) const |
Retrieve the name of the i'th attribute supported by the model. More... | |
void | getAttributeNames (vector< string > &attributes) |
Retrieve the names of the attributes supported by the model. More... | |
const string *const | getAttributeNames () |
Retrieve the names of the attributes supported by the model. More... | |
string | getAttributeNamesString () const |
Retrieve the names of all the attributes assembled into a single, semi-colon separated string. More... | |
string | getAttributeString (int attributeIndex) const |
Retrieve the units of the i'th attribute supported by the model. More... | |
const string & | getAttributeUnit (int attributeIndex) const |
Retrieve the units of the i'th attribute supported by the model. More... | |
void | getAttributeUnits (vector< string > &units) |
Retrieve the units of the attributes supported by the model. More... | |
const string *const | getAttributeUnits () |
Retrieve the units of the attributes supported by the model. More... | |
string | getAttributeUnitsString () const |
Retrieve the units of all the attributes assembled into a single, semi-colon separated string. More... | |
const GeoTessDataType & | getDataType () const |
Return the type of all the data stored in the model; Will be one of DOUBLE, FLOAT, LONG, INT, SHORTINT, BYTE. More... | |
const string & | getDescription () const |
Retrieve the description of the model. More... | |
EarthShape & | getEarthShape () |
Retrieve a reference to the ellipsoid that is stored in this GeoTessModel. More... | |
int | getFirstLayer (const int &tessId) |
Retrieve the index of the first layer associated with the specified tessellation. More... | |
const string & | getInputGridFile () const |
Retrieve the name of the file from which the grid was loaded, or "none". More... | |
const string & | getInputModelFile () const |
Retrieve the name of the file from which the model was loaded, or "none". More... | |
int | getLastLayer (const int &tessId) |
Retrieve the index of the last layer associated with the specified tessellation. More... | |
int | getLayerIndex (const string &layerName) const |
Retrieve the index of the layer that has the specified name, or -1. More... | |
string | getLayerName (const int &layerIndex) |
Retrieve the name of one of the layers supported by the model. More... | |
void | getLayerNames (vector< string > &layers) |
Retrieve the names of the layers supported by the model. More... | |
const string *const | getLayerNames () |
Retrieve the names of the layers supported by the model. More... | |
string | getLayerNamesString () |
Retrieve the names of all the layers assembled into a single, semi-colon separated string. More... | |
void | getLayers (const int &tessId, vector< int > &layers) |
Retrieve a list of all the layer indexes that are associated with a specific tessellation index. More... | |
const int * | getLayerTessIds () const |
Retrieve a reference to layerTessIds; an int[] with an entry for each layer specifying the index of the tessellation that supports that layer. More... | |
double | getLoadTimeModel () const |
Retrieve the amount of time, in seconds, required to load the model, or -1. More... | |
LONG_INT | getMemory () |
const string & | getModelGenerationDate () |
Retrieve the date when the content of this model was generated. More... | |
const string & | getModelSoftwareVersion () |
Get the name and version of the software that generated the content of this model. More... | |
int | getNAttributes () const |
Retrieve the number of attributes supported by the model. More... | |
int | getNLayers () const |
Retrieve the number of layers represented in the model. More... | |
int | getNVertices () const |
Retrieve the number of vertices in the 2D grid. More... | |
const string & | getOutputGridFile () const |
Retrieve the name of the file to which the grid was most recently written, or "none". More... | |
const string & | getOutputModelFile () const |
Retrieve the name of the file to which the model was most recently written, or "none". More... | |
int | getTessellation (int layer) const |
Retrieve the index of the tessellation that supports the specified layer. More... | |
double | getWriteTimeModel () const |
Retrieve the amount of time, in seconds, required to write the model to file, or -1. More... | |
bool | isGridReuseOn () |
Returns true if grid reuse is on. More... | |
bool | operator!= (const GeoTessMetaData &other) |
Overloaded inequality operator. More... | |
GeoTessMetaData & | operator= (const GeoTessMetaData &other) |
Overloaded assignment operator. More... | |
bool | operator== (const GeoTessMetaData &other) |
Overloaded equality operator. More... | |
void | setAttributes (const string &nms, const string &unts) |
Specify the names of all the layers that comprise the model. More... | |
void | setAttributes (const vector< string > &names, const vector< string > &units) |
Specify the names and units of the attributes that comprise the model. More... | |
void | setDataType (const GeoTessDataType &dt) |
Specify the type of the data that is stored in the model. More... | |
void | 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. More... | |
void | setDescription (const string &dscr) |
Set the description of the model. More... | |
void | setEarthShape (const string &earthShapeName) |
Specify the name of the ellipsoid that is to be used to convert between geocentric and geographic latitude and between depth and radius. More... | |
void | setLayerNames (const string &lyrNms) |
Specify the names of all the layers that comprise the model. More... | |
void | setLayerNames (vector< string > &layrNms) |
Specify the names of all the layers that comprise the model. More... | |
void | setLayerTessIds (int layrTsIds[]) |
LayerTessIds is a map from a layer index to a tessellation index. More... | |
void | setLayerTessIds (vector< int > &layrTsIds) |
LayerTessIds is a map from a layer index to a tessellation index. More... | |
void | setModelGenerationDate (const string &genDate) |
Set the date when this model was generated. More... | |
void | setModelSoftwareVersion (const string &swVersion) |
Set the name and version number of the software that generated the contents of this model. More... | |
void | setReuseGrids (bool rg) |
Set grid reuse on or off. More... | |
string | toString (const string &className, LONG_INT memory) const |
toString function. More... | |
string | toString () const |
toString function. More... | |
Static Public Member Functions | |
static string | class_name () |
Returns the class name. More... | |
Basic metadata information about a GeoTessModel.
GeoTessMetaData stores basic information about a GeoTessModel, including:
Each GeoTessModel has a single instance of MetaData that it passes around to wherever the information is needed.
|
inline |
Default constructor.
During construction of a GeoTessModel object, the following methods should be called to make the MetaData object complete.
geotess::GeoTessMetaData::GeoTessMetaData | ( | const string & | fileName | ) |
Load just the metaData object from a GeoTessModel file.
fileName | name of GeoTessModel from which to read meta data |
geotess::GeoTessMetaData::GeoTessMetaData | ( | const GeoTessMetaData & | md | ) |
Copy constructor.
md | reference to meta data object to copy. |
|
virtual |
Destructor.
|
inlinestatic |
Returns the class name.
|
inline |
Retrieve a deep copy of this GeoTessMetaData object.
int geotess::GeoTessMetaData::getAttributeIndex | ( | string | name | ) |
Retrieve the index of the attribute that has the specified name.
name |
|
inline |
Retrieve the name of the i'th attribute supported by the model.
attributeIndex |
|
inline |
Retrieve the names of the attributes supported by the model.
attributes | a vector of strings that will be cleared and populated with the names of the attributes |
|
inline |
Retrieve the names of the attributes supported by the model.
There will be nAttributes elements in the returned string array.
string geotess::GeoTessMetaData::getAttributeNamesString | ( | ) | const |
Retrieve the names of all the attributes assembled into a single, semi-colon separated string.
|
inline |
Retrieve the units of the i'th attribute supported by the model.
attributeIndex |
|
inline |
Retrieve the units of the i'th attribute supported by the model.
attributeIndex |
|
inline |
Retrieve the units of the attributes supported by the model.
units | a vector of strings that will be cleared and populated with the units of the attributes |
|
inline |
Retrieve the units of the attributes supported by the model.
There will be nAttributes elements in the returned string array.
string geotess::GeoTessMetaData::getAttributeUnitsString | ( | ) | const |
Retrieve the units of all the attributes assembled into a single, semi-colon separated string.
|
inline |
Return the type of all the data stored in the model; Will be one of DOUBLE, FLOAT, LONG, INT, SHORTINT, BYTE.
|
inline |
Retrieve the description of the model.
|
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:
|
inline |
Retrieve the index of the first layer associated with the specified tessellation.
tessId | tessellation index |
|
inline |
Retrieve the name of the file from which the grid was loaded, or "none".
|
inline |
Retrieve the name of the file from which the model was loaded, or "none".
|
inline |
Retrieve the index of the last layer associated with the specified tessellation.
tessId | tessellation index |
int geotess::GeoTessMetaData::getLayerIndex | ( | const string & | layerName | ) | const |
Retrieve the index of the layer that has the specified name, or -1.
layerName | the name of the layer whose index is sought. |
|
inline |
Retrieve the name of one of the layers supported by the model.
layerIndex | the index of the layer |
|
inline |
Retrieve the names of the layers supported by the model.
layers | a vector of strings that will be cleared and populated with the layer names |
|
inline |
Retrieve the names of the layers supported by the model.
There will be nLayers elements in the returned string array.
string geotess::GeoTessMetaData::getLayerNamesString | ( | ) |
Retrieve the names of all the layers assembled into a single, semi-colon separated string.
|
inline |
Retrieve a list of all the layer indexes that are associated with a specific tessellation index.
tessId | tessellation index |
layers | (output) a list of all the layer indexes that are associated with a specific tessellation index. |
|
inline |
Retrieve a reference to layerTessIds; an int[] with an entry for each layer specifying the index of the tessellation that supports that layer.
|
inline |
Retrieve the amount of time, in seconds, required to load the model, or -1.
|
inline |
|
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.
|
inline |
Get the name and version of the software that generated the content of this model.
|
inline |
Retrieve the number of attributes supported by the model.
|
inline |
Retrieve the number of layers represented in the model.
|
inline |
Retrieve the number of vertices in the 2D grid.
|
inline |
Retrieve the name of the file to which the grid was most recently written, or "none".
|
inline |
Retrieve the name of the file to which the model was most recently written, or "none".
|
inline |
Retrieve the index of the tessellation that supports the specified layer.
layer |
|
inline |
Retrieve the amount of time, in seconds, required to write the model to file, or -1.
|
inline |
Returns true if grid reuse is on.
|
inline |
Overloaded inequality operator.
other | reference to the other meta data object to which this meta data object is to be compared |
GeoTessMetaData& geotess::GeoTessMetaData::operator= | ( | const GeoTessMetaData & | other | ) |
Overloaded assignment operator.
other | reference to meta data object to copy. |
bool geotess::GeoTessMetaData::operator== | ( | const GeoTessMetaData & | other | ) |
Overloaded equality operator.
other | reference to the other meta data object to which this meta data object is to be compared |
|
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; ...).
nms | the names of the attributes |
unts | the units of the attributes |
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.
names | names of the attributes. |
units | units of the attributes. |
void geotess::GeoTessMetaData::setDataType | ( | const GeoTessDataType & | dt | ) |
Specify the type of the data that is stored in the model.
dt | the dataType to set |
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.
dt | the dataType to set |
|
inline |
Set the description of the model.
dscr | the description of the model. |
|
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:
earthShapeName | the name of the ellipsoid that is to be used. |
|
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; ...).
lyrNms | single string containing all the layer names separated by semi-colons |
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.
layrNms | the names of the layers that comprise the model. |
|
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.
layrTsIds | an int[] of length equal to the number of layers in the model. |
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.
layrTsIds | an vector<int> of length equal to the number of layers in the model. |
|
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.
genDate |
|
inline |
Set the name and version number of the software that generated the contents of this model.
swVersion |
|
inline |
Set grid reuse on or off.
rg | true turns grid reuse on. |
string geotess::GeoTessMetaData::toString | ( | const string & | className, |
LONG_INT | memory | ||
) | const |
toString function.
string geotess::GeoTessMetaData::toString | ( | ) | const |
toString function.