OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ossimplugins::ossimTileMapModel Class Reference

#include <ossimTileMapModel.h>

Inheritance diagram for ossimplugins::ossimTileMapModel:
ossimSensorModel ossimProjection ossimOptimizableProjection ossimAdjustableParameterInterface ossimObject ossimErrorStatusInterface ossimReferenced

Public Types

enum  ProjectionType {
  UNKNOWN_PROJECTION = 0, UTM_MAP, UTM_ORBIT, SOM_MAP,
  SOM_ORBIT
}
 
- Public Types inherited from ossimSensorModel
enum  CovMatStatus { COV_INVALID = 0, COV_PARTIAL = 1, COV_FULL = 2 }
 
enum  DeriveMode {
  OBS_INIT =-99, EVALUATE =-98, P_WRT_X = -1, P_WRT_Y = -2,
  P_WRT_Z = -3
}
 

Public Member Functions

 ossimTileMapModel ()
 
 ossimTileMapModel (const ossimKeywordlist &geom_kwl)
 
 ossimTileMapModel (const ossimTileMapModel &rhs)
 
virtual ~ossimTileMapModel ()
 
virtual ossimObjectdup () const
 
virtual std::ostream & print (std::ostream &out) const
 
bool open (const ossimFilename &file)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual void worldToLineSample (const ossimGpt &ground_point, ossimDpt &img_pt) const
 
virtual void lineSampleHeightToWorld (const ossimDpt &image_point, const double &heightEllipsoid, ossimGpt &worldPoint) const
 
virtual void lineSampleToWorld (const ossimDpt &image_point, ossimGpt &worldPoint) const
 
void setDepth (unsigned int depth)
 
unsigned int getDepth ()
 
virtual bool useForward () const
 
- Public Member Functions inherited from ossimSensorModel
 ossimSensorModel ()
 
 ossimSensorModel (const ossimSensorModel &copy_this)
 
 ossimSensorModel (const ossimKeywordlist &geom_kwl)
 
const ossimSensorModeloperator= (const ossimSensorModel &rhs)
 assignment operator More...
 
virtual ossimObjectgetBaseObject ()
 
virtual const ossimObjectgetBaseObject () const
 
virtual ossimGpt origin () const
 
virtual ossimDpt getMetersPerPixel () const
 
virtual const double & getNominalPosError () const
 Returns the estimated Absolute horizontal position error (CE90) of the sensor model. More...
 
virtual const double & getRelativePosError () const
 Returns the estimated RELATIVE horizontal position error (CE90) of the sensor model. More...
 
virtual void setNominalPosError (const double &ce90)
 Assigns the absolute image position error uncertainty (abs CE90) More...
 
virtual void setRelativePosError (const double &ce90)
 Assigns the relative image position error uncertainty (rel CE90) More...
 
virtual void imagingRay (const ossimDpt &image_point, ossimEcefRay &image_ray) const
 
void setRefImgPt (const ossimDpt &pt)
 Sets the center line sampe of the image. More...
 
void setRefGndPt (const ossimGpt &pt)
 Sets the center latitude, longitude, height of the image. More...
 
void setImageRect (const ossimDrect &imageRect)
 
void setGroundRect (const ossimGpt &ul, const ossimGpt &ur, const ossimGpt &lr, const ossimGpt &ll)
 
ossimDpt imageSize () const
 
void setImageSize (const ossimDpt &size)
 
virtual void adjustableParametersChanged ()
 
virtual void updateModel ()
 
virtual bool insideImage (const ossimDpt &p) const
 
virtual bool operator== (const ossimProjection &proj) const
 
const ossimStringgetImageID () const
 Access methods: More...
 
const ossimDrectgetImageClipRect () const
 
virtual ossim_uint32 degreesOfFreedom () const
 
virtual bool needsInitialState () const
 needsInitialState() More...
 
virtual double optimizeFit (const ossimTieGptSet &tieSet, double *targetVariance=0)
 
