36 #ifndef PROFILEEMPTY_OBJECT_H
37 #define PROFILEEMPTY_OBJECT_H
99 radiusTop(radTop), radiusBottom(radBot)
122 { radiusBottom = radii[rIndex++];
123 radiusTop = radii[rIndex++];
150 {
return GeoTessProfileType::EMPTY; };
156 {
return (GeoTessProfile::operator==(p) &&
166 int attributeIndex,
double radius,
167 bool allowRadiusOutOfRange)
const;
177 virtual double getValue(
int attributeIndex,
int nodeIndex)
const
178 {
return NaN_DOUBLE; }
190 virtual bool isNaN(
int nodeIndex,
int attributeIndex)
224 {
return i == 0 ? radiusBottom : radiusTop; };
240 {
float* fa =
new float [2]; fa[0] = radiusBottom; fa[1] = radiusTop;
return fa; };
261 virtual void setData(
const vector<GeoTessData*>& inData)
268 virtual void setRadii(
const vector<float>& newRadii)
269 { radiusBottom = newRadii[0]; radiusTop = newRadii[1]; }
276 radiusBottom = radius;
332 { ofs.
writeInt(GeoTessProfileType::EMPTY.ordinal());
348 {
return abs(radiusTop - radius) < abs(radiusBottom - radius) ? 1 : 0; }
392 double dkm,
double radius,
double hcoefficient)
const
402 double horizontalCoefficient)
const
408 vector<int>& nodeIndexes, vector<double>& coefficients,
409 double& radius,
bool& allowOutOfRange)
412 nodeIndexes.push_back(0);
413 coefficients.push_back(NaN_DOUBLE);
433 #endif // PROFILEEMPTY_OBJECT_H
virtual double getValue(int attributeIndex, int nodeIndex) const
Retrieve the value of the specified attribute interpolated from this profile at the specified radius ...
Definition: GeoTessProfileEmpty.h:177
virtual float getRadiusBottom() const
Get the radius at the bottom of the profile, in km.
Definition: GeoTessProfileEmpty.h:308
virtual float getRadiusTop() const
Get the radius at the top of the profile, in km.
Definition: GeoTessProfileEmpty.h:293
void writeFloat(float f)
Write float data.
Definition: IFStreamBinary.h:1716
virtual float getRadius(int i) const
Get the i'th radius value in this profile in km.
Definition: GeoTessProfileEmpty.h:223
GeoTessProfileEmpty(IFStreamAscii &ifs)
Standard constructor.
Definition: GeoTessProfileEmpty.h:113
static string class_name()
Returns the class name.
Definition: GeoTessProfileEmpty.h:134
void writeByte(byte b)
Write byte data.
Definition: IFStreamBinary.h:1408
virtual void setInterpolationCoefficients(const GeoTessInterpolatorType &interpType, vector< int > &nodeIndexes, vector< double > &coefficients, double &radius, bool &allowOutOfRange)
Definition: GeoTessProfileEmpty.h:407
Definition: ArrayReuse.h:55
virtual int getNRadii() const
Get the number of radii that comprise this profile.
Definition: GeoTessProfileEmpty.h:229
virtual bool isNaN(int nodeIndex, int attributeIndex)
Return true if the specified Data value is NaN.
Definition: GeoTessProfileEmpty.h:190
virtual const GeoTessProfileType & getType() const
Returns ProfileType (EMPTY).
Definition: GeoTessProfileEmpty.h:149
virtual void write(IFStreamAscii &ofs)
Write the radii and data values to binary file.
Definition: GeoTessProfileEmpty.h:331
virtual GeoTessProfile * copy()
Returns a deep copy of this profile.
Definition: GeoTessProfileEmpty.h:420
Opens a file for binary read and write access.
Definition: IFStreamBinary.h:79
GeoTessProfileEmpty(float radBot, float radTop)
Default constructor.
Definition: GeoTessProfileEmpty.h:98
virtual GeoTessData * getDataTop()
Get the Data object at the top of the profile.
Definition: GeoTessProfileEmpty.h:303
Enumeration of the interpolation algorithms supported by GeoTess including LINEAR, NATURAL_NEIGHBOR and CUBIC_SPLINE.
Definition: GeoTessInterpolatorType.h:71
virtual int getPointIndex(int nodeIndex) const
Get the pointIndex that corresponds to the supplied nodeIndex.
Definition: GeoTessProfileEmpty.h:381
virtual LONG_INT getMemory()
Definition: GeoTessProfileEmpty.h:142
Enumeration of the valid Profile types, including EMPTY, THIN, CONSTANT, NPOINT and SURFACE...
Definition: GeoTessProfileType.h:69
virtual ~GeoTessProfileEmpty()
Default destructor.
Definition: GeoTessProfileEmpty.h:129
virtual double getValueBottom(int attributeIndex) const
Retrieve the value of the specified attribute at the bottom of the layer.
Definition: GeoTessProfileEmpty.h:214
void writeFloatNL(float f)
Definition: IFStreamAscii.h:509
virtual void setPointIndex(int nodeIndex, int pointIndex)
Set the pointIndex that corresponds to the supplied nodeIndex.
Definition: GeoTessProfileEmpty.h:358
virtual double getValueTop(int attributeIndex) const
Retrieve the value of the specified attribute at the top of the layer.
Definition: GeoTessProfileEmpty.h:202
void writeInt(int i)
Definition: IFStreamAscii.h:500
virtual void setRadii(const vector< float > &newRadii)
Replace the radii currently associated with this Profile with new values.
Definition: GeoTessProfileEmpty.h:268
virtual float getRadiusTop() const
Get the radius at the top of the profile, in km.
A Profile object that defines two radii at the bottom and top of the associated layer, and no Data.
Definition: GeoTessProfileEmpty.h:74
#define byte
signed-byte typedef
Definition: CPPGlobals.h:94
Opens ascii file for read and write access.
Definition: IFStreamAscii.h:80
virtual int findClosestRadiusIndex(double radius) const
Find the index of the node in this Profile that has radius closest to the supplied radius...
Definition: GeoTessProfileEmpty.h:347
virtual void write(IFStreamBinary &ofs)
Write the radii and data values to binary file.
Definition: GeoTessProfileEmpty.h:323
float readFloat()
Read and return the next float.
Definition: IFStreamAscii.h:741
float readFloat()
Read float data.
Definition: IFStreamBinary.h:1117
#define LONG_INT
Definition: CPPGlobals.h:111
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
void writeFloat(float f)
Definition: IFStreamAscii.h:508
virtual int getNData() const
Get the number of Data objects that comprise this profile.
Definition: GeoTessProfileEmpty.h:234
virtual void setRadius(int index, float radius)
Replace the radius at the specified nodeIndex.
Definition: GeoTessProfileEmpty.h:271
virtual void setData(int index, GeoTessData *inData)
Resets the data object at index to the new input data.
Definition: GeoTessProfileEmpty.h:287
virtual GeoTessData * getDataBottom()
Get the Data object at the bottom of the profile.
Definition: GeoTessProfileEmpty.h:318
virtual void getCoefficients(map< int, double > &coefficients, double radius, double horizontalCoefficient) const
Definition: GeoTessProfileEmpty.h:401
virtual int class_size() const
Returns the class size.
Definition: GeoTessProfileEmpty.h:139
virtual float * getRadii()
Retrieve a deeep copy of the radii values in km.
Definition: GeoTessProfileEmpty.h:239
#define GEOTESS_EXP_IMP
Definition: CPPGlobals.h:71
GeoTessProfileEmpty(IFStreamBinary &ifs)
Standard constructor.
Definition: GeoTessProfileEmpty.h:105
void writeString(const string &s)
Definition: IFStreamAscii.h:484
GeoTessProfileEmpty(float radii[], int &rIndex)
Standard constructor creates references into the supplied array of radii.
Definition: GeoTessProfileEmpty.h:121
virtual void setData(const vector< GeoTessData * > &inData)
Resets the data object to the new input data.
Definition: GeoTessProfileEmpty.h:261
virtual void resetPointIndices()
Reset all the pointIndex values to -1.
Definition: GeoTessProfileEmpty.h:371
virtual float getRadiusBottom() const
Get the radius at the bottom of the profile, in km.
virtual void getWeights(map< int, double > &weights, double dkm, double radius, double hcoefficient) const
Add dkm * hcoefficient to the weight of this point index into the input map.
Definition: GeoTessProfileEmpty.h:391