27 #ifdef OSSIM_ID_ENABLED 28 static const char OSSIM_ID[] =
"$Id: ossimBilinearProjection.cpp 19682 2011-05-31 14:21:20Z dburken $";
33 static ossimTrace traceDebug(
"ossimBilinearProjection:debug");
45 #ifdef OSSIM_ID_ENABLED 53 theLineSamplePt(rhs.theLineSamplePt),
54 theGeographicPt(rhs.theGeographicPt),
55 theLonFit(rhs.theLonFit)
117 result.
latd(lat/SIZE);
118 result.
lond(lon/SIZE);
157 const double& heightAboveEllipsoid,
172 worldPt.
hgt = heightAboveEllipsoid;
181 const char* prefix)
const 215 kwl.
add(prefix, kw, os1.str().
c_str());
222 kwl.
add(prefix, kw,
os2.str().c_str());
241 if(!imagePoints.
empty()&&!groundPoints.
empty())
253 if ( (SIZE == 0) || (SIZE != kwl.
numberOf(prefix,
"dpt")) )
266 lookup = kwl.
find(prefix, kw);
270 gp.
toPoint(std::string(lookup));
288 lookup = kwl.
find(prefix, kw);
292 dp.
toPoint(std::string(lookup));
335 result.
x = (result.x + result.y)/2.0;
384 if(errorResult.
length() > 1)
401 if ( (*i).hasNans() )
424 if ( (*i).isLatNan() || (*i).isLonNan() )
462 <<
"ossimBilinearProjection::print\n";
469 <<
"theLineSamplePt[" << index <<
"]: " 480 <<
"theGeographicPt[" << index <<
"]: " 490 const std::vector<ossimGpt>& geoPt)
492 if (lsPt.size() != geoPt.size())
495 <<
"mismatch in image and ground point number" << endl;
501 <<
"not enough tie points - need at least 4" << endl;
513 vector<ossimDpt>::const_iterator i;
514 vector<ossimGpt>::const_iterator j;
543 std::vector<ossimDpt> imagePoints;
544 std::vector<ossimGpt> groundPoints;
553 std::vector<ossimGpt>& geoPt)
const
virtual void worldToLineSample(const ossimGpt &worldPoint, ossimDpt &lineSampPt) const
virtual void clear()
Will clear everything and set it up to for another solve.
virtual ossimGpt origin() const
void getSlaveMasterPoints(std::vector< ossimDpt > &imv, std::vector< ossimGpt > &gdv) const
ossim_uint32 numberOf(const char *str) const
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
virtual void lineSampleHeightToWorld(const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const
virtual void addSample(double x, double yy, double zmea)
add a single data sample.
ossimLeastSquaresBilin theXFit
virtual void lineSampleToWorld(const ossimDpt &lineSampPt, ossimGpt &worldPt) const
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
double lond() const
Will convert the radian measure to degrees.
Represents serializable keyword/value map.
OSSIM_DLL void toStringList(ossimString &resultStringOfPoints, const std::vector< ossimDpt > &pointList, char separator=' ')
Will take a vector of ossimDpt and convert to a string list separated by spaces For example: (45...
const char * find(const char *key) const
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
virtual ossimObject * dup() const
double nan()
Method to return ieee floating point double precision NAN.
static ossimString toString(bool aValue)
Numeric to string methods.
ossimDpt midLineSamplePt() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
ossim_float64 hgt
Height in meters above the ellipsiod.
virtual ossim_uint32 degreesOfFreedom() const
better go from image to ground, also means that errors variance are in squared meters ...
bool theInterpolationPointsHaveNanFlag
double latd() const
Will convert the radian measure to degrees.
virtual double optimizeFit(const ossimTieGptSet &tieSet, double *targetVariance=0)
void initializeBilinear()
const ossimDatum * datum() const
datum().
std::vector< ossimGpt > theGeographicPt
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimLeastSquaresBilin theLatFit
virtual class enabling projection optimization (can be used for outlier rejection - RANSAC) ...
OSSIM_DLL void toVector(std::vector< ossimDpt > &result, const ossimString &stringOfPoints)
Will take a string list separated by spaces and convert to a vector of ossimDpts. ...
ossimLeastSquaresBilin theYFit
void toPoint(const std::string &s)
Initializes this point from string.
unsigned int ossim_uint32
void toPoint(const std::string &s)
Initializes this point from string.
bool gPtsHaveNan() const
Checks theGeographicPt for nans.
bool theInverseSupportedFlag
bool solveLS()
compute least squares parameter solution - true if succesfull.
virtual ossim_float64 setTiePoints(const std::vector< ossimDpt > &lsPt, const std::vector< ossimGpt > &geoPt)
RTTI_DEF2(ossimBilinearProjection, "ossimBilinearProjection", ossimProjection, ossimOptimizableProjection)
ossimBilinearProjection()
std::vector< ossimDpt > theLineSamplePt
void getTiePoints(std::vector< ossimDpt > &lsPt, std::vector< ossimGpt > &geoPt) const
Access method for tie point information.
storage class for a set of geographic tie points, between master and slave images ...
virtual bool operator==(const ossimProjection &projection) const
ossimLeastSquaresBilin theLonFit
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
virtual double lsFitValue(double xx, double yy) const
interpolate LS-fit value at location (xx,yy) - returns z(xx,yy).
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual void getRoundTripError(const ossimDpt &imagePoint, ossimDpt &errorResult) const
bool dPtsHaveNan() const
Checks theLineSamplePt for nans.
virtual ~ossimBilinearProjection()
virtual void worldToLineSample(const ossimGpt &worldPoint, ossimDpt &lineSampPt) const =0
virtual ossimDpt getMetersPerPixel() const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
std::basic_ostream< char > ostream
Base class for char output streams.
virtual bool setupOptimizer(const ossimString &setup)
setupFromString() Derived classes should implement as needed. Initialize parameters needed for optimi...
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.