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

#include <ossimSpaceObliqueMercatorProjection.h>

Inheritance diagram for ossimSpaceObliqueMercatorProjection:
ossimMapProjection ossimProjection ossimObject ossimErrorStatusInterface ossimReferenced

Public Types

enum  ossimSatelliteType {
  SOM_TYPE_LANDSAT_1 = 0, SOM_TYPE_LANDSAT_2 = 1, SOM_TYPE_LANDSAT_3 = 2, SOM_TYPE_LANDSAT_4 = 3,
  SOM_TYPE_LANDSAT_5 = 4, SOM_TYPE_LANDSAT_7 = 5
}
 

Public Member Functions

 ossimSpaceObliqueMercatorProjection (ossimSatelliteType type=SOM_TYPE_LANDSAT_7, double pathNumber=34, const ossimEllipsoid &ellipsoid=ossimEllipsoid())
 
virtual ossimObjectdup () const
 
virtual ossimDpt forward (const ossimGpt &worldPoint) const
 All map projections will convert the world coordinate to an easting northing (Meters). More...
 
virtual ossimGpt inverse (const ossimDpt &projectedPoint) const
 Will take a point in meters and convert it to ground. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual void setParameters (ossimSatelliteType type, double path)
 
virtual void update ()
 
virtual bool operator== (const ossimProjection &projection) const
 Returns TRUE if principal parameters are within epsilon tolerance. More...
 
- Public Member Functions inherited from ossimMapProjection
 ossimMapProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
 
 ossimMapProjection (const ossimMapProjection &src)
 
virtual ossimGpt origin () const
 
virtual ossimDpt worldToLineSample (const ossimGpt &worldPoint) const
 
virtual void worldToLineSample (const ossimGpt &worldPoint, ossimDpt &lineSample) const
 
virtual ossimGpt lineSampleToWorld (const ossimDpt &projectedPoint) const
 
virtual void lineSampleToWorld (const ossimDpt &projectedPoint, ossimGpt &gpt) const
 