virtual ossimDpt getForwardDeriv (int parmIdx, const ossimGpt &gpos, double hdelta=1e-11)
 
virtual ossimGpt getInverseDeriv (int parmIdx, const ossimDpt &ipos, double hdelta=1e-11)
 
virtual ossimSensorModel::CovMatStatus getObsCovMat (const ossimDpt &ipos, NEWMAT::SymmetricMatrix &Cov, const ossim_float64 defPointingSigma=0.5) const
 Gives 2X2 covariance matrix of observations. More...
 
virtual bool isAffectedByElevation () const
 Implementation of pure virtual ossimProjection::isAffectedByElevation method. More...
 
void computeGsd ()
 This method computes the ground sample distance(gsd) and sets class attributes theGSD and theMeanGSD by doing a lineSampleHeightToWorld on four points and calculating the distance from them. More...
 
virtual bool getImageGeometry (const ossimString &, const ossimString &, ossimKeywordlist &) const
 Extracts geometry info from a non-ossim key,value pair to an ossim keyword list. More...
 
- Public Member Functions inherited from ossimProjection
 ossimProjection ()
 
virtual ~ossimProjection ()
 
virtual ossimDpt forward (const ossimGpt &wp) const
 
virtual ossimGpt inverse (const ossimDpt &pp) const
 
virtual void getRoundTripError (const ossimDpt &imagePoint, ossimDpt &errorResult) const
 
virtual void getRoundTripError (const ossimGpt &groundPoint, ossimDpt &errorResult) const
 
virtual void getGroundClipPoints (ossimGeoPolygon &gpts) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual bool operator!= (const ossimProjection &projection) const
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
- Public Member Functions inherited from ossimOptimizableProjection
 ossimOptimizableProjection ()
 
 ossimOptimizableProjection (const ossimOptimizableProjection &source)
 
virtual ~ossimOptimizableProjection ()
 
virtual ossimOptimizableProjectionoperator= (const ossimOptimizableProjection &source)
 
virtual bool setupOptimizer (const ossimString &setup)
 setupFromString() Derived classes should implement as needed. Initialize parameters needed for optimizeFit and degreesOfFreedom More...
 
- Public Member Functions inherited from ossimAdjustableParameterInterface
 ossimAdjustableParameterInterface ()
 
 ossimAdjustableParameterInterface (const ossimAdjustableParameterInterface &rhs)
 
virtual ~ossimAdjustableParameterInterface ()
 
void newAdjustment (ossim_uint32 numberOfParameters=0)
 
void setAdjustmentDescription (const ossimString &description)
 
ossimString getAdjustmentDescription () const
 
ossimString getAdjustmentDescription (ossim_uint32 adjustmentIdx) const
 Returns adjustmentDescription of specific adjustmentInfo. More...
 
void setCurrentAdjustment (ossim_uint32 adjustmentIndex, bool notify=false)
 
bool setCurrentAdjustment (const ossimString &description, bool notify=false)
 Sets the current adjustment to the adjustment with a matching description. More...
 
void eraseAdjustment (bool notify)
 
void eraseAdjustment (ossim_uint32 idx, bool notify)
 
virtual void initAdjustableParameters ()
 
void resetAdjustableParameters (bool notify=false)
 
void copyAdjustment (ossim_uint32 idx, bool notify)
 
void copyAdjustment (bool notify=false)
 
void keepAdjustment (ossim_uint32 idx, bool createCopy)
 
virtual void keepAdjustment (bool createCopy=true)
 
const ossimAdjustableParameterInterfaceoperator= (const ossimAdjustableParameterInterface &rhs)
 
void removeAllAdjustments ()
 
ossim_uint32 getNumberOfAdjustableParameters () const
 
double getAdjustableParameter (ossim_uint32 idx) const
 
virtual void setAdjustableParameter (ossim_uint32 idx, double value, bool notify=false)
 
virtual void setAdjustableParameter (ossim_uint32 idx, double value, double sigma, bool notify=false)
 
