GeoTessCPP
2.2
Software to facilitate storage and retrieval of 3D information about the Earth.
|
Abstract class that manages the radii and data values that span a single layer associated with a single vertex in the model. More...
#include <GeoTessProfile.h>
Public Member Functions | |
virtual int | class_size () const |
Returns the class size. More... | |
virtual int | findClosestRadiusIndex (double radius) const |
Find the node index of the radius in this Profile that has radius closest to the supplied radius. More... | |
virtual GeoTessData ** | getData () |
Retrieve a shallow copy of the array of Data objects associated with this Profile. More... | |
virtual GeoTessData * | getData (int i) |
Retrieve a reference the i'th Data object. More... | |
virtual const GeoTessData & | getData (int i) const |
Retrieve a reference the i'th Data object. More... | |
virtual const GeoTessData & | getDataBottom () const |
Get the Data object at the bottom of the profile. More... | |
virtual GeoTessData * | getDataBottom () |
Get the Data object at the bottom of the profile. More... | |
virtual const GeoTessData & | getDataTop () const |
Get the Data object at the top of the profile. More... | |
virtual GeoTessData * | getDataTop () |
Get the Data object at the top of the profile. More... | |
virtual double | getInterpolationCoefficient (int i, double radius, bool allowOutOfRange) const |
find interpolation coefficient. More... | |
virtual LONG_INT | getMemory () |
virtual int | getNData () const |
Get the number of Data objects that comprise this profile. More... | |
virtual int | getNRadii () const |
Get the number of radii that comprise this profile. More... | |
virtual int | getPointIndex (int nodeIndex) const |
Get the pointIndex that corresponds to the supplied nodeIndex. More... | |
virtual float * | getRadii () |
Retrieve a copy of the array of radii values in km. More... | |
virtual float | getRadius (int i) const |
Get the i'th radius value in this profile in km. More... | |
virtual float | getRadiusBottom () const |
Get the radius at the bottom of the profile, in km. More... | |
int | getRadiusIndex (double radius) const |
Find index i such that radius is >= radii[i] and < radii[i+1]. More... | |
virtual int | getRadiusIndex (double radius, int jlo) const |
Find index i such that radius is >= radii[i] and < radii[i+1]. More... | |
virtual float | getRadiusTop () const |
Get the radius at the top of the profile, in km. More... | |
double | getThickness () |
Return the thickness of the layer in km. More... | |
virtual const GeoTessProfileType & | getType () const |
One of EMPTY, THIN, CONSTANT, NPOINT, SURFACE. More... | |
virtual double | getValue (const GeoTessInterpolatorType &rInterpType, int attributeIndex, double radius, bool allowRadiusOutOfRange) const |
Retrieve the value of the specified attribute interpolated at the specified radius. More... | |
double | getValue (const vector< int > &nodeIds, const vector< double > &coefficients, int attributeIndex) const |
Retrieve the value of the specified attribute interpolated at the specified radius. More... | |
virtual double | getValue (int attributeIndex, int nodeIndex) const |
Retrieve the value of the specified attribute interpolated from this profile at the specified radius index. More... | |
virtual double | getValueBottom (int attributeIndex) const |
Retrieve the value of the specified attribute at the bottom of the layer. More... | |
virtual double | getValueTop (int attributeIndex) const |
Retrieve the value of the specified attribute at the top of the layer. More... | |
virtual bool | isNaN (int nodeIndex, int attributeIndex) |
Return true if the specified Data value is NaN. More... | |
virtual bool | operator== (const GeoTessProfile &p) const |
Return true if the input Profile object (p) profile type is the same as this Profile object. More... | |
virtual void | setData (int index, GeoTessData *data) |
Replace the Data currently associated with this Profile with new Data. More... | |
virtual void | setData (const vector< GeoTessData * > &inData) |
Replace the Data currently associated with this Profile with new Data. More... | |
virtual void | setRadii (const vector< float > &newRadii) |
Replace the radii currently associated with this Profile with new values. More... | |
virtual void | setRadius (int index, float radius) |
Replace the radius at the specified nodeIndex. More... | |
Static Public Member Functions | |
static int | class_count () |
Returns the class instance count. More... | |
static string | class_name () |
Returns the class name. More... | |
static GeoTessProfile * | newProfile (const vector< float > &radii, vector< GeoTessData * > &data) |
Static factory method that instantiates a new Profile object of the appropriate type. More... | |
static GeoTessProfile * | newProfile (const vector< float > &radii, vector< vector< double > > &data) |
static GeoTessProfile * | newProfile (const vector< float > &radii, vector< vector< float > > &data) |
static GeoTessProfile * | newProfile (const vector< float > &radii, vector< vector< LONG_INT > > &data) |
static GeoTessProfile * | newProfile (const vector< float > &radii, vector< vector< int > > &data) |
static GeoTessProfile * | newProfile (const vector< float > &radii, vector< vector< short > > &data) |
static GeoTessProfile * | newProfile (const vector< float > &radii, vector< vector< byte > > &data) |
static GeoTessProfile * | newProfile (float *radii, const int &nRadii, GeoTessData **data, const int &nData) |
Static factory method that instantiates a new Profile object of the appropriate type. More... | |
static GeoTessProfile * | newProfile (float *radii, const int &nRadii, double **values, const int &nNodes, const int &nAttributes) |
static GeoTessProfile * | newProfile (float *radii, const int &nRadii, float **values, const int &nNodes, const int &nAttributes) |
static GeoTessProfile * | newProfile (float *radii, const int &nRadii, LONG_INT **values, const int &nNodes, const int &nAttributes) |
static GeoTessProfile * | newProfile (float *radii, const int &nRadii, int **values, const int &nNodes, const int &nAttributes) |
static GeoTessProfile * | newProfile (float *radii, const int &nRadii, short **values, const int &nNodes, const int &nAttributes) |
static GeoTessProfile * | newProfile (float *radii, const int &nRadii, byte **values, const int &nNodes, const int &nAttributes) |
Abstract class that manages the radii and data values that span a single layer associated with a single vertex in the model.
An abstract class that manages the radii and data values that span a single layer associated with a single vertex in the model. The following Profile types are supported:
|
inlinestatic |
Returns the class instance count.
|
inlinestatic |
Returns the class name.
|
inlinevirtual |
Returns the class size.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Find the node index of the radius in this Profile that has radius closest to the supplied radius.
Reimplemented in geotess::GeoTessProfileEmpty.
|
virtual |
Retrieve a shallow copy of the array of Data objects associated with this Profile.
Caller assumes ownership of the array, but not the contents, and must delete the array when done with it.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, geotess::GeoTessProfileConstant, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Retrieve a reference the i'th Data object.
This Profile retains ownership of the returned Data object; caller should not delete it.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, geotess::GeoTessProfileConstant, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Retrieve a reference the i'th Data object.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, geotess::GeoTessProfileConstant, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Get the Data object at the bottom of the profile.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Get the Data object at the bottom of the profile.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Get the Data object at the top of the profile.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Get the Data object at the top of the profile.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
inlinevirtual |
find interpolation coefficient.
i | the index in radii such that radius is between radii[index] and radii[index+1]. |
radius | the radius whose interpolation coefficient is desired. |
allowOutOfRange | if false and the supplied radius is out of range then this method returns NaN_DOUBLE. |
Reimplemented in geotess::GeoTessProfileNPoint.
|
virtual |
|
virtual |
Get the number of Data objects that comprise this profile.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileSurfaceEmpty, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileConstant.
|
virtual |
Get the number of radii that comprise this profile.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileSurfaceEmpty, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileConstant.
|
virtual |
Get the pointIndex that corresponds to the supplied nodeIndex.
There is a node index for each Data object in a profile and they are indexed from 0 to the number of Data objects managed by a Profile. There is a pointIndex for every Data object in the entire model, indexed from 0 to the number of Data objects in the model.
Reimplemented in geotess::GeoTessProfileEmpty.
|
virtual |
Retrieve a copy of the array of radii values in km.
Caller assumes ownership of the array and must delete it when done with it.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileSurfaceEmpty, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileConstant.
|
virtual |
Get the i'th radius value in this profile in km.
Radii are in order of increasing radius.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileSurfaceEmpty, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileConstant.
|
virtual |
Get the radius at the bottom of the profile, in km.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
inline |
Find index i such that radius is >= radii[i] and < radii[i+1].
If radius < radii[1] returns 0. If radius >= radii[xx.length-2] return radii.length-2.
|
inlinevirtual |
Find index i such that radius is >= radii[i] and < radii[i+1].
If radius < radii[1] returns 0. If radius >= radii[xx.length-2] return radii.length-2.
radius | |
jlo | index found by a previous search. Used as an initial guess to improve performance of the search. Specify -1 if none available. |
Reimplemented in geotess::GeoTessProfileNPoint.
|
virtual |
Get the radius at the top of the profile, in km.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileSurfaceEmpty, geotess::GeoTessProfileThin, and geotess::GeoTessProfileSurface.
|
inline |
Return the thickness of the layer in km.
|
virtual |
One of EMPTY, THIN, CONSTANT, NPOINT, SURFACE.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Retrieve the value of the specified attribute interpolated at the specified radius.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileConstant, geotess::GeoTessProfileSurface, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, and geotess::GeoTessProfileSurfaceEmpty.
|
inline |
Retrieve the value of the specified attribute interpolated at the specified radius.
|
virtual |
Retrieve the value of the specified attribute interpolated from this profile at the specified radius index.
attributeIndex | |
nodeIndex |
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileConstant, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileSurface, geotess::GeoTessProfileThin, and geotess::GeoTessProfileSurfaceEmpty.
|
inlinevirtual |
Retrieve the value of the specified attribute at the bottom of the layer.
attributeIndex |
Reimplemented in geotess::GeoTessProfileEmpty.
|
virtual |
Retrieve the value of the specified attribute at the top of the layer.
attributeIndex |
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileConstant, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Return true if the specified Data value is NaN.
For doubles and floats, this means not NaN. For bytes, shorts, ints and longs, always returns false since there is no value that is NaN.
nodeIndex | |
attributeIndex |
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileConstant, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
static |
Static factory method that instantiates a new Profile object of the appropriate type.
If radii.size() == 2 and data.size() == 0, creates a ProfileEmpty object.
If radii.size() == 1 and data.size() == 1, creates a ProfileThin object.
If radii.size() == 2 and data.size() == 1, creates a ProfileConstant object.
If radii.size() >= 2 and data.size() == nRadii, creates a ProfileNPoint object.
If radii.size() == 0 and data.size() == 1, creates a ProfileSurface object.
This method copies the radius values and Data* pointers out of the provided vectors into its owne structures. Profile assumes ownership of the Data* pointers and will delete them when no longer needed.
radii | an array of zero or more radius values, in km. Values must be monotonically increasing. |
data | an array of pointers to Data objects. |
GeoTessException |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Static factory method that instantiates a new Profile object of the appropriate type.
If nRadii == 2 and nData == 0, creates a ProfileEmpty object.
If nRadii == 1 and nData == 1, creates a ProfileThin object.
If nRadii == 2 and nData == 1, creates a ProfileConstant object.
If nRadii >= 2 and nData == nRadii, creates a ProfileNPoint object.
If nRadii == 0 and nData == 1, creates a ProfileSurface object.
This method copies the radius values and Data* pointers out of the provided arrays into its own structures. Profile assumes ownership of the Data* pointers and will delete them when no longer needed. The callers retains ownership of the containing arrays however and should delete them when no longer needed.
radii | an array of zero or more radius values, in km. Values must be monotonically increasing. |
nRadii | the length of the radii array. |
data | an array of pointers to Data objects. |
nData | the length of the data array |
GeoTessException |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinevirtual |
Return true if the input Profile object (p) profile type is the same as this Profile object.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Replace the Data currently associated with this Profile with new Data.
The current Data objects are deleted.
This Profile assumes ownership of the input Data objects and will delete them when appropriate.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, geotess::GeoTessProfileConstant, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Replace the Data currently associated with this Profile with new Data.
The current Data objects are deleted.
This Profile assumes ownership of the input Data objects and will delete them when appropriate.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileThin, geotess::GeoTessProfileSurface, geotess::GeoTessProfileConstant, and geotess::GeoTessProfileSurfaceEmpty.
|
virtual |
Replace the radii currently associated with this Profile with new values.
Radius values are copied from the supplied vector. This Profile does NOT keep a reference to the input vector.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileSurfaceEmpty, geotess::GeoTessProfileThin, and geotess::GeoTessProfileSurface.
|
virtual |
Replace the radius at the specified nodeIndex.
Reimplemented in geotess::GeoTessProfileNPoint, geotess::GeoTessProfileEmpty, geotess::GeoTessProfileConstant, geotess::GeoTessProfileSurfaceEmpty, geotess::GeoTessProfileThin, and geotess::GeoTessProfileSurface.