26 static ossimTrace traceExec (
"ossimProjection:exec");
27 static ossimTrace traceDebug (
"ossimProjection:debug");
44 const char* prefix)
const 75 static const double PIXEL_THRESHOLD = 0.1;
76 static const int MAX_NUM_ITERATIONS = 20;
82 double height = worldPoint.
hgt;
99 double dlat_du, dlat_dv, dlon_du, dlon_dv;
100 double delta_lat, delta_lon, delta_u, delta_v;
111 ip_du.
u = ip.
u + 1.0;
114 ip_dv.
v = ip.
v + 1.0;
119 lineSampleHeightToWorld(ip, height, gp);
120 lineSampleHeightToWorld(ip_du, height, gp_du);
121 lineSampleHeightToWorld(ip_dv, height, gp_dv);
123 dlat_du = gp_du.
lat - gp.
lat;
124 dlon_du = gp_du.
lon - gp.
lon;
125 dlat_dv = gp_dv.
lat - gp.
lat;
126 dlon_dv = gp_dv.
lon - gp.
lon;
131 delta_lat = worldPoint.
lat - gp.
lat;
132 delta_lon = worldPoint.
lon - gp.
lon;
137 inverse_norm = dlat_dv*dlon_du - dlat_du*dlon_dv;
138 if (inverse_norm != 0)
140 delta_u = (-dlon_dv*delta_lat + dlat_dv*delta_lon)/inverse_norm;
141 delta_v = ( dlon_du*delta_lat - dlat_du*delta_lon)/inverse_norm;
153 }
while (((fabs(delta_u) > PIXEL_THRESHOLD) ||
154 (fabs(delta_v) > PIXEL_THRESHOLD)) &&
155 (iters < MAX_NUM_ITERATIONS));
162 if (iters == MAX_NUM_ITERATIONS)
177 lineSampleToWorld(imagePoint, world);
178 worldToLineSample(world, testPt);
180 errorResult = imagePoint - testPt;
189 worldToLineSample(groundPoint, tempPt);
190 lineSampleToWorld(tempPt, tempGround);
Represents serializable keyword/value map.
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
ossim_float64 hgt
Height in meters above the ellipsiod.
static const char * TYPE_KW
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual void getGroundClipPoints(ossimGeoPolygon &gpts) const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
RTTI_DEF1(ossimProjection, "ossimProjection", ossimObject)
virtual void getRoundTripError(const ossimDpt &imagePoint, ossimDpt &errorResult) const
virtual void worldToLineSample(const ossimGpt &worldPoint, ossimDpt &lineSampPt) const =0
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.