#include <GeoTessMetaData.h>
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 OptimizationType specified in the model constructor (SPEED or MEMORY).
-
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
geotess::GeoTessMetaData::GeoTessMetaData |
( |
| ) |
|
|
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.
- Parameters
-
Copy constructor.
- Parameters
-
md | reference to meta data object to copy. |
virtual geotess::GeoTessMetaData::~GeoTessMetaData |
( |
| ) |
|
|
virtual |
int geotess::GeoTessMetaData::getAttributeIndex |
( |
string |
name | ) |
|
Retrieve the index of the attribute that has the specified name.
- Parameters
-
- Returns
- the index of the attribute that has the specified name.
const string& geotess::GeoTessMetaData::getAttributeName |
( |
int |
attributeIndex | ) |
const |
|
inline |
Retrieve the name of the i'th attribute supported by the model.
- Parameters
-
- Returns
- the name of the i'th attribute supported by the model.
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 |
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.
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.
string geotess::GeoTessMetaData::getAttributeString |
( |
int |
attributeIndex | ) |
const |
|
inline |
Retrieve the units of the i'th attribute supported by the model.
- Parameters
-
- Returns
- the units of the i'th attribute supported by the model.
const string& geotess::GeoTessMetaData::getAttributeUnit |
( |
int |
attributeIndex | ) |
const |
|
inline |
Retrieve the units of the i'th attribute supported by the model.
- Parameters
-
- Returns
- the units of the i'th attribute supported by the model.
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 |
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.
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.
Return the type of all the data stored in the model; Will be one of DOUBLE, FLOAT, LONG, INT, SHORTINT, BYTE.
- Returns
- the dataType
const string& geotess::GeoTessMetaData::getDescription |
( |
| ) |
const |
|
inline |
Retrieve the description of the model.
- Returns
- the description of the model.
EarthShape& geotess::GeoTessMetaData::getEarthShape |
( |
| ) |
|
|
inline |
int geotess::GeoTessMetaData::getFirstLayer |
( |
const int & |
tessId | ) |
|
|
inline |
Retrieve the index of the first layer associated with the specified tessellation.
- Parameters
-
- Returns
- the index of the first layer associated with the specified tessellation.
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".
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".
int geotess::GeoTessMetaData::getLastLayer |
( |
const int & |
tessId | ) |
|
|
inline |
Retrieve the index of the last layer associated with the specified tessellation.
- Parameters
-
- Returns
- the index of the last layer associated with the specified tessellation.
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.
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
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 |
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
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.
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. |
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
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.
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.
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.
int geotess::GeoTessMetaData::getNAttributes |
( |
| ) |
const |
|
inline |
Retrieve the number of attributes supported by the model.
- Returns
- the number of attributes supported by the model.
int geotess::GeoTessMetaData::getNLayers |
( |
| ) |
const |
|
inline |
Retrieve the number of layers represented in the model.
- Returns
- number of layers represented in the model.
int geotess::GeoTessMetaData::getNVertices |
( |
| ) |
const |
|
inline |
Retrieve the number of vertices in the 2D grid.
- Returns
- number of layers represented in the model.
Execution can be optimized either for speed or memory. If optimization is set to SPEED, then the following optimization strategies will be implemented:
-
for each edge of a triangle the unit vector normal to the plane of the great circle containing the edge will be computed during input of the grid from file and stored in memory. With this information, the walking triangle algorithm can use dot products instead of scalar triple products when determining if a point resides inside a triangle. While much more computationally efficient, it requires a lot of memory to store all those unit vectors.
-
when performing natural neighbor interpolation, lazy evaluation will be used to store the circumcenters of triangles that are computed during interpolation.
-
when interpolating along radial profiles, every profile will record the index of the radius that is discovered. That index will be the starting point for the binary search the next time binary search is implemented. Each GeoTessPosition object will store 2d array of shorts, short[nVertices][nlayers] to record this information. Might be ~1MB per GeoTessPosition object (they could share references to the same short[][] as long as they don't break concurrency.
- Returns
- the optimization
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".
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".
int geotess::GeoTessMetaData::getTessellation |
( |
int |
layer | ) |
const |
|
inline |
Retrieve the index of the tessellation that supports the specified layer.
- Parameters
-
- Returns
- the index of the tessellation that supports the specified layer.
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.
bool geotess::GeoTessMetaData::isGridReuseOn |
( |
| ) |
|
|
inline |
Returns true if grid reuse is on.
- Returns
- true if grid reuse is on.
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.
Overloaded assignment operator
- Parameters
-
other | reference to meta data object to copy. |
- Returns
- reference to copy of 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.
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 |
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. |
Specify the type of the data that is stored in the model.
- Parameters
-
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
-
void geotess::GeoTessMetaData::setDescription |
( |
const string & |
dscr | ) |
|
|
inline |
Set the description of the model.
- Parameters
-
dscr | the description of the model. |
void geotess::GeoTessMetaData::setEarthShape |
( |
const string & |
earthShapeName | ) |
|
|
inline |
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 |
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. |
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. |
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. |
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
-
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
-
Execution can be optimized either for speed or memory. If optimization is set to SPEED, then the following optimization strategies will be implemented:
-
for each edge of a triangle the unit vector normal to the plane of the great circle containing the edge will be computed during input of the grid from file and stored in memory. With this information, the walking triangle algorithm can use dot products instead of scalar triple products when determining if a point resides inside a triangle. While much more computationally efficient, it requires a lot of memory to store all those unit vectors.
-
when performing natural neighbor interpolation, lazy evaluation will be used to store the circumcenters of triangles that are computed during interpolation.
-
when interpolating along radial profiles, every profile will record the index of the radius that is discovered. That index will be the starting point for the binary search the next time binary search is implemented. Each GeoTessPosition object will store 2d array of shorts, short[nVertices][nlayers] to record this information. Might be ~1MB per GeoTessPosition object (they could share references to the same short[][] as long as they don't break concurrency.
- Parameters
-
ot | either Optimization.SPEED or Optimization.MEMORY |
void geotess::GeoTessMetaData::setOptimizationType |
( |
const string & |
ot | ) |
|
Execution can be optimized either for speed or memory. If optimization is set to SPEED, then the following optimization strategies will be implemented:
-
for each edge of a triangle the unit vector normal to the plane of the great circle containing the edge will be computed during input of the grid from file and stored in memory. With this information, the walking triangle algorithm can use dot products instead of scalar triple products when determining if a point resides inside a triangle. While much more computationally efficient, it requires a lot of memory to store all those unit vectors.
-
when performing natural neighbor interpolation, lazy evaluation will be used to store the circumcenters of triangles that are computed during interpolation.
-
when interpolating along radial profiles, every profile will record the index of the radius that is discovered. That index will be the starting point for the binary search the next time binary search is implemented. Each GeoTessPosition object will store 2d array of shorts, short[nVertices][nlayers] to record this information. Might be ~1MB per GeoTessPosition object (they could share references to the same short[][] as long as they don't break concurrency.
- Parameters
-
void geotess::GeoTessMetaData::setReuseGrids |
( |
bool |
rg | ) |
|
|
inline |
Set grid reuse on or off.
- Parameters
-
rg | true turns grid reuse on. |
string geotess::GeoTessMetaData::toString |
( |
| ) |
const |
toString function.
- Returns
- string representation of this meta data object
The documentation for this class was generated from the following file: