36 #ifndef PROFILESURFACE_OBJECT_H
37 #define PROFILESURFACE_OBJECT_H
63 class GeoTessMetaData;
124 {
return GeoTessProfileType::SURFACE; };
130 {
return (GeoTessProfile::operator==(p) &&
142 virtual double getValue(
int attributeIndex,
int nodeIndex)
const
144 return nodeIndex == 0 ? data->
getDouble(attributeIndex) : NaN_DOUBLE;
154 {
return data->
getDouble(attributeIndex); }
166 virtual bool isNaN(
int nodeIndex,
int attributeIndex)
168 return nodeIndex != 0 || data->
isNaN(attributeIndex);
176 int attributeIndex,
double radius,
177 bool allowRadiusOutOfRange)
const
179 return getData(0).getDouble(attributeIndex);
187 {
return NaN_FLOAT; };
223 virtual void setData(
const vector<GeoTessData*>& inData)
224 {
delete data; data = inData[0]; }
230 {
delete data; data = inData; }
236 virtual void setRadii(
const vector<float>& newRadii)
246 {
return NaN_FLOAT; };
262 {
return NaN_FLOAT; };
280 data(NULL), pointIndex(-1)
281 { data = GeoTessData::getData(ifs, gtmd); };
286 GeoTessProfileSurface(IFStreamAscii& ifs, GeoTessMetaData& gtmd) : GeoTessProfile(),
287 data(NULL), pointIndex(-1)
288 { data = GeoTessData::getData(ifs, gtmd); };
294 virtual ~GeoTessProfileSurface() {
if (data != NULL)
delete data; };
299 virtual void write(IFStreamBinary& ofs)
300 { ofs.writeByte((
byte) GeoTessProfileType::SURFACE.ordinal());
306 virtual void write(IFStreamAscii& ofs)
307 { ofs.writeInt(GeoTessProfileType::SURFACE.ordinal());
320 virtual int findClosestRadiusIndex(
double radius)
const
331 virtual void setPointIndex(
int nodeIndex,
int pntIndex)
332 { pointIndex = pntIndex; }
342 virtual void resetPointIndices() { pointIndex = -1; }
352 virtual int getPointIndex(
int nodeIndex)
const
353 {
return pointIndex; }
359 virtual GeoTessProfile* copy()
361 return new GeoTessProfileSurface(data->copy());
370 #endif // PROFILESURFACE_OBJECT_H
virtual GeoTessData * getData(int i)
Retrieve a reference the i'th Data object.
Definition: GeoTessProfileSurface.h:213
virtual float * getRadii()
Returns NULL.
Definition: GeoTessProfileSurface.h:202
virtual double getDouble(int attributeIndex) const
Retrieve the value of the attribute at the specified attribute index as a double value.
virtual int getNData() const
Get the number of Data objects that comprise this profile.
Definition: GeoTessProfileSurface.h:197
virtual LONG_INT getMemory()
virtual float getRadiusBottom() const
Get the radius at the bottom of the profile, in km.
Definition: GeoTessProfileSurface.h:261
A Profile object that defines a single Data object and no radius value.
Definition: GeoTessProfileSurface.h:76
virtual const GeoTessData & getData(int i) const
Retrieve a reference the i'th Data object.
Definition: GeoTessProfileSurface.h:218
Definition: ArrayReuse.h:55
Opens a file for binary read and write access.
Definition: IFStreamBinary.h:79
virtual const GeoTessData & getDataBottom() const
Get the Data object at the bottom of the profile.
Definition: GeoTessProfileSurface.h:267
virtual LONG_INT getMemory()
Definition: GeoTessProfileSurface.h:115
Enumeration of the interpolation algorithms supported by GeoTess including LINEAR, NATURAL_NEIGHBOR and CUBIC_SPLINE.
Definition: GeoTessInterpolatorType.h:71
virtual GeoTessData * getDataBottom()
Get the Data object at the bottom of the profile.
Definition: GeoTessProfileSurface.h:272
GeoTessProfileSurface(GeoTessData *dat)
Default constructor.
Definition: GeoTessProfileSurface.h:101
Enumeration of the valid Profile types, including EMPTY, THIN, CONSTANT, NPOINT and SURFACE...
Definition: GeoTessProfileType.h:69
virtual const GeoTessProfileType & getType() const
Returns ProfileType (SURFACE).
Definition: GeoTessProfileSurface.h:123
virtual GeoTessData ** getData()
Retrieve a shallow copy of the array of Data objects associated with this Profile.
virtual const GeoTessData & getDataTop() const
Get the Data object at the top of the profile.
Definition: GeoTessProfileSurface.h:251
virtual double getValue(int attributeIndex, int nodeIndex) const
Retrieve the value of the specified attribute from this profile at the specified node index...
Definition: GeoTessProfileSurface.h:142
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.
Definition: GeoTessProfileSurface.h:175
virtual bool isNaN(int attributeIndex) const
Returns true if the specified attribute is NaN.
#define byte
signed-byte typedef
Definition: CPPGlobals.h:94
virtual bool isNaN(int nodeIndex, int attributeIndex)
Return true if the specified Data value is NaN.
Definition: GeoTessProfileSurface.h:166
#define LONG_INT
Definition: CPPGlobals.h:111
virtual float getRadiusTop() const
Get the radius at the top of the profile, in km.
Definition: GeoTessProfileSurface.h:245
Abstract class that manages the radii and data values that span a single layer associated with a sing...
Definition: GeoTessProfile.h:96
Abstract base class that manages the data values attached to a single grid point. ...
Definition: GeoTessData.h:75
static string class_name()
Returns the class name.
Definition: GeoTessProfileSurface.h:107
virtual int class_size() const
Returns the class size.
Definition: GeoTessProfileSurface.h:112
virtual double getValueTop(int attributeIndex) const
Retrieve the value of the specified attribute at the top of the layer.
Definition: GeoTessProfileSurface.h:153
virtual void setData(const vector< GeoTessData * > &inData)
Resets the data object to the new input data.
Definition: GeoTessProfileSurface.h:223
virtual GeoTessData ** getData()
Retrieve a shallow copy of all of the Data objects associated with thisProfile.
Definition: GeoTessProfileSurface.h:207
virtual GeoTessData * getDataTop()
Get the Data object at the top of the profile.
Definition: GeoTessProfileSurface.h:256
virtual void setData(int index, GeoTessData *inData)
Resets the data object at index to the new input data.
Definition: GeoTessProfileSurface.h:229
#define GEOTESS_EXP_IMP
Definition: CPPGlobals.h:71
virtual float getRadius(int i) const
Get the i'th radius value in this profile in km.
Definition: GeoTessProfileSurface.h:186
virtual void setRadii(const vector< float > &newRadii)
Replace the radii currently associated with this Profile with new values.
Definition: GeoTessProfileSurface.h:236
virtual int getNRadii() const
Get the number of radii that comprise this profile.
Definition: GeoTessProfileSurface.h:192
virtual void setRadius(int index, float radius)
Replace the radius at the specified nodeIndex.
Definition: GeoTessProfileSurface.h:239