virtual void lineSampleHeightToWorld (const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const
 This is the pure virtual that projects the image point to the given elevation above ellipsoid, thereby bypassing reference to a DEM. More...
 
virtual void lineSampleToEastingNorthing (const ossimDpt &liineSample, ossimDpt &eastingNorthing) const
 
virtual void eastingNorthingToLineSample (const ossimDpt &eastingNorthing, ossimDpt &lineSample) const
 
virtual void eastingNorthingToWorld (const ossimDpt &eastingNorthing, ossimGpt &worldPt) const
 
virtual double getFalseEasting () const
 
virtual double getFalseNorthing () const
 
virtual double getStandardParallel1 () const
 Derived classes should implement as needed. More...
 
virtual double getStandardParallel2 () const
 Derived classes should implement as needed. More...
 
virtual void setPcsCode (ossim_uint32 pcsCode)
 
virtual ossim_uint32 getPcsCode () const
 Returns the EPSG PCS code or 32767 if the projection is a custom (non-EPSG) projection. More...
 
virtual ossimString getProjectionName () const
 Returns the projection name. More...
 
virtual double getA () const
 ACCESS METHODS: More...
 
virtual double getB () const
 
virtual double getF () const
 
virtual ossimDpt getMetersPerPixel () const
 
virtual const ossimDptgetDecimalDegreesPerPixel () const
 Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing latitude. More...
 
virtual const ossimDptgetUlEastingNorthing () const
 
virtual const ossimGptgetUlGpt () const
 
virtual const ossimDatumgetDatum () const
 
const ossimEllipsoidgetEllipsoid () const
 
const ossimGptgetOrigin () const
 
virtual bool isGeographic () const
 
virtual void applyScale (const ossimDpt &scale, bool recenterTiePoint)
 Applies scale to theDeltaLonPerPixel, theDeltaLatPerPixel and theMetersPerPixel data members (eg: theDeltaLonPerPixel *= scale.x). More...
 
virtual void setEllipsoid (const ossimEllipsoid &ellipsoid)
 SET METHODS: More...
 
virtual void setAB (double a, double b)
 
virtual void setDatum (const ossimDatum *datum)
 Sets theDatum to datum. More...
 
virtual void setOrigin (const ossimGpt &origin)
 Sets theOrigin to origin. More...
 
virtual void setMetersPerPixel (const ossimDpt &gsd)
 
virtual void setDecimalDegreesPerPixel (const ossimDpt &gsd)
 
virtual void setUlTiePoints (const ossimGpt &gpt)
 
virtual void setUlTiePoints (const ossimDpt &eastingNorthing)
 
virtual void setUlEastingNorthing (const ossimDpt &ulEastingNorthing)
 
virtual void setUlGpt (const ossimGpt &ulGpt)
 
virtual void assign (const ossimProjection &aProjection)
 
virtual std::ostream & print (std::ostream &out) const
 Prints data members to stream. More...
 
virtual void computeDegreesPerPixel ()
 Computes the approximate resolution in degrees/pixel. More...
 
virtual void computeMetersPerPixel ()
 This will go from the ground point and give you an approximate meters per pixel. More...
 
void setMatrix (double rotation, const ossimDpt &scale, const ossimDpt &translation)
 
void setMatrixScale (const ossimDpt &scale)
 
void setMatrixRotation (double rotation)
 
void setMatrixTranslation (const ossimDpt &translation)
 
void snapTiePointTo (ossim_float64 multiple, ossimUnitType unitType)
 Utility method to snap the tie point to some multiple. More...
 
void snapTiePointToOrigin ()
 
void setElevationLookupFlag (bool flag)
 
bool getElevationLookupFlag () const
 
ossimUnitType getModelTransformUnitType () const
 
void setModelTransformUnitType (ossimUnitType unit)
 
bool hasModelTransform () const
 
virtual bool isAffectedByElevation () const
 Implementation of pure virtual ossimProjection::isAffectedByElevation method. More...
 
void setProjectionUnits (ossimUnitType units)
 
ossimUnitType getProjectionUnits () const
 OSSIM considers all map projection coordinates (including false eastings and northings) to be in meters. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimProjection
 ossimProjection ()
 
virtual ~ossimProjection ()
 
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 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
 

Protected Member Functions

void seraz0 (double lam, double mult)
 
- Protected Member Functions inherited from ossimMapProjection
virtual ~ossimMapProjection ()
 
void updateFromTransform ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

double a2
 
double a4
 
double b
 
double c1
 
double c3
 
double q
 
double t
 
double u
 
double w
 
double p22
 
double sa
 
double ca
 
double xj
 
double rlm
 
double rlm2
 
double lam0
 
double es
 
double e
 
double one_es
 
double rone_es
 
double a
 
double thePath
 
ossimSatelliteType theSatelliteType
 
- Protected Attributes inherited from ossimMapProjection
ossimEllipsoid theEllipsoid
 This method verifies that the projection parameters match the current pcs code. More...
 
ossimGpt theOrigin
 
const ossimDatumtheDatum
 This is only set if we want to have built in datum shifting. More...
 
ossimDpt theMetersPerPixel
 Holds the number of meters per pixel. More...
 
ossimDpt theDegreesPerPixel
 Hold the decimal degrees per pixel. More...
 
ossimGpt theUlGpt
 Hold tie point in decimal degrees. More...
 
ossimDpt theUlEastingNorthing
 Hold tie point as easting northing. More...
 
ossimDpt theFalseEastingNorthing
 Hold the false easting northing. More...
 
ossim_uint32 thePcsCode
 Projection Coordinate System(PCS) code. More...
 
bool theElevationLookupFlag
 
ossimMatrix4x4 theModelTransform
 
ossimMatrix4x4 theInverseModelTransform
 
ossimUnitType theModelTransformUnitType
 
ossimUnitType theProjectionUnits
 Linear units of the projection as indicated in the projection's specification: More...
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Detailed Description

This class implments the formulas for the ellipsoid and circular orbit. All formulas were directly taken from proj 4. Proj 4 implementation is from the following manual reference:

Map Projections - A Working Manual by John Snyder Space Oblique Mercator p. 221.

Definition at line 27 of file ossimSpaceObliqueMercatorProjection.h.

Member Enumeration Documentation

◆ ossimSatelliteType

Constructor & Destructor Documentation

◆ ossimSpaceObliqueMercatorProjection()

ossimSpaceObliqueMercatorProjection::ossimSpaceObliqueMercatorProjection ( ossimSatelliteType  type = SOM_TYPE_LANDSAT_7,
double  pathNumber = 34,
const ossimEllipsoid ellipsoid = ossimEllipsoid() 
)

Definition at line 81 of file ossimSpaceObliqueMercatorProjection.cpp.

84  :
85  ossimMapProjection(ellipsoid)
86 {
87  setParameters(type, pathNumber);
88 }
virtual void setParameters(ossimSatelliteType type, double path)
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

Member Function Documentation

◆ dup()

virtual ossimObject* ossimSpaceObliqueMercatorProjection::dup ( ) const
inlinevirtual

Implements ossimProjection.

Definition at line 44 of file ossimSpaceObliqueMercatorProjection.h.

44 {return new ossimSpaceObliqueMercatorProjection(*this);}
ossimSpaceObliqueMercatorProjection(ossimSatelliteType type=SOM_TYPE_LANDSAT_7, double pathNumber=34, const ossimEllipsoid &ellipsoid=ossimEllipsoid())

◆ forward()

ossimDpt ossimSpaceObliqueMercatorProjection::forward ( const ossimGpt worldPoint) const
virtual

All map projections will convert the world coordinate to an easting northing (Meters).

Implements ossimMapProjection.

Definition at line 192 of file ossimSpaceObliqueMercatorProjection.cpp.

References a, a2, a4, aasin(), b, c1, c3, ca, ossimGpt::changeDatum(), ossimDatum::code(), ossimGpt::datum(), es, FORTPI, HALFPI, lam0, ossimGpt::latr(), ossimGpt::lonr(), ossimDpt::makeNan(), one_es, p22, PI_HALFPI, q, rlm, rlm2, sa, t, ossimMapProjection::theDatum, TOL, TWOPI_HALFPI, w, ossimDpt::x, xj, and ossimDpt::y.

193 {
194  ossimGpt gpt = worldPoint;
195 
196  if (theDatum)
197  {
198  if (theDatum->code() != worldPoint.datum()->code())
199  {
200  gpt.changeDatum(theDatum); // Shift to our datum.
201  }
202  }
203 
204  ossimDpt xy;
205 
206  int l, nn;
207  double lamt, xlam, sdsq, c, d, s, lamdp, phidp, lampp, tanph,
208  lamtp, cl, sd, sp, fac, sav, tanphi;
209  double phi = gpt.latr();
210  double lam = gpt.lonr() - lam0;
211 
212  if (phi > HALFPI)
213  phi = HALFPI;
214  else if (phi < -HALFPI)
215  phi = -HALFPI;
216  lampp = phi >= 0. ? HALFPI : PI_HALFPI;
217  tanphi = tan(phi);
218  for (nn = 0;;)
219  {
220  sav = lampp;
221  lamtp = lam + p22 * lampp;
222  cl = cos(lamtp);
223  if (fabs(cl) < TOL)
224  lamtp -= TOL;
225  fac = lampp - sin(lampp) * (cl < 0. ? -HALFPI : HALFPI);
226  for (l = 50; l; --l) {
227  lamt = lam + p22 * sav;
228  if (fabs(c = cos(lamt)) < TOL)
229  lamt -= TOL;
230  xlam = (one_es * tanphi * sa + sin(lamt) * ca) / c;
231  lamdp = atan(xlam) + fac;
232  if (fabs(fabs(sav) - fabs(lamdp)) < TOL)
233  break;
234  sav = lamdp;
235  }
236  if (!l || ++nn >= 3 || (lamdp > rlm && lamdp < rlm2))
237  break;
238  if (lamdp <= rlm)
239  lampp = TWOPI_HALFPI;
240  else if (lamdp >= rlm2)
241  lampp = HALFPI;
242  }
243  if (l) {
244  sp = sin(phi);
245  phidp = aasin((one_es * ca * sp - sa * cos(phi) *
246  sin(lamt)) / sqrt(1. - es * sp * sp));
247  tanph = log(tan(FORTPI + .5 * phidp));
248  sd = sin(lamdp);
249  sdsq = sd * sd;
250  s = p22 * sa * cos(lamdp) * sqrt((1. + t * sdsq)
251  / ((1. + w * sdsq) * (1. + q * sdsq)));
252  d = sqrt(xj * xj + s * s);
253  xy.x = b * lamdp + a2 * sin(2. * lamdp) + a4 *
254  sin(lamdp * 4.) - tanph * s / d;
255  xy.y = c1 * sd + c3 * sin(lamdp * 3.) + tanph * xj / d;
256  }
257  else
258  {
259  xy.makeNan();
260  return xy;
261 // xy.x = xy.y = 1.0/DBL_EPSILON; // st to large number
262  }
263 
264  xy.x*=a;
265  xy.y*=a;
266  return xy;
267 }
double y
Definition: ossimDpt.h:165
virtual const ossimString & code() const
Definition: ossimDatum.h:57
double aasin(double v)
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
double x
Definition: ossimDpt.h:164
double latr() const
latr().
Definition: ossimGpt.h:66
void makeNan()
Definition: ossimDpt.h:65
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ inverse()

ossimGpt ossimSpaceObliqueMercatorProjection::inverse ( const ossimDpt projectedPoint) const
virtual

Will take a point in meters and convert it to ground.

Implements ossimMapProjection.

Definition at line 273 of file ossimSpaceObliqueMercatorProjection.cpp.

References a, a2, a4, aasin(), b, c1, c3, ca, DEG_PER_RAD, es, FORTPI, HALFPI, lam0, one_es, p22, q, rone_es, sa, t, ossimMapProjection::theDatum, TOL, u, w, ossimDpt::x, xj, and ossimDpt::y.

275 {
276  int nn;
277  double lamt, sdsq, s, lamdp, phidp, sppsq, dd, sd, sl, fac, scl, sav, spp;
278  double lam, phi;
279 
280  ossimDpt xy = projectedPoint;
281  xy.x/=a;
282  xy.y/=a;
283 
284  lamdp = xy.x / b;
285  nn = 50;
286  do {
287  sav = lamdp;
288  sd = sin(lamdp);
289  sdsq = sd * sd;
290  s = p22 * sa * cos(lamdp) * sqrt((1. + t * sdsq)
291  / ((1. + w * sdsq) * (1. + q * sdsq)));
292  lamdp = xy.x + xy.y * s / xj - a2 * sin(
293  2. * lamdp) - a4 * sin(lamdp * 4.) - s / xj * (
294  c1 * sin(lamdp) + c3 * sin(lamdp * 3.));
295  lamdp /= b;
296  } while (fabs(lamdp - sav) >= TOL && --nn);
297  sl = sin(lamdp);
298  fac = exp(sqrt(1. + s * s / xj / xj) * (xy.y -
299  c1 * sl - c3 * sin(lamdp * 3.)));
300  phidp = 2. * (atan(fac) - FORTPI);
301  dd = sl * sl;
302  if (fabs(cos(lamdp)) < TOL)
303  lamdp -= TOL;
304  spp = sin(phidp);
305  sppsq = spp * spp;
306  lamt = atan(((1. - sppsq * rone_es) * tan(lamdp) * ca -
307  spp * sa * sqrt((1. + q * dd) * (1. - sppsq) - sppsq * u) /
308  cos(lamdp)) / (1. - sppsq * (1. + u)));
309  sl = lamt >= 0. ? 1. : -1.;
310  scl = cos(lamdp) >= 0. ? 1. : -1;
311  lamt -= HALFPI * (1. - scl) * sl;
312 
313  lam = lamt - p22 * lamdp;
314  if (fabs(sa) < TOL)
315  phi = aasin(spp / sqrt(one_es * one_es + es * sppsq));
316  else
317  phi = atan((tan(lamdp) * cos(lamt) - ca * sin(lamt)) /
318  (one_es * sa));
319  return ossimGpt(phi*DEG_PER_RAD,
320  (lam+lam0)*DEG_PER_RAD, 0.0, theDatum);
321 
322 }
#define DEG_PER_RAD
double y
Definition: ossimDpt.h:165
double aasin(double v)
double x
Definition: ossimDpt.h:164
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ loadState()

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

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

Reimplemented from ossimMapProjection.

Definition at line 358 of file ossimSpaceObliqueMercatorProjection.cpp.

References ossimKeywordlist::find().

360 {
361  bool result = true;
362 
363  const char* path = kwl.find(prefix, PATH_KW);
364  const char* type = kwl.find(prefix, SATELLITE_TYPE_KW);
365 
366  if(path)
367  {
368  thePath = ossimString(path).toDouble();
369  }
370  else
371  {
372  result = false;
373  }
374  if(type)
375  {
377  }
378  else
379  {
380  result = false;
381  }
382 
384 
385  if(result)
386  {
387  result = ossimMapProjection::loadState(kwl, prefix);
388  }
389  else
390  {
391  ossimMapProjection::loadState(kwl, prefix);
392  }
393 
394  return result;
395 }
virtual void setParameters(ossimSatelliteType type, double path)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
const char * find(const char *key) const
double toDouble() const
int toInt() const

◆ operator==()

bool ossimSpaceObliqueMercatorProjection::operator== ( const ossimProjection projection) const
virtual

Returns TRUE if principal parameters are within epsilon tolerance.

Reimplemented from ossimMapProjection.

Definition at line 400 of file ossimSpaceObliqueMercatorProjection.cpp.

References ossim::almostEqual(), thePath, and theSatelliteType.

401 {
402  if (!ossimMapProjection::operator==(proj))
403  return false;
404 
406  dynamic_cast<const ossimSpaceObliqueMercatorProjection*>(&proj);
407  if (!p) return false;
408 
409  if (theSatelliteType != p->theSatelliteType) return false;
410  if (!ossim::almostEqual(thePath,p->thePath)) return false;
411 
412  return true;
413 }
bool almostEqual(T x, T y, T tolerance=FLT_EPSILON)
Definition: ossimCommon.h:53

◆ saveState()

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

Method to save the state of an object to a keyword list. Return true if ok or false on error.

Reimplemented from ossimMapProjection.

Definition at line 340 of file ossimSpaceObliqueMercatorProjection.cpp.

References ossimKeywordlist::add().

342 {
343  kwl.add(prefix,
344  PATH_KW,
345  thePath,
346  true);
347 
348  kwl.add(prefix,
349  SATELLITE_TYPE_KW,
350  (int)theSatelliteType,
351  true);
352  return ossimMapProjection::saveState(kwl, prefix);
353 }
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.

◆ seraz0()

void ossimSpaceObliqueMercatorProjection::seraz0 ( double  lam,
double  mult 
)
protected

Definition at line 165 of file ossimSpaceObliqueMercatorProjection.cpp.

References a2, a4, b, c1, c3, ca, p22, q, RAD_PER_DEG, sa, sq, t, w, and xj.

Referenced by setParameters().

167 {
168  double sdsq, h, s, fc, sd, sq, d__1;
169 
170  lam *= RAD_PER_DEG;
171  sd = sin(lam);
172  sdsq = sd * sd;
173  s = p22 * sa * cos(lam) * sqrt((1. + t * sdsq) / ((
174  1. + w * sdsq) * (1. + q * sdsq)));
175  d__1 = 1. + q * sdsq;
176  h = sqrt((1. + q * sdsq) / (1. + w * sdsq)) * ((1. +
177  w * sdsq) / (d__1 * d__1) - p22 * ca);
178  sq = sqrt(xj * xj + s * s);
179  b += fc = mult * (h * xj - s * s) / sq;
180  a2 += fc * cos(lam + lam);
181  a4 += fc * cos(lam * 4.);
182  fc = mult * s * (h + xj) / sq;
183  c1 += fc * cos(lam);
184  c3 += fc * cos(lam * 3.);
185 
186 }
#define sq(a)
Definition: auxiliary.h:77
#define RAD_PER_DEG

◆ setParameters()

void ossimSpaceObliqueMercatorProjection::setParameters ( ossimSatelliteType  type,
double  path 
)
virtual

Definition at line 93 of file ossimSpaceObliqueMercatorProjection.cpp.

References ossimEllipsoid::a(), a, a2, a4, b, c1, c3, ca, e, ossimEllipsoid::eccentricity(), es, lam0, one_es, p22, PI, q, RAD_PER_DEG, rlm, rlm2, rone_es, sa, seraz0(), SOM_TYPE_LANDSAT_1, SOM_TYPE_LANDSAT_2, SOM_TYPE_LANDSAT_3, SOM_TYPE_LANDSAT_4, SOM_TYPE_LANDSAT_5, SOM_TYPE_LANDSAT_7, t, ossimMapProjection::theEllipsoid, thePath, theSatelliteType, TWOPI, u, update(), w, and xj.

95 {
96  thePath = path;
97  theSatelliteType = type;
98  double lam = 0.0;
99  double alf = 0.0;
100  double esc = 0.0;
101  double ess = 0.0;
102 
104  es = e*e;
105  one_es = 1- es;
106  rone_es = 1.0/one_es;
107  a = theEllipsoid.a();
108 
109  switch(theSatelliteType)
110  {
111  case SOM_TYPE_LANDSAT_1:
112  case SOM_TYPE_LANDSAT_2:
113  case SOM_TYPE_LANDSAT_3:
114  {
115  lam0 = RAD_PER_DEG*(128.87 - (360.0/251.0)*path);
116  p22 = 103.2669323;
117  alf = RAD_PER_DEG * 99.092;
118  break;
119  }
120  case SOM_TYPE_LANDSAT_4:
121  case SOM_TYPE_LANDSAT_5:
122  case SOM_TYPE_LANDSAT_7:
123  {
124 
125  lam0 = RAD_PER_DEG*(129.305582487 - (360.0/233.0)*path);
126  p22 = 98.8841202;
127  alf = RAD_PER_DEG * 98.2;
128  break;
129  }
130  }
131  p22 /= 1440.;
132  sa = sin(alf);
133  ca = cos(alf);
134  if (fabs(ca) < 1e-9)
135  ca = 1e-9;
136  esc = es * ca * ca;
137  ess = es * sa * sa;
138  w = (1. - esc) * rone_es;
139  w = w * w - 1.;
140  q = ess * rone_es;
141  t = ess * (2. - es) * rone_es * rone_es;
142  u = esc * rone_es;
143  xj = one_es * one_es * one_es;
144  rlm = PI * (1. / 248. + .5161290322580645);
145  rlm2 = rlm + TWOPI;
146  a2 = a4 = b = c1 = c3 = 0.;
147  seraz0(0.0, 1.0);
148  for (lam = 9.; lam <= 81.0001; lam += 18.)
149  seraz0(lam, 4.0);
150  for (lam = 18; lam <= 72.0001; lam += 18.)
151  seraz0(lam, 2.0);
152  seraz0(90.0, 1.0);
153  a2 /= 30.0;
154  a4 /= 60.0;
155  b /= 30.0;
156  c1 /= 15.0;
157  c3 /= 45.0;
158 
159  update();
160 }
double eccentricity() const
const double & a() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
#define RAD_PER_DEG

◆ update()

void ossimSpaceObliqueMercatorProjection::update ( )
virtual

Reimplemented from ossimMapProjection.

Definition at line 327 of file ossimSpaceObliqueMercatorProjection.cpp.

Referenced by setParameters().

328 {
329 // theMetersPerPixel.x = 1.0;
330 // theMetersPerPixel.y = 1.0;
331 
332 // theUlEastingNorthing.x = 0.0;
333 // theUlEastingNorthing.y = 0.0;
334 }

Member Data Documentation

◆ a

double ossimSpaceObliqueMercatorProjection::a
protected

Definition at line 83 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), and setParameters().