double getParameterSigma (ossim_uint32 idx) const
 
void setParameterSigma (ossim_uint32 idx, double value, bool notify=false)
 
ossimUnitType getParameterUnit (ossim_uint32 idx) const
 
void setParameterUnit (ossim_uint32 idx, ossimUnitType unit)
 
void setParameterUnit (ossim_uint32 idx, const ossimString &unit)
 
void setParameterCenter (ossim_uint32 idx, double center, bool notify=false)
 
double getParameterCenter (ossim_uint32 idx) const
 
double computeParameterOffset (ossim_uint32 idx) const
 
void setParameterOffset (ossim_uint32 idx, ossim_float64 value, bool notify=false)
 
ossimString getParameterDescription (ossim_uint32 idx) const
 
void setParameterDescription (ossim_uint32 idx, const ossimString &descrption)
 
ossim_int32 findParameterIdxGivenDescription (ossim_uint32 adjustmentIdx, const ossimString &name) const
 
ossim_int32 findParameterIdxContainingDescription (ossim_uint32 adjustmentIdx, const ossimString &name) const
 
bool isParameterLocked (ossim_uint32 idx) const
 
void setParameterLockFlag (ossim_uint32 idxParam, bool flag)
 
bool getParameterLockFlag (ossim_uint32 idx) const
 
void lockAllParametersCurrentAdjustment ()
 
void unlockAllParametersCurrentAdjustment ()
 
void lockAllParameters (ossim_uint32 idxAdjustment)
 
void unlockAllParameters (ossim_uint32 idxAdjustment)
 
void resizeAdjustableParameterArray (ossim_uint32 numberOfParameters)
 
void setAdjustment (const ossimAdjustmentInfo &adj, bool notify=false)
 
void setAdjustment (ossim_uint32 idx, const ossimAdjustmentInfo &adj, bool notify=false)
 
void addAdjustment (const ossimAdjustmentInfo &adj, bool notify)
 
void getAdjustment (ossimAdjustmentInfo &adj) const
 
void getAdjustment (ossim_uint32 idx, ossimAdjustmentInfo &adj) const
 
ossim_uint32 getNumberOfAdjustments () const
 
ossim_uint32 getCurrentAdjustmentIdx () const
 
void setDirtyFlag (bool flag=true)
 
void setAllDirtyFlag (bool flag=true)
 
bool hasDirtyAdjustments () const
 
virtual void saveCurrentAdjustmentOnly (ossimKeywordlist &kwl, const ossimString &prefix=ossimString(""))
 Saves the current active adjustment to the KWL file. More...
 
bool saveAdjustments (ossimKeywordlist &kwl, const ossimString &prefix=ossimString("")) const
 Save all adjustments to the KWL file. More...
 
bool loadAdjustments (const ossimKeywordlist &kwl, const ossimString &prefix=ossimString(""))
 
std::ostream & print (std::ostream &out) const
 Dumps the currently active adjustment to ostream. More...
 

Static Public Member Functions

static void writeGeomTemplate (ostream &os)
 
- Static Public Member Functions inherited from ossimSensorModel
static void writeGeomTemplate (ostream &os)
 

Protected Attributes

double theIllumAzimuth
 image to ground faster More...
 
double theIllumElevation
 
double theOrbitAltitude
 
double theOrbitInclination
 
int theMapZone
 
ossimDpt theMapOffset
 
int theWrsPathNumber
 
int theWrsRowNumber
 
double theMeridianalAngle
 
double thePositionError
 
ProjectionType theProjectionType
 
ossimRefPtr< ossimMapProjectiontheMapProjection
 
double theMapAzimAngle
 
double theMapAzimCos
 
double theMapAzimSin
 
double theMap2IcRotAngle
 
double theMap2IcRotCos
 
double theMap2IcRotSin
 
double theIntrackOffset
 
double theCrtrackOffset
 
double theLineGsdCorr
 
double theSampGsdCorr
 
double theRollOffset
 
double theYawOffset
 
double theYawRate
 
double theMapRotation
 
NEWMAT::Matrix theRollRotMat
 
unsigned int qDepth
 
- Protected Attributes inherited from ossimSensorModel
ossimIpt theImageSize
 
ossimDpt theSubImageOffset
 
ossimString theImageID
 
ossimString theSensorID
 
ossimDpt theGSD
 
ossim_float64 theMeanGSD
 
ossimGpt theRefGndPt
 
ossimDpt theRefImgPt
 
ossimPolygon theBoundGndPolygon
 
ossimDrect theImageClipRect
 
ossim_float64 theRelPosError
 
ossim_float64 theNominalPosError
 
ossimDpt theParWRTx
 Partials for current point. More...
 
ossimDpt theParWRTy
 
ossimDpt theParWRTz
 
ossimDpt theObs
 Observations & residuals for current point. More...
 
ossimDpt theResid
 
ossimRefPtr< ossimProjectiontheSeedFunction
 Used as an initial guess for iterative solutions and a guess for points outside the support bounds. More...
 
bool theExtrapolateImageFlag
 
bool theExtrapolateGroundFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Additional Inherited Members

- Protected Member Functions inherited from ossimSensorModel
virtual ~ossimSensorModel ()
 
virtual ossimDpt extrapolate (const ossimGpt &gp) const
 
virtual ossimGpt extrapolate (const ossimDpt &ip, const double &height=ossim::nan()) const
 
void buildNormalEquation (const ossimTieGptSet &tieSet, NEWMAT::SymmetricMatrix &A, NEWMAT::ColumnVector &residue, NEWMAT::ColumnVector &projResidue, double pstep_scale)
 
NEWMAT::ColumnVector getResidue (const ossimTieGptSet &tieSet)
 
NEWMAT::ColumnVector solveLeastSquares (NEWMAT::SymmetricMatrix &A, NEWMAT::ColumnVector &r) const
 
NEWMAT::Matrix invert (const NEWMAT::Matrix &m) const
 stable invert stolen from ossimRpcSolver More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimAdjustableParameterInterface
bool paramChanged (ossim_uint32 param_idx) const
 Returns true if specified parameter has been modified since last setAllChangeFlag(false) call. More...
 
void setAllChangeFlags (bool areChanged)
 Sets all the change flags to the boolean indicated to indicate parameters are changed (TRUE) or not (FALSE). More...
 
void initChangeFlags ()
 Initializes the change flags to TRUE. More...
 

Detailed Description

Definition at line 34 of file ossimTileMapModel.h.

Member Enumeration Documentation

◆ ProjectionType

Constructor & Destructor Documentation

◆ ossimTileMapModel() [1/3]

ossimplugins::ossimTileMapModel::ossimTileMapModel ( )

CONSTRUCTORS:

Definition at line 39 of file ossimTileMapModel.cpp.

References ossimNotify(), and ossimNotifyLevel_DEBUG.

40  :
42  qDepth (1)
43 
44  {
45  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::ossimTileMapModel: entering..." << std::endl;
46 
47 // initAdjustableParameters();
48 
49 // std::cout << "TileMapModel constructor" << std::endl;
50 
51  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::ossimTileMapModel: returning..." << std::endl;
52  }
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ossimTileMapModel() [2/3]

ossimplugins::ossimTileMapModel::ossimTileMapModel ( const ossimKeywordlist geom_kwl)

Definition at line 81 of file ossimTileMapModel.cpp.

References loadState(), ossimNotify(), and ossimNotifyLevel_DEBUG.

82  :
84  qDepth (1)
85  {
86  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::ossimTileMapModel(geom_kwl): entering..." << std::endl;
87 
88 
89  //***
90  // Parse keywordlist for geometry:
91  //***
92  loadState(geom_kwl);
93 
94  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::ossimTileMapModel(geom_kwl): Exited..." << std::endl;
95  }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ossimTileMapModel() [3/3]

