OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimPolynomProjection.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // FILE: ossimPolynomProjection.h
3 // AUTHOR: Frederic Claudel Meraka/CSIR
4 //*****************************************************************************
5 
6 #ifndef ossimPolynomProjection_HEADER
7 #define ossimPolynomProjection_HEADER
8 
11 #include <ossim/base/ossimIpt.h>
13 
20 {
21 public:
22 
29 
33  virtual bool operator==(const ossimProjection& projection) const;
34  virtual bool saveState(ossimKeywordlist& kwl,
35  const char* prefix=0) const;
36  virtual bool loadState(const ossimKeywordlist& kwl,
37  const char* prefix=0);
38  virtual std::ostream& print(std::ostream& out) const;
39  virtual ossimObject* dup() const { return new ossimPolynomProjection(*this); }
40 
44  virtual void worldToLineSample(const ossimGpt& world_point,
45  ossimDpt& image_point) const;
46  virtual void lineSampleToWorld(const ossimDpt& image_point,
47  ossimGpt& world_point) const;
48  virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
49  const double& heightEllipsoid,
50  ossimGpt& worldPoint) const;
51  virtual ossimGpt origin()const;
52  virtual ossimDpt getMetersPerPixel() const;
53 
57  virtual bool setupOptimizer(const ossimString& setup);
58  inline virtual bool useForward()const {return true;}
59  virtual ossim_uint32 degreesOfFreedom()const;
60  virtual double optimizeFit(const ossimTieGptSet& tieSet, double* targetVariance=NULL);
61 
65  const ossimPolynom< ossim_float64 , 3 >::EXPT_SET& getExpSet()const { return theExpSet; }
66  void setExpSet(const ossimPolynom< ossim_float64 , 3 >::EXPT_SET& nset) { theExpSet = nset; }
67  void setupDesiredExponents(int horizonal_ord, int vertical_ord);
68  bool setupDesiredExponents(const ossimString& monoms);
69 
70  const ossimPolynom< ossim_float64 , 3 >& getPolyLine()const {return thePolyLine;}
71  void setPolyLine(const ossimPolynom< ossim_float64 , 3 >& poly);
72  const ossimPolynom< ossim_float64 , 3 >& getPolySamp()const {return thePolySamp;}
73  void setPolySamp(const ossimPolynom< ossim_float64 , 3 >& poly);
74 
75  const ossim_float64& getLonOffset()const { return theLonOffset;}
76  void setLonOffset(const ossim_float64& v) { theLonOffset = v; }
77  const ossim_float64& getLonScale()const { return theLonScale;}
78  void setLonScale(const ossim_float64& v) { theLonScale = v; }
79 
80  const ossim_float64& getLatOffset()const { return theLatOffset;}
81  void setLatOffset(const ossim_float64& v) { theLatOffset = v; }
82  const ossim_float64& getLatScale()const { return theLatScale;}
83  void setLatScale(const ossim_float64& v) { theLatScale = v; }
84 
85  const ossim_float64& getHgtOffset()const { return theHgtOffset;}
86  void setHgtOffset(const ossim_float64& v) { theHgtOffset = v; }
87  const ossim_float64& getHgtScale()const { return theHgtScale;}
88  void setHgtScale(const ossim_float64& v) { theHgtScale = v; }
89 
95  virtual bool isAffectedByElevation() const { return true; }
96 
97 protected:
103 
109 
117 
127 
131  void buildDerivatives();
132  void buildLineDerivatives();
133  void buildSampDerivatives();
134  bool stringToExp(const ossimString& s, ossimPolynom< ossim_float64 , 3 >::EXP_TUPLE& et)const;
135  int getSymbol(ossimString& ts,const ossimString& symbols)const;
136  int getExponent(ossimString& ts)const;
137 
138 TYPE_DATA
139 };
140 
141 #endif
142 
const ossim_float64 & getHgtScale() const
ossimPolynom< ossim_float64, 3 >::EXPT_SET theExpSet
desired exponents tuples set (for both line and sample polynoms) used for optimization ...
virtual bool setupOptimizer(const ossimString &setup)
setupFromString() Derived classes should implement as needed. Initialize parameters needed for optimi...
const ossim_float64 & getHgtOffset() const
const ossim_float64 & getLonScale() const
Represents serializable keyword/value map.
virtual bool useForward() const
const ossim_float64 & getLatOffset() const
virtual ossim_uint32 degreesOfFreedom() const =0
void setExpSet(const ossimPolynom< ossim_float64, 3 >::EXPT_SET &nset)
template class for multivariate polynom algebra
Definition: ossimPolynom.h:38
void setHgtScale(const ossim_float64 &v)
ossimPolynom< ossim_float64, 3 > thePolySamp_DLat
const ossim_float64 & getLonOffset() const
virtual bool isAffectedByElevation() const
Implementation of pure virtual ossimProjection::isAffectedByElevation method.
std::ostream & print(H5::H5File *file, std::ostream &out)
Print method.
Definition: ossimH5Util.cpp:41
const ossim_float64 & getLatScale() const
virtual double optimizeFit(const ossimTieGptSet &tieSet, double *targetVariance=0)=0
ossimPolynom< ossim_float64, 3 > thePolySamp
xyz polynom
ossim_float64 theLonOffset
normalization parameters
void setHgtOffset(const ossim_float64 &v)
const ossimPolynom< ossim_float64, 3 > & getPolySamp() const
double ossim_float64
const ossimPolynom< ossim_float64, 3 >::EXPT_SET & getExpSet() const
accessors (not all of them inline)
virtual ossimObject * dup() const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual class enabling projection optimization (can be used for outlier rejection - RANSAC) ...
#define TYPE_DATA
Definition: ossimRtti.h:339
virtual ossimDpt getMetersPerPixel() const =0
virtual void lineSampleHeightToWorld(const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const =0
unsigned int ossim_uint32
ossimPolynom< ossim_float64, 3 > thePolyLine_DLon
polynom partial derivatives
bool operator==(const ossimRefPtr< _Tp1 > &__a, const ossimRefPtr< _Tp2 > &__b) noexcept
Definition: ossimRefPtr.h:101
ossimPolynom< ossim_float64, 3 > thePolyLine
ground (3d) to image(2D) polynoms
class for ground to image polynomial projection: (x,y,z)|->(x,y) polynom order is configurable ...
const ossimPolynom< ossim_float64, 3 > & getPolyLine() const
added for easy setup
ossimPolynom< ossim_float64, 3 > thePolySamp_DLon
void setLonOffset(const ossim_float64 &v)
virtual ossimGpt origin() const =0
storage class for a set of geographic tie points, between master and slave images ...
#define OSSIM_DLL
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
void setLatScale(const ossim_float64 &v)
virtual void lineSampleToWorld(const ossimDpt &lineSampPt, ossimGpt &worldPt) const =0
void setLatOffset(const ossim_float64 &v)
virtual void worldToLineSample(const ossimGpt &worldPoint, ossimDpt &lineSampPt) const =0
void setLonScale(const ossim_float64 &v)
ossimPolynom< ossim_float64, 3 > thePolyLine_DLat
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23