OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimRpcProjection.h>
Public Types | |
enum | PolynomialType { A ='A', B ='B' } |
Public Member Functions | |
ossimRpcProjection () | |
ossimRpcProjection (const ossimRpcProjection ©_this) | |
~ossimRpcProjection () | |
ossimRpcProjection & | operator= (const ossimRpcProjection &source) |
void | initAdjustableParameters () |
virtual void | adjustableParametersChanged () |
virtual ossimObject * | getBaseObject () |
virtual const ossimObject * | getBaseObject () const |
void | setAttributes (ossim_float64 theSampleOffset, ossim_float64 theLineOffset, ossim_float64 theSampleScale, ossim_float64 theLineScale, ossim_float64 theLatOffset, ossim_float64 theLonOffset, ossim_float64 theHeightOffset, ossim_float64 theLatScale, ossim_float64 theLonScale, ossim_float64 theHeightScale, const std::vector< double > &xNumeratorCoeffs, const std::vector< double > &xDenominatorCoeffs, const std::vector< double > &yNumeratorCoeffs, const std::vector< double > &yDenominatorCoeffs, PolynomialType polyType=B) |
virtual void | worldToLineSample (const ossimGpt &world_point, ossimDpt &image_point) const |
virtual std::ostream & | print (std::ostream &out) const |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
virtual void | lineSampleToWorld (const ossimDpt &image_point, ossimGpt &world_point) const |
virtual void | lineSampleHeightToWorld (const ossimDpt &image_point, const double &heightEllipsoid, ossimGpt &worldPoint) const |
virtual ossimObject * | dup () const |
virtual ossimGpt | origin () const |
virtual ossimDpt | getMetersPerPixel () const |
virtual bool | operator== (const ossimProjection &projection) const |
virtual bool | setupOptimizer (const ossimString &setup) |
setupFromString() Derived classes should implement as needed. Initialize parameters needed for optimizeFit and degreesOfFreedom More... | |
virtual bool | useForward () const |
virtual ossim_uint32 | degreesOfFreedom () const |
virtual double | optimizeFit (const ossimTieGptSet &tieSet, double *targetVariance=NULL) |
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 bool | isAffectedByElevation () const |
Implementation of pure virtual ossimProjection::isAffectedByElevation method. More... | |
![]() | |
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 |
![]() | |
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) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (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 |
![]() | |
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 |
![]() | |
ossimOptimizableProjection () | |
ossimOptimizableProjection (const ossimOptimizableProjection &source) | |
virtual | ~ossimOptimizableProjection () |
virtual ossimOptimizableProjection & | operator= (const ossimOptimizableProjection &source) |
virtual bool | needsInitialState () const |
needsInitialState() More... | |
![]() | |
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) |
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 ossimAdjustableParameterInterface & | operator= (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("")) |
virtual void | updateModel () |
Provides the derived adjustable class an opportunity to update its state after a param change. More... | |
std::ostream & | print (std::ostream &out) const |
Dumps the currently active adjustment to ostream. More... | |
Protected Member Functions | |
double | polynomial (const double &nlat, const double &nlon, const double &nhgt, const double *coeffs) const |
double | dPoly_dLat (const double &nlat, const double &nlon, const double &nhgt, const double *coeffs) const |
double | dPoly_dLon (const double &nlat, const double &nlon, const double &nhgt, const double *coeffs) 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... | |
![]() | |
virtual | ~ossimReferenced () |
![]() | |
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... | |
Protected Attributes | |
PolynomialType | thePolyType |
double | theLineScale |
double | theSampScale |
double | theLatScale |
double | theLonScale |
double | theHgtScale |
double | theLineOffset |
double | theSampOffset |
double | theLatOffset |
double | theLonOffset |
double | theHgtOffset |
double | theLineNumCoef [20] |
double | theLineDenCoef [20] |
double | theSampNumCoef [20] |
double | theSampDenCoef [20] |
double | theIntrackOffset |
double | theCrtrackOffset |
double | theIntrackScale |
double | theCrtrackScale |
double | theYawSkew |
double | theCosMapRot |
double | theSinMapRot |
![]() | |
ossimErrorCode | theErrorStatus |
Enumerator | |
---|---|
A | |
B |
Definition at line 36 of file ossimRpcProjection.h.
ossimRpcProjection::ossimRpcProjection | ( | ) |
CONSTRUCTORS:
Definition at line 87 of file ossimRpcProjection.cpp.
ossimRpcProjection::ossimRpcProjection | ( | const ossimRpcProjection & | copy_this | ) |
Definition at line 109 of file ossimRpcProjection.cpp.
ossimRpcProjection::~ossimRpcProjection | ( | ) |
Definition at line 149 of file ossimRpcProjection.cpp.
|
virtual |
Reimplemented from ossimAdjustableParameterInterface.
Definition at line 924 of file ossimRpcProjection.cpp.
References ossimAdjustableParameterInterface::computeParameterOffset(), and theIntrackOffset.
|
protected |
METHOD: buildNormalEquation builds linearized system (LMS equivalent) A*dp = projResidue
A: symetric matrix = tJ*J dp: system parameter shift that we want to estimate projResidue = tJ * residue
t: transposition operator J = jacobian of transform relative to parameters p, transform can be forward() or inverse() jacobian is obtained via finite differences residue can be image (2D) or ground residue(3D)
TODO: use image/ground points covariance matrices
Definition at line 1050 of file ossimRpcProjection.cpp.
References A, ossimProjection::forward(), getForwardDeriv(), getInverseDeriv(), ossimAdjustableParameterInterface::getNumberOfAdjustableParameters(), ossimTieGptSet::getTiePoints(), ossimGpt::hgt, ossimProjection::inverse(), ossimGpt::lat, ossimGpt::lon, M_PI, ossimTieGptSet::size(), useForward(), ossimDpt::x, and ossimDpt::y.
|
virtual |
degreesOfFreedom() number of degrees of freedom (eg: 8 for bilinear, 6 for affine, 2 for translation) especially useful when not inheriting from AdjustableParameterInterface
Implements ossimOptimizableProjection.
Definition at line 960 of file ossimRpcProjection.cpp.
References ossimAdjustableParameterInterface::getNumberOfAdjustableParameters(), and ossimAdjustableParameterInterface::isParameterLocked().
|
protected |
Definition at line 575 of file ossimRpcProjection.cpp.
References A, and thePolyType.
|
protected |
Definition at line 600 of file ossimRpcProjection.cpp.
References A, and thePolyType.
|
inlinevirtual |
METHOD: dup() Returns pointer to a new instance, copy of this.
Implements ossimProjection.
Definition at line 112 of file ossimRpcProjection.h.
|
virtual |
Implements ossimAdjustableParameterInterface.
Definition at line 156 of file ossimRpcProjection.cpp.
|
virtual |
Implements ossimAdjustableParameterInterface.
Definition at line 161 of file ossimRpcProjection.cpp.
|
virtual |
METHOD: getForwardDeriv() gives forward() partial derivative regarding parameter parmIdx (>=0) default implementation is centered finite difference -should be reimplemented with formal derivative in child class
Definition at line 1002 of file ossimRpcProjection.cpp.
References ossimProjection::forward(), ossimAdjustableParameterInterface::getAdjustableParameter(), and ossimAdjustableParameterInterface::setAdjustableParameter().
Referenced by buildNormalEquation().
|
virtual |
METHOD: getInverseDeriv() gives inverse() partial derivative regarding parameter parmIdx (>=0) default implementation is centered finite difference -should be reimplemented with formal derivative in child class
Definition at line 977 of file ossimRpcProjection.cpp.
References ossimAdjustableParameterInterface::getAdjustableParameter(), ossimGpt::hgt, ossimProjection::inverse(), ossimGpt::lat, ossimGpt::lon, M_PI, and ossimAdjustableParameterInterface::setAdjustableParameter().
Referenced by buildNormalEquation().
|
virtual |
ACCESS METHODS:
Implements ossimProjection.
Definition at line 500 of file ossimRpcProjection.cpp.
References lineSampleToWorld(), theLineOffset, theSampOffset, ossimDpt::x, and ossimDpt::y.
|
protected |
METHOD: getResidue() returns ground opr image residue
Definition at line 1157 of file ossimRpcProjection.cpp.
References ossimProjection::forward(), ossimTieGptSet::getTiePoints(), ossimGpt::hgt, ossimProjection::inverse(), ossimGpt::lat, ossimGpt::lon, M_PI, ossimTieGptSet::size(), useForward(), ossimDpt::x, and ossimDpt::y.
|
virtual |
Reimplemented from ossimAdjustableParameterInterface.
Definition at line 906 of file ossimRpcProjection.cpp.
References ossimAdjustableParameterInterface::resizeAdjustableParameterArray().
|
protected |
stable invert stolen from ossimRpcSolver
stable invert stolen from ossimRpcSolver
Definition at line 1223 of file ossimRpcProjection.cpp.
References SVD().
Referenced by solveLeastSquares().
|
inlinevirtual |
Implementation of pure virtual ossimProjection::isAffectedByElevation method.
Implements ossimProjection.
Definition at line 146 of file ossimRpcProjection.h.
|
virtual |
METHOD: lineSampleHeightToWorld This is the pure virtual that projects the image point to the given elevation above ellipsoid, thereby bypassing reference to a DEM. Useful for projections that are sensitive to elevation (such as sensor models).
Implements ossimProjection.
Definition at line 341 of file ossimRpcProjection.cpp.
Referenced by lineSampleToWorld().
|
virtual |
METHOD: lineSampleToWorld() Performs the inverse projection from line, sample to ground (world):
Implements ossimProjection.
Definition at line 316 of file ossimRpcProjection.cpp.
References ossimDpt::hasNans(), ossimGpt::height(), lineSampleHeightToWorld(), and ossimGpt::makeNan().
Referenced by getMetersPerPixel().
|
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 ossimProjection.
Definition at line 715 of file ossimRpcProjection.cpp.
Referenced by optimizeFit(), and setupOptimizer().
ossimRpcProjection & ossimRpcProjection::operator= | ( | const ossimRpcProjection & | source | ) |
Definition at line 167 of file ossimRpcProjection.cpp.
References ossimOptimizableProjection::operator=(), theHgtOffset, theHgtScale, theLatOffset, theLatScale, theLineDenCoef, theLineNumCoef, theLineOffset, theLineScale, theLonOffset, theLonScale, thePolyType, theSampDenCoef, theSampNumCoef, theSampOffset, and theSampScale.
|
virtual |
OPERATOR: == Compares this instance with arg projection.
Implements ossimProjection.
Definition at line 529 of file ossimRpcProjection.cpp.
|
virtual |
optimizeFit() adjusts projection to GLOBALLY fit best to ALL tie points (no outlier rejection) can select an optional threshold for accuracy
RETURNS : resulting image error variance of fitted model, or negative value for error
IMPORTANT : the unit for *targetVariance and the returned value is : meters^2 when useForward() is true OR pixel^2 if useForward() is false
Implements ossimOptimizableProjection.
Definition at line 1024 of file ossimRpcProjection.cpp.
References ossimRpcSolver::getRmsError(), ossimRpcSolver::getRpcModel(), ossimTieGptSet::getSlaveMasterPoints(), loadState(), ossimNotify(), ossimNotifyLevel_FATAL, ossimRpcModel::saveState(), and ossimRpcSolver::solveCoefficients().
|
virtual |
METHOD: origin() Returns projection's ground point origin. That is the GP corresponding to line=0, sample=0.
Implements ossimProjection.
Definition at line 492 of file ossimRpcProjection.cpp.
References theHgtOffset, theLatOffset, and theLonOffset.
|
protected |
Definition at line 544 of file ossimRpcProjection.cpp.
References A, and thePolyType.
|
virtual |
METHOD: print() Extends base-class implementation. Dumps contents of object to ostream.
Reimplemented from ossimProjection.
Definition at line 624 of file ossimRpcProjection.cpp.
|
virtual |
METHODS: saveState, loadState Fulfills ossimObject base-class pure virtuals. Loads and saves geometry KWL files. Returns true if successful.
Reimplemented from ossimProjection.
Definition at line 665 of file ossimRpcProjection.cpp.
void ossimRpcProjection::setAttributes | ( | ossim_float64 | theSampleOffset, |
ossim_float64 | theLineOffset, | ||
ossim_float64 | theSampleScale, | ||
ossim_float64 | theLineScale, | ||
ossim_float64 | theLatOffset, | ||
ossim_float64 | theLonOffset, | ||
ossim_float64 | theHeightOffset, | ||
ossim_float64 | theLatScale, | ||
ossim_float64 | theLonScale, | ||
ossim_float64 | theHeightScale, | ||
const std::vector< double > & | xNumeratorCoeffs, | ||
const std::vector< double > & | xDenominatorCoeffs, | ||
const std::vector< double > & | yNumeratorCoeffs, | ||
const std::vector< double > & | yDenominatorCoeffs, | ||
PolynomialType | polyType = B |
||
) |
Definition at line 195 of file ossimRpcProjection.cpp.
References theHgtOffset, theHgtScale, theLatOffset, theLatScale, theLineDenCoef, theLineNumCoef, theLineOffset, theLineScale, theLonOffset, theLonScale, thePolyType, theSampDenCoef, theSampNumCoef, theSampOffset, and theSampScale.
|
virtual |
setupFromString() Derived classes should implement as needed. Initialize parameters needed for optimizeFit and degreesOfFreedom
Reimplemented from ossimOptimizableProjection.
Definition at line 936 of file ossimRpcProjection.cpp.
References ossimKeywordlist::addFile(), ossimKeywordlist::clear(), ossimProjectionFactoryRegistry::createProjection(), ossimProjectionFactoryRegistry::instance(), loadState(), ossimProjection::saveState(), and ossimRefPtr< T >::valid().
|
protected |
solves Ax = r , with A symmetric positive definite A can be rank deficient size of A is typically between 10 and 100 rows
Definition at line 1213 of file ossimRpcProjection.cpp.
References A, invert(), and x.
|
inlinevirtual |
useForward() return true when it's better (more accurate / fast) to use forward (from ground to image) than inverse(from image to ground)
Implements ossimOptimizableProjection.
Definition at line 122 of file ossimRpcProjection.h.
Referenced by buildNormalEquation(), and getResidue().
|
virtual |
METHOD: worldToLineSample() Overrides base class implementation. Directly computes line-sample from the polynomials.
Implements ossimProjection.
Definition at line 257 of file ossimRpcProjection.cpp.
|
protected |
Definition at line 232 of file ossimRpcProjection.h.
|
protected |
Definition at line 228 of file ossimRpcProjection.h.
|
protected |
Definition at line 230 of file ossimRpcProjection.h.
|
protected |
Definition at line 214 of file ossimRpcProjection.h.
Referenced by operator=(), origin(), and setAttributes().
|
protected |
Definition at line 209 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 227 of file ossimRpcProjection.h.
Referenced by adjustableParametersChanged().
|
protected |
Definition at line 229 of file ossimRpcProjection.h.
|
protected |
Definition at line 212 of file ossimRpcProjection.h.
Referenced by operator=(), origin(), and setAttributes().
|
protected |
Definition at line 207 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 220 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 219 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 210 of file ossimRpcProjection.h.
Referenced by getMetersPerPixel(), operator=(), and setAttributes().
|
protected |
Definition at line 205 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 213 of file ossimRpcProjection.h.
Referenced by operator=(), origin(), and setAttributes().
|
protected |
Definition at line 208 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 200 of file ossimRpcProjection.h.
Referenced by dPoly_dLat(), dPoly_dLon(), operator=(), polynomial(), and setAttributes().
|
protected |
Definition at line 222 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 221 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 211 of file ossimRpcProjection.h.
Referenced by getMetersPerPixel(), operator=(), and setAttributes().
|
protected |
Definition at line 206 of file ossimRpcProjection.h.
Referenced by operator=(), and setAttributes().
|
protected |
Definition at line 233 of file ossimRpcProjection.h.
|
protected |
Definition at line 231 of file ossimRpcProjection.h.