ossimplugins::ossimTileMapModel::ossimTileMapModel ( const ossimTileMapModel rhs)

Definition at line 100 of file ossimTileMapModel.cpp.

References ossimNotify(), and ossimNotifyLevel_DEBUG.

101  :
102  ossimSensorModel (rhs),
103  qDepth (rhs.qDepth)
104  {
105  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::ossimTileMapModel(rhs): entering..." << std::endl;
106 
107  //initAdjustableParameters();
108 
109  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::ossimTileMapModel(rhs): returning..." << std::endl;
110  }
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ~ossimTileMapModel()

virtual ossimplugins::ossimTileMapModel::~ossimTileMapModel ( )
inlinevirtual

Definition at line 44 of file ossimTileMapModel.h.

44 {};

Member Function Documentation

◆ dup()

virtual ossimObject* ossimplugins::ossimTileMapModel::dup ( ) const
inlinevirtual

Returns pointer to a new instance, copy of this.

Implements ossimProjection.

Definition at line 58 of file ossimTileMapModel.h.

58 { return 0; } // TBR

◆ getDepth()

unsigned int ossimplugins::ossimTileMapModel::getDepth ( )
inline

Definition at line 103 of file ossimTileMapModel.h.

104  {
105  return qDepth;
106  }

◆ lineSampleHeightToWorld()

void ossimplugins::ossimTileMapModel::lineSampleHeightToWorld ( const ossimDpt lineSampPt,
const double &  heightEllipsoid,
ossimGpt worldPt 
) const
virtual

METHOD: lineSampleHeightToWorld This is the pure virtual that performs the actual work of projecting the image point to the given elevation above Ellipsoid.

Implements ossimSensorModel.

Definition at line 123 of file ossimTileMapModel.cpp.

References ossimDpt::hasNans(), ossimGpt::lat, ossimDpt::line, ossimGpt::lon, M_PI, ossimGpt::makeNan(), qDepth, ossimDpt::samp, and y.

Referenced by lineSampleToWorld().

126  {
127  if(!image_point.hasNans())
128  {
129  gpt.lon = static_cast<double>(image_point.samp)/(1 << qDepth)/256 *360.0-180.0;
130  double y = static_cast<double>(image_point.line)/(1 << qDepth)/256;
131  double ex = exp(4*M_PI*(y-0.5));
132  gpt.lat = -180.0/M_PI*asin((ex-1)/(ex+1));
133  }
134  else
135  {
136  gpt.makeNan();
137  }
138  return;
139  }
ossim_uint32 y
#define M_PI

◆ lineSampleToWorld()

void ossimplugins::ossimTileMapModel::lineSampleToWorld ( const ossimDpt image_point,
ossimGpt world_point 
) const
virtual

Implementation of base-class pure virtual projection methods. These methods may be overriden by derived classes if those have more efficient schemes. The implementations here are iterative (relatively slow). Both depend on calls to the pure virtual lineSampleHeightToWorld() method.

Reimplemented from ossimSensorModel.

Definition at line 118 of file ossimTileMapModel.cpp.

References lineSampleHeightToWorld().

120  {
121  lineSampleHeightToWorld(image_point, 0.0, gpt);
122  }
virtual void lineSampleHeightToWorld(const ossimDpt &image_point, const double &heightEllipsoid, ossimGpt &worldPoint) const

◆ loadState()

bool ossimplugins::ossimTileMapModel::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of the object from a keyword list. Return true if ok or false on error.

Reimplemented from ossimSensorModel.

Definition at line 222 of file ossimTileMapModel.cpp.

References ossimKeywordlist::find(), ossimSensorModel::loadState(), ossimNotify(), ossimNotifyLevel_DEBUG, qDepth, ossimErrorStatusInterface::theErrorStatus, ossimKeywordNames::TYPE_KW, TYPE_NAME, and ossimSensorModel::updateModel().

Referenced by ossimTileMapModel().