◆ a2

double ossimSpaceObliqueMercatorProjection::a2
protected

Definition at line 74 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ a4

double ossimSpaceObliqueMercatorProjection::a4
protected

Definition at line 74 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ b

double ossimSpaceObliqueMercatorProjection::b
protected

Definition at line 74 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ c1

double ossimSpaceObliqueMercatorProjection::c1
protected

Definition at line 74 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ c3

double ossimSpaceObliqueMercatorProjection::c3
protected

Definition at line 74 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ ca

double ossimSpaceObliqueMercatorProjection::ca
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ e

double ossimSpaceObliqueMercatorProjection::e
protected

Definition at line 80 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by setParameters().

◆ es

double ossimSpaceObliqueMercatorProjection::es
protected

Definition at line 79 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), and setParameters().

◆ lam0

double ossimSpaceObliqueMercatorProjection::lam0
protected

Definition at line 78 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), and setParameters().

◆ one_es

double ossimSpaceObliqueMercatorProjection::one_es
protected

Definition at line 81 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), and setParameters().

◆ p22

double ossimSpaceObliqueMercatorProjection::p22
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ q

double ossimSpaceObliqueMercatorProjection::q
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ rlm

double ossimSpaceObliqueMercatorProjection::rlm
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), and setParameters().

◆ rlm2

double ossimSpaceObliqueMercatorProjection::rlm2
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), and setParameters().

◆ rone_es

double ossimSpaceObliqueMercatorProjection::rone_es
protected

Definition at line 82 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by inverse(), and setParameters().

◆ sa

double ossimSpaceObliqueMercatorProjection::sa
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ t

double ossimSpaceObliqueMercatorProjection::t
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ thePath

double ossimSpaceObliqueMercatorProjection::thePath
protected

Is the p variable in Map Projections a Working Manual.

Definition at line 90 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by operator==(), and setParameters().

◆ theSatelliteType

ossimSatelliteType ossimSpaceObliqueMercatorProjection::theSatelliteType
protected

Definition at line 91 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by operator==(), and setParameters().

◆ u

double ossimSpaceObliqueMercatorProjection::u
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by inverse(), and setParameters().

◆ w

double ossimSpaceObliqueMercatorProjection::w
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().

◆ xj

double ossimSpaceObliqueMercatorProjection::xj
protected

Definition at line 75 of file ossimSpaceObliqueMercatorProjection.h.

Referenced by forward(), inverse(), seraz0(), and setParameters().


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