36 #ifndef POINTMAP_OBJECT_H
37 #define POINTMAP_OBJECT_H
114 vector<vector<int> > pointMap;
155 + (
LONG_INT)(pointMap.capacity() *
sizeof(vector<int>)
156 + pointMap.size() * 3 * (
LONG_INT)
sizeof(
int));
189 GeoTessPolygon* plgn = GeoTessPolygonFactory::getPolygon(polygonFileName);
190 setActiveRegion(plgn);
224 return pointMap.size();
237 return pointMap[pointIndex][0];
263 return pointMap[pointIndex][1];
276 return pointMap[pointIndex][2];
289 return pointMap[pointIndex];
319 return profiles[vertex][layer]->
getPointIndex(profiles[vertex][layer]->getNData()-1);
342 vector<int>& map = pointMap[pointIndex];
343 profiles[map[0]][map[1]]->
setData(map[2], data);
353 vector<int>& map = pointMap[pointIndex];
354 return profiles[map[0]][map[1]]->
getData(map[2]);
365 template <
typename T>
368 vector<int>& map = pointMap[pointIndex];
382 vector<int>& map = pointMap[pointIndex];
383 return profiles[map[0]][map[1]]->
getValue(attributeIndex, map[2]);
397 vector<int>& map = pointMap[pointIndex];
398 return profiles[map[0]][map[1]]->
getData(map[2])->
getDouble(attributeIndex);
412 vector<int>& map = pointMap[pointIndex];
413 return profiles[map[0]][map[1]]->
getData(map[2])->
getFloat(attributeIndex);
427 vector<int>& map = pointMap[pointIndex];
428 return profiles[map[0]][map[1]]->
getData(map[2])->
getLong(attributeIndex);
442 vector<int>& map = pointMap[pointIndex];
443 return profiles[map[0]][map[1]]->
getData(map[2])->
getInt(attributeIndex);
457 vector<int>& map = pointMap[pointIndex];
458 return profiles[map[0]][map[1]]->
getData(map[2])->
getShort(attributeIndex);
472 vector<int>& map = pointMap[pointIndex];
473 return profiles[map[0]][map[1]]->
getData(map[2])->
getByte(attributeIndex);
485 bool isNaN(
int pointIndex,
int attributeIndex)
487 vector<int>& map = pointMap[pointIndex];
488 return profiles[map[0]][map[1]]->
isNaN(map[2], attributeIndex);
501 vector<int>& map = pointMap[pointIndex];
502 const double* vv = grid.
getVertex(map[0]);
503 double r = profiles[map[0]][map[1]]->
getRadius(map[2]);
517 return grid.
getVertex(pointMap[pointIndex][0]);
528 vector<int>& map = pointMap[pointIndex];
529 return profiles[map[0]][map[1]]->
getRadius(map[2]);
540 vector<int>& map = pointMap[pointIndex];
541 return GeoTessUtils::getEarthRadius(
543 - profiles[map[0]][map[1]]->
getRadius(map[2]);
555 vector<int>& m1 = pointMap[pointIndex1];
556 vector<int>& m2 = pointMap[pointIndex2];
557 return GeoTessUtils::getDistance3D(grid.
getVertex(m1[0]),
559 profiles[m2[0]][m2[1]]->
getRadius(m2[2]));
605 return GeoTessUtils::getLatLonString(getPointUnitVector(pointIndex));
616 string frmt =
"%8.3f";
617 sprintf(s, frmt.c_str(), getPointDepth(pointIndex));
618 return GeoTessUtils::getLatLonString(getPointUnitVector(pointIndex))
Abstract base class that manages the data values attached to a single grid point.
virtual GeoTessData & setValue(int attributeIndex, double v)
virtual byte getByte(int attributeIndex) const
virtual float getFloat(int attributeIndex) const
virtual double getDouble(int attributeIndex) const
virtual LONG_INT getLong(int attributeIndex) const
virtual int getInt(int attributeIndex) const
virtual short getShort(int attributeIndex) const
Manages the geometry and topology of one or more multi-level triangular tessellations of a unit spher...
const double * getVertex(int vertex) const
Top level class that manages the GeoTessMetaData, GeoTessGrid and GeoTessData that comprise a 3D Eart...
Relationships between vertices (2D positions in a tessellation), nodes (1D positions along a radial P...
GeoTessData * getPointData(int pointIndex)
void getPointNeighbors(set< int > &pointNeighbors, int pointIndex)
void getPointVector(int pointIndex, double *v)
int getNodeIndex(int pointIndex)
float getPointValueFloat(int pointIndex, int attributeIndex)
double getPointValue(int pointIndex, int attributeIndex)
void setPointData(int pointIndex, GeoTessData *data)
GeoTessPointMap(GeoTessPointMap &other)
const double * getPointUnitVector(int pointIndex) const
double getPointRadius(int pointIndex)
double getPointDepth(int pointIndex)
byte getPointValueByte(int pointIndex, int attributeIndex)
double getPointValueDouble(int pointIndex, int attributeIndex)
int getTessId(int pointIndex)
void setActiveRegion(GeoTessPolygon *polygon)
short getPointValueShort(int pointIndex, int attributeIndex)
int getLayerIndex(int pointIndex)
int getPointValueInt(int pointIndex, int attributeIndex)
int getVertexIndex(int pointIndex)
LONG_INT getPointValueLong(int pointIndex, int attributeIndex)
const vector< int > & getPointIndices(int pointIndex)
bool operator!=(const GeoTessPointMap &other)
string getPointLatLonString(int pointIndex)
bool operator==(const GeoTessPointMap &other)
void setPointValue(int pointIndex, int attributeIndex, T value)
int getPointIndexLast(int vertex, int layer)
bool isNaN(int pointIndex, int attributeIndex)
void setActiveRegion(const string &polygonFileName)
double getDistance3D(int pointIndex1, int pointIndex2)
int getPointIndexFirst(int vertex, int layer)
GeoTessPolygon * getPolygon()
GeoTessPointMap(GeoTessModel &m)
string toString(int pointIndex)
int getPointIndex(int vertex, int layer, int node)
GeoTessPointMap & operator=(const GeoTessPointMap &other)
An ordered list of points on the surface of a unit sphere that define a closed polygon.
Abstract class that manages the radii and data values that span a single layer associated with a sing...
virtual float getRadius(int i) const
virtual bool isNaN(int nodeIndex, int attributeIndex)
virtual void setData(int index, GeoTessData *data)
virtual GeoTessData ** getData()
virtual int getPointIndex(int nodeIndex) const
virtual double getValue(const GeoTessInterpolatorType &rInterpType, int attributeIndex, double radius, bool allowRadiusOutOfRange) const