224  {
225  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::loadState: entering..." << std::endl;
226 
227  if (traceDebug())
228  {
229  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::loadState:"
230  << "\nInput kwl: " << kwl
231  << std::endl;
232  }
233 
234  const char* value = NULL;
235  //const char* keyword =NULL;
236  bool success;
237 
238  //***
239  // Assure this keywordlist contains correct type info:
240  //***
241  value = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
242  if (!value || (strcmp(value, TYPE_NAME(this))))
243  {
244  theErrorStatus = 1;
245  return false;
246  }
247 
248  value = kwl.find(prefix, "depth");
249  qDepth = atoi(value);
250 
251  //***
252  // Pass on to the base-class for parsing first:
253  //***
254  success = ossimSensorModel::loadState(kwl, prefix);
255  if (!success)
256  {
257  theErrorStatus++;
258  return false;
259  }
260 
261 
262  updateModel();
263 
264  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::loadState: returning..." << std::endl;
265  return true;
266  }
#define TYPE_NAME(p)
Definition: ossimRtti.h:326
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
const char * find(const char *key) const
static const char * TYPE_KW
virtual void updateModel()
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ open()

bool ossimplugins::ossimTileMapModel::open ( const ossimFilename file)

Definition at line 55 of file ossimTileMapModel.cpp.

References ossimString::beforePos(), CLOG, and ossimFilename::ext().

56  {
57  static const char MODULE[] = "ossimTileMapModel::open";
58 
59  ossimString os = file.beforePos(4);
60 
61  if (traceDebug())
62  {
63  CLOG << " Entered..." << std::endl
64  << " trying to open file " << file << std::endl;
65  }
66  if(os == "http" || file.ext() == "otb")
67  {
68  return true;
69  }
70 
71  return false;
72  }
#define CLOG
Definition: ossimTrace.h:23
ossimString beforePos(std::string::size_type pos) const
ossimString ext() const

◆ print()

std::ostream & ossimplugins::ossimTileMapModel::print ( std::ostream &  out) const
virtual

Extends base-class implementation. Dumps contents of object to ostream.

Reimplemented from ossimSensorModel.

Definition at line 173 of file ossimTileMapModel.cpp.

References ossimString::chars(), ossimDpt::line, ossimSensorModel::print(), qDepth, ossimDpt::samp, ossimSensorModel::theGSD, ossimSensorModel::theImageID, ossimSensorModel::theImageSize, ossimSensorModel::theRefGndPt, and ossimSensorModel::theRefImgPt.

174  {
175  os << "\nDump of ossimTileMapModel object at "
176  << hex << this << ":\n"
177  << "\nTileMapModel -- Dump of all data members: "
178  << "\n theImageID: " << theImageID.chars()
179  << "\n theImageSize: " << theImageSize
180  << "\n theRefImgPt: " << theRefImgPt
181  << "\n theRefGndPt: " << theRefGndPt
182  << "\n theGSD.line: " << theGSD.line
183  << "\n theGSD.samp: " << theGSD.samp
184  << "\n qDepth: " << qDepth
185  << endl;
186 
187  return ossimSensorModel::print(os);
188  }
ossimString theImageID
double samp
Definition: ossimDpt.h:164
double line
Definition: ossimDpt.h:165
const char * chars() const
For backward compatibility.
Definition: ossimString.h:77
virtual std::ostream & print(std::ostream &out) const

◆ saveState()

bool ossimplugins::ossimTileMapModel::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Fulfills ossimObject base-class pure virtuals. Loads and saves geometry KWL files. Returns true if successful.

Reimplemented from ossimSensorModel.

Definition at line 196 of file ossimTileMapModel.cpp.

References ossimKeywordlist::add(), ossimNotify(), ossimNotifyLevel_DEBUG, qDepth, ossimSensorModel::saveState(), ossimKeywordNames::TYPE_KW, and TYPE_NAME.

