/usr/include/ossim/base/ossimTieGpt.h is in libossim-dev 1.8.16-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | #ifndef ossimTieGpt_HEADER
#define ossimTieGpt_HEADER
#include <iostream>
#include <ossim/base/ossimXmlNode.h>
#include <ossim/base/ossimGpt.h>
#include <ossim/base/ossimReferenced.h>
class ossimDpt;
/**
* storage class for tie point between ground and image
* based on ossimGpt
* + GML feature (OGC) serialization
*
* NOTES
* accuracy is not stored here (need to derive object if need a per-point accuracy)
* GML storage is WGS84 only, it stores above ellipsoid height (m)
*
* TODO :
* -support other datum (easy) / ground projection (big change in OSSIM)
* -unify with ossimTDpt
*/
class OSSIMDLLEXPORT ossimTieGpt :
public ossimReferenced,
public ossimGpt
{
public:
inline ossimTieGpt() :
ossimReferenced(),
ossimGpt(),
tie(),
score(0.0)
{}
inline ossimTieGpt(const ossimGpt& aPt, const ossimDpt& aTie, const ossim_float64& aScore) :
ossimReferenced(),
ossimGpt(aPt),
tie(aTie),
score(aScore)
{}
inline ossimTieGpt(const ossimTieGpt& tpt) :
ossimReferenced(tpt),
ossimGpt(tpt),
tie(tpt.tie),
score(tpt.score)
{}
inline ~ossimTieGpt() {}
const ossimTieGpt& operator=(const ossimTieGpt&);
inline void setGroundPoint(const ossimGpt& mPt) { ossimGpt::operator=(mPt); }
inline const ossimGpt& getGroundPoint()const { return *this; }
inline ossimGpt& refGroundPoint() { return *this; }
inline void setImagePoint(const ossimDpt& sPt) { tie=sPt; }
inline const ossimDpt& getImagePoint()const { return tie; }
inline ossimDpt& refImagePoint() { return tie; }
inline void setScore(const ossim_float64& s) { score=s; }
inline const ossim_float64& getScore()const { return score; }
inline ossim_float64& refScore() { return score; }
void makeNan()
{
ossimGpt::makeNan();
tie.makeNan();
score=ossim::nan();
}
bool hasNans()const
{
return (ossimGpt::hasNans() || tie.hasNans() || (ossim::isnan(score)));
}
bool isNan()const
{
return (ossimGpt::isNan() && tie.isNan() && (ossim::isnan(score)));
}
/**
* text serialization
*/
std::ostream& print(std::ostream& os) const;
std::ostream& printTab(std::ostream& os) const;
friend OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& os,
const ossimTieGpt& pt);
/**
* Method to input the formatted string of the "operator<<".
*
* Expected format: ( ( ossimGpt ), ( ossimDpt ), 0.50000000000000 )
* --*this---- , ----tie-----, ---score--------
*
*/
friend OSSIMDLLEXPORT std::istream& operator>>(std::istream& is,
ossimTieGpt& pt);
/**
* GML feauture (XML) serialization
*/
ossimRefPtr<ossimXmlNode> exportAsGmlNode(ossimString aGmlVersion="2.1.2")const;
bool importFromGmlNode(ossimRefPtr<ossimXmlNode> aGmlNode, ossimString aGmlVersion="2.1.2");
/**
* Public data members
*/
ossimDpt tie;
ossim_float64 score;
};
inline const ossimTieGpt& ossimTieGpt::operator=(const ossimTieGpt& pt)
{
if (this != &pt)
{
ossimReferenced::operator=(pt);
ossimGpt::operator=(pt);
tie = pt.tie;
score = pt.score;
}
return *this;
}
#endif /* #ifndef ossimTieGpt_HEADER */
|