OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimTieGpt.h
Go to the documentation of this file.
1 #ifndef ossimTieGpt_HEADER
2 #define ossimTieGpt_HEADER
3 
4 #include <iostream>
6 #include <ossim/base/ossimGpt.h>
8 
9 class ossimDpt;
10 
25  public ossimReferenced,
26  public ossimGpt
27 {
28 public:
29 
30  inline ossimTieGpt() :
32  ossimGpt(),
33  tie(),
34  score(0.0)
35  {}
36 
37  inline ossimTieGpt(const ossimGpt& aPt, const ossimDpt& aTie, const ossim_float64& aScore) :
39  ossimGpt(aPt),
40  tie(aTie),
41  score(aScore)
42  {}
43 
44  inline ossimTieGpt(const ossimTieGpt& tpt) :
45  ossimReferenced(tpt),
46  ossimGpt(tpt),
47  tie(tpt.tie),
48  score(tpt.score)
49  {}
50  inline ~ossimTieGpt() {}
51 
52  const ossimTieGpt& operator=(const ossimTieGpt&);
53 
54  inline void setGroundPoint(const ossimGpt& mPt) { ossimGpt::operator=(mPt); }
55  inline const ossimGpt& getGroundPoint()const { return *this; }
56  inline ossimGpt& refGroundPoint() { return *this; }
57 
58  inline void setImagePoint(const ossimDpt& sPt) { tie=sPt; }
59  inline const ossimDpt& getImagePoint()const { return tie; }
60  inline ossimDpt& refImagePoint() { return tie; }
61 
62  inline void setScore(const ossim_float64& s) { score=s; }
63  inline const ossim_float64& getScore()const { return score; }
64  inline ossim_float64& refScore() { return score; }
65 
66  void makeNan()
67  {
69  tie.makeNan();
70  score=ossim::nan();
71  }
72 
73  bool hasNans()const
74  {
75  return (ossimGpt::hasNans() || tie.hasNans() || (ossim::isnan(score)));
76  }
77 
78  bool isNan()const
79  {
80  return (ossimGpt::isNan() && tie.isNan() && (ossim::isnan(score)));
81  }
85  std::ostream& print(std::ostream& os) const;
86  std::ostream& printTab(std::ostream& os) const;
87 
89  const ossimTieGpt& pt);
98  ossimTieGpt& pt);
102  ossimRefPtr<ossimXmlNode> exportAsGmlNode(ossimString aGmlVersion="2.1.2")const;
103  bool importFromGmlNode(ossimRefPtr<ossimXmlNode> aGmlNode, ossimString aGmlVersion="2.1.2");
104 
110 };
111 
113 {
114  if (this != &pt)
115  {
118  tie = pt.tie;
119  score = pt.score;
120  }
121 
122  return *this;
123 }
124 
125 #endif /* #ifndef ossimTieGpt_HEADER */
const ossimGpt & operator=(const ossimGpt &aPt)
Definition: ossimGpt.h:285
ossimTieGpt(const ossimGpt &aPt, const ossimDpt &aTie, const ossim_float64 &aScore)
Definition: ossimTieGpt.h:37
ossimDpt & refImagePoint()
Definition: ossimTieGpt.h:60
#define OSSIMDLLEXPORT
const ossim_float64 & getScore() const
Definition: ossimTieGpt.h:63
friend OSSIMDLLEXPORT std::istream & operator>>(std::istream &is, ossimGpt &pt)
Method to input the formatted string of the "operator<<".
Definition: ossimGpt.cpp:122
friend OSSIMDLLEXPORT std::ostream & operator<<(std::ostream &os, const ossimGpt &pt)
Definition: ossimGpt.cpp:73
ossimReferenced allows for shared object ref counting if the reference count ever gets to 0 or less i...
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
void makeNan()
Definition: ossimTieGpt.h:66
ossim_float64 & refScore()
Definition: ossimTieGpt.h:64
void makeNan()
Definition: ossimGpt.h:130
ossimDpt tie
Public data members.
Definition: ossimTieGpt.h:108
void setScore(const ossim_float64 &s)
Definition: ossimTieGpt.h:62
bool isNan() const
Definition: ossimGpt.h:131
double ossim_float64
ossimTieGpt(const ossimTieGpt &tpt)
Definition: ossimTieGpt.h:44
std::ostream & print(std::ostream &os, ossim_uint32 precision=15) const
Definition: ossimGpt.cpp:27
ossimGpt & refGroundPoint()
Definition: ossimTieGpt.h:56
storage class for tie point between ground and image based on ossimGpt
Definition: ossimTieGpt.h:24
const ossimGpt & getGroundPoint() const
Definition: ossimTieGpt.h:55
const ossimDpt & getImagePoint() const
Definition: ossimTieGpt.h:59
bool hasNans() const
Definition: ossimTieGpt.h:73
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
bool hasNans() const
Definition: ossimGpt.h:135
ossimReferenced & operator=(const ossimReferenced &)
ossim_float64 score
Definition: ossimTieGpt.h:109
bool isNan() const
Definition: ossimTieGpt.h:78
void setImagePoint(const ossimDpt &sPt)
Definition: ossimTieGpt.h:58
const ossimTieGpt & operator=(const ossimTieGpt &)
Definition: ossimTieGpt.h:112
void setGroundPoint(const ossimGpt &mPt)
Definition: ossimTieGpt.h:54
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91