198  {
199  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::saveState: entering..." << std::endl;
200 
201  kwl.add(prefix, ossimKeywordNames::TYPE_KW, TYPE_NAME(this));
202 
203  kwl.add(prefix, "depth", qDepth);
204 
205  //***
206  // Hand off to base class for common stuff:
207  //***
208  ossimSensorModel::saveState(kwl, prefix);
209 
210 
211  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::saveState: returning..." << std::endl;
212  return true;
213  }
#define TYPE_NAME(p)
Definition: ossimRtti.h:326
static const char * TYPE_KW
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ setDepth()

void ossimplugins::ossimTileMapModel::setDepth ( unsigned int  depth)
inline

Set/Get the depth of the quadtree decomposition

Definition at line 100 of file ossimTileMapModel.h.

100  {
101  qDepth = depth;
102  }

◆ useForward()

virtual bool ossimplugins::ossimTileMapModel::useForward ( ) const
inlinevirtual

ossimOptimizableProjection

Implements ossimOptimizableProjection.

Definition at line 112 of file ossimTileMapModel.h.

112 {return true;}

◆ worldToLineSample()

void ossimplugins::ossimTileMapModel::worldToLineSample ( const ossimGpt worldPoint,
ossimDpt lineSampPt 
) const
virtual

METHOD: worldToLineSample() Performs the forward projection from ground point to line, sample.

Reimplemented from ossimSensorModel.

Definition at line 141 of file ossimTileMapModel.cpp.

References ossimGpt::isLatNan(), ossimGpt::isLonNan(), ossimGpt::lat, ossimDpt::line, ossimGpt::lon, M_PI, ossimDpt::makeNan(), qDepth, ossimDpt::samp, x, and y.

143  {
144  // if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::worldToLineSample(): entering..." << std::endl;
145 
146  if(ground_point.isLatNan() || ground_point.isLonNan() )
147  {
148  img_pt.makeNan();
149  return;
150  }
151 
152  double x = (180.0 + ground_point.lon) / 360.0;
153  double y = - ground_point.lat * M_PI / 180; // convert to radians
154  y = 0.5 * log((1+sin(y)) / (1 - sin(y)));
155  y *= 1.0/(2 * M_PI); // scale factor from radians to normalized
156  y += 0.5; // and make y range from 0 - 1
157 
158  img_pt.samp = floor(x*pow(2.,static_cast<double>(qDepth))*256);
159 
160  img_pt.line = floor(y*pow(2.,static_cast<double>(qDepth))*256);
161 
162  return;
163  }
ossim_uint32 x
ossim_uint32 y
#define M_PI

◆ writeGeomTemplate()

void ossimplugins::ossimTileMapModel::writeGeomTemplate ( ostream &  os)
static

Writes a template of geom keywords processed by loadState and saveState to output stream.

Definition at line 274 of file ossimTileMapModel.cpp.

References ossimNotify(), ossimNotifyLevel_DEBUG, and ossimKeywordNames::TYPE_KW.

275  {
276  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::writeGeomTemplate: entering..." << std::endl;
277 
278  os <<
279  "//**************************************************************\n"
280  "// Template for TileMap model keywordlist\n"
281  "//**************************************************************\n"
282  << ossimKeywordNames::TYPE_KW << ": " << "ossimTileMapModel" << endl;
283 
284 
285  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::writeGeomTemplate: returning..." << std::endl;
286  return;
287  }
static const char * TYPE_KW
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

Member Data Documentation

◆ qDepth

unsigned int ossimplugins::ossimTileMapModel::qDepth
protected

◆ theCrtrackOffset

double ossimplugins::ossimTileMapModel::theCrtrackOffset
protected

Definition at line 147 of file ossimTileMapModel.h.

◆ theIllumAzimuth

double ossimplugins::ossimTileMapModel::theIllumAzimuth
protected

image to ground faster

Definition at line 122 of file ossimTileMapModel.h.

◆ theIllumElevation

double ossimplugins::ossimTileMapModel::theIllumElevation
protected

Definition at line 123 of file ossimTileMapModel.h.

◆ theIntrackOffset

