OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAdjMapModel.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 // Copyright (c) 2005, Oscar Kramer, all rights reserved.
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: Oscar Kramer
9 //
10 // Description:
11 //
12 // Special "sensor model" that provides a conventional map projection but
13 // with additional capability for adjusting the map x,y coordinates with
14 // offset, scale, and rotation transform. Funtions to control notifications,
15 // information and error output.
16 //
17 //----------------------------------------------------------------------------
18 // $Id: ossimAdjMapModel.h 15766 2009-10-20 12:37:09Z gpotts $
19 #ifndef ossimAdjMapModel_HEADER
20 #define ossimAdjMapModel_HEADER
21 
22 #include <ossim/matrix/newmat.h>
25 #include <ossim/base/ossimDpt.h>
26 #include <ossim/base/ossimRefPtr.h>
27 
28 using namespace NEWMAT;
29 
30 class ossimMapProjection;
31 
32 //----------------------------------------------------------------------------
33 // CLASS DESCRIPTION: ossimAdjMapModel
35 // additional
37 // rotation transform.
38 //----------------------------------------------------------------------------
40 {
41 public:
44 
46  ossimAdjMapModel(ossimMapProjection* map_proj, const ossimIpt& image_size);
47 
49  ossimAdjMapModel(const ossimAdjMapModel& copy_this);
50 
52  ossimAdjMapModel(const ossimKeywordlist& kwl, const char* prefix);
53 
55  ossimAdjMapModel(const ossimFilename& geom_filename);
56 
58  // Returns TRUE if all's well.
59  bool initializeFromMap();
60 
62  virtual ossimObject* dup() const;
63 
65  virtual std::ostream& print(std::ostream& out) const;
66 
69  virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
70 
71  virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
72 
74  // to output stream.
75  static void writeGeomTemplate(ostream& os);
76 
78  virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
79  const double& heightEllipsoid,
80  ossimGpt& worldPoint) const;
81 
83  virtual void lineSampleToWorld(const ossimDpt& image_point,
84  ossimGpt& worldPoint) const;
85 
87  // solution.
88  virtual void worldToLineSample(const ossimGpt& world_point,
89  ossimDpt& image_point) const;
90 
92  // called to permit
94  virtual void updateModel();
95 
98  virtual void initAdjustableParameters();
99 
101  virtual ossimDpt getMetersPerPixel () const;
102 
105  {
106  OFFSET_X = 0, // meters
107  OFFSET_Y, // meters
108  ROTATION, // degrees CCW
109  SCALE_X, // ratio
110  SCALE_Y, // ratio
111  NUM_ADJ_PARAMS // not an index
112  };
113 
117  inline virtual bool useForward()const {return true;}
118 
119 private:
121  virtual ~ossimAdjMapModel();
122 
129 
131  double theCosTheta;
132  double theSinTheta;
133 
134 TYPE_DATA
135 };
136 
137 #endif /* End of "#ifndef ossimAdjMapModel_HEADER" */
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
ColumnVector theAdjParams
This is the vector of UNNORMALIZED, BIASED parameters as used in the model.
std::ostream & print(H5::H5File *file, std::ostream &out)
Print method.
Definition: ossimH5Util.cpp:41
virtual bool useForward() const
#define TYPE_DATA
Definition: ossimRtti.h:339
ossimRefPtr< ossimMapProjection > theMapProjection
AdjParamIndex
Enumeration for adjustable parameter positions in theAdjParams vector.
Special "sensor model" that provides a conventional map projection but with.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23