double ossimplugins::ossimTileMapModel::theIntrackOffset
protected

Definition at line 146 of file ossimTileMapModel.h.

◆ theLineGsdCorr

double ossimplugins::ossimTileMapModel::theLineGsdCorr
protected

Definition at line 148 of file ossimTileMapModel.h.

◆ theMap2IcRotAngle

double ossimplugins::ossimTileMapModel::theMap2IcRotAngle
protected

Definition at line 139 of file ossimTileMapModel.h.

◆ theMap2IcRotCos

double ossimplugins::ossimTileMapModel::theMap2IcRotCos
protected

Definition at line 140 of file ossimTileMapModel.h.

◆ theMap2IcRotSin

double ossimplugins::ossimTileMapModel::theMap2IcRotSin
protected

Definition at line 141 of file ossimTileMapModel.h.

◆ theMapAzimAngle

double ossimplugins::ossimTileMapModel::theMapAzimAngle
protected

Definition at line 136 of file ossimTileMapModel.h.

◆ theMapAzimCos

double ossimplugins::ossimTileMapModel::theMapAzimCos
protected

Definition at line 137 of file ossimTileMapModel.h.

◆ theMapAzimSin

double ossimplugins::ossimTileMapModel::theMapAzimSin
protected

Definition at line 138 of file ossimTileMapModel.h.

◆ theMapOffset

ossimDpt ossimplugins::ossimTileMapModel::theMapOffset
protected

Definition at line 127 of file ossimTileMapModel.h.

◆ theMapProjection

ossimRefPtr<ossimMapProjection> ossimplugins::ossimTileMapModel::theMapProjection
protected

Definition at line 134 of file ossimTileMapModel.h.

◆ theMapRotation

double ossimplugins::ossimTileMapModel::theMapRotation
protected

Definition at line 153 of file ossimTileMapModel.h.

◆ theMapZone

int ossimplugins::ossimTileMapModel::theMapZone
protected

Definition at line 126 of file ossimTileMapModel.h.

◆ theMeridianalAngle

double ossimplugins::ossimTileMapModel::theMeridianalAngle
protected

Definition at line 130 of file ossimTileMapModel.h.

◆ theOrbitAltitude

double ossimplugins::ossimTileMapModel::theOrbitAltitude
protected

Definition at line 124 of file ossimTileMapModel.h.

◆ theOrbitInclination

double ossimplugins::ossimTileMapModel::theOrbitInclination
protected

Definition at line 125 of file ossimTileMapModel.h.

◆ thePositionError

double ossimplugins::ossimTileMapModel::thePositionError
protected

Definition at line 131 of file ossimTileMapModel.h.

◆ theProjectionType

ProjectionType ossimplugins::ossimTileMapModel::theProjectionType
protected

Definition at line 133 of file ossimTileMapModel.h.

◆ theRollOffset

double ossimplugins::ossimTileMapModel::theRollOffset
protected

Definition at line 150 of file ossimTileMapModel.h.

◆ theRollRotMat

NEWMAT::Matrix ossimplugins::ossimTileMapModel::theRollRotMat
protected

Definition at line 158 of file ossimTileMapModel.h.

◆ theSampGsdCorr

double ossimplugins::ossimTileMapModel::theSampGsdCorr
protected

Definition at line 149 of file ossimTileMapModel.h.

◆ theWrsPathNumber

int ossimplugins::ossimTileMapModel::theWrsPathNumber
protected

Definition at line 128 of file ossimTileMapModel.h.

◆ theWrsRowNumber

int ossimplugins::ossimTileMapModel::theWrsRowNumber
protected

Definition at line 129 of file ossimTileMapModel.h.

◆ theYawOffset

double ossimplugins::ossimTileMapModel::theYawOffset
protected

Definition at line 151 of file ossimTileMapModel.h.

◆ theYawRate

double ossimplugins::ossimTileMapModel::theYawRate
protected

Definition at line 152 of file ossimTileMapModel.h.


The documentation for this class was generated from the following files: