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

#include <ossimMillerProjection.h>

Inheritance diagram for ossimMillerProjection:
ossimMapProjection ossimProjection ossimObject ossimErrorStatusInterface ossimReferenced

Public Member Functions

 ossimMillerProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
 
 ossimMillerProjection (const ossimEllipsoid &ellipsoid, const ossimGpt &origin, const double falseEasting, const double falseNorthing)
 
 ~ossimMillerProjection ()
 
virtual ossimObjectdup () const
 
virtual ossimGpt inverse (const ossimDpt &eastingNorthing) const
 Will take a point in meters and convert it to ground. More...
 
virtual ossimDpt forward (const ossimGpt &latLon) const
 All map projections will convert the world coordinate to an easting northing (Meters). More...
 
virtual void update ()
 
void setFalseEasting (double falseEasting)
 
void setFalseNorthing (double falseNorthing)
 
void setFalseEastingNorthing (double falseEasting, double falseNorthing)
 
void setDefaults ()
 
void setCentralMeridian (double centralMeridian)
 
double getFalseEasting () const
 
double getFalseNorthing () const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
- 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 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 bool operator== (const ossimProjection &projection) const
 Compares this to arg projection and returns TRUE if the same. 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
 

Private Member Functions

long Set_Miller_Parameters (double a, double f, double Central_Meridian, double False_Easting, double False_Northing)
 
void Get_Miller_Parameters (double *a, double *f, double *Central_Meridian, double *False_Easting, double *False_Northing) const
 
long Convert_Geodetic_To_Miller (double Latitude, double Longitude, double *Easting, double *Northing) const
 
long Convert_Miller_To_Geodetic (double Easting, double Northing, double *Latitude, double *Longitude) const
 

Private Attributes

double Mill_a
 
double Mill_f
 
double es2
 
double es4
 
double es6
 
double Ra
 
double Mill_Origin_Long
 
double Mill_False_Easting
 
double Mill_False_Northing
 
double Mill_Delta_Northing
 
double Mill_Max_Easting
 
double Mill_Min_Easting
 

Additional Inherited Members

- Protected Member Functions inherited from ossimMapProjection
virtual ~ossimMapProjection ()
 
void updateFromTransform ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- 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

Definition at line 18 of file ossimMillerProjection.h.

Constructor & Destructor Documentation

◆ ossimMillerProjection() [1/2]

ossimMillerProjection::ossimMillerProjection ( const ossimEllipsoid ellipsoid = ossimEllipsoid(),
const ossimGpt origin = ossimGpt() 
)

Definition at line 41 of file ossimMillerProjection.cpp.

References setDefaults(), and update().

43  :ossimMapProjection(ellipsoid, origin)
44 {
45  setDefaults();
46  update();
47 // Mill_Delta_Northing = 14675058.0;
48 // Mill_Max_Easting = 20015110.0;
49 // Mill_Min_Easting = -20015110.0;
50 }
virtual ossimGpt origin() const
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ ossimMillerProjection() [2/2]

ossimMillerProjection::ossimMillerProjection ( const ossimEllipsoid ellipsoid,
const ossimGpt origin,
const double  falseEasting,
const double  falseNorthing 
)

Definition at line 52 of file ossimMillerProjection.cpp.

References Mill_Delta_Northing, Mill_False_Easting, Mill_False_Northing, Mill_Max_Easting, Mill_Min_Easting, and update().

56  :ossimMapProjection(ellipsoid, origin)
57 {
58 
59  Mill_False_Easting = falseEasting;
60  Mill_False_Northing = falseNorthing;
61  Mill_Delta_Northing = 14675058.0;
62  Mill_Max_Easting = 20015110.0;
63  Mill_Min_Easting = -20015110.0;
64 
65  update();
66 }
virtual ossimGpt origin() const
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ ~ossimMillerProjection()

ossimMillerProjection::~ossimMillerProjection ( )
inline

Definition at line 28 of file ossimMillerProjection.h.

28 {}

Member Function Documentation

◆ Convert_Geodetic_To_Miller()

long ossimMillerProjection::Convert_Geodetic_To_Miller ( double  Latitude,
double  Longitude,
double *  Easting,
double *  Northing 
) const
private

The function Convert_Geodetic_To_Miller converts geodetic (latitude and longitude) coordinates to Miller Cylindrical projection easting, and northing coordinates, according to the current ellipsoid and Miller Cylindrical projection parameters. If any errors occur, the error code(s) are returned by the function, otherwise MILL_NO_ERROR is returned.

Latitude : Latitude (phi) in radians (input) Longitude : Longitude (lambda) in radians (input) Easting : Easting (X) in meters (output) Northing : Northing (Y) in meters (output)

Definition at line 284 of file ossimMillerProjection.cpp.

References Mill_False_Easting, Mill_False_Northing, MILL_NO_ERROR, Mill_Origin_Long, and Ra.

Referenced by forward().

289 { /* Begin Convert_Geodetic_To_Miller */
290 /*
291  * The function Convert_Geodetic_To_Miller converts geodetic (latitude and
292  * longitude) coordinates to Miller Cylindrical projection (easting and northing)
293  * coordinates, according to the current ellipsoid and Miller Cylindrical projection
294  * parameters. If any errors occur, the error code(s) are returned by the
295  * function, otherwise MILL_NO_ERROR is returned.
296  *
297  * Latitude : Latitude (phi) in radians (input)
298  * Longitude : Longitude (lambda) in radians (input)
299  * Easting : Easting (X) in meters (output)
300  * Northing : Northing (Y) in meters (output)
301  */
302 
303  double slat = sin(0.8 * Latitude);
304  double dlam; /* Longitude - Central Meridan */
305 
306  long Error_Code = MILL_NO_ERROR;
307 
308 // if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
309 // { /* Latitude out of range */
310 // Error_Code |= MILL_LAT_ERROR;
311 // }
312 // if ((Longitude < -PI) || (Longitude > TWO_PI))
313 // { /* Longitude out of range */
314 // Error_Code|= MILL_LON_ERROR;
315 // }
316 
317  if (!Error_Code)
318  { /* no errors */
319  dlam = Longitude - Mill_Origin_Long;
320 // if (dlam > PI)
321 // {
322 // dlam -= TWO_PI;
323 // }
324 // if (dlam < -PI)
325 // {
326 // dlam += TWO_PI;
327 // }
328  *Easting = Ra * dlam + Mill_False_Easting;
329  *Northing = (Ra / 1.6) * log((1.0 + slat) /
330  (1.0 - slat)) + Mill_False_Northing;
331  }
332  return (Error_Code);
333 } /* End Convert_Geodetic_To_Miller */
#define MILL_NO_ERROR

◆ Convert_Miller_To_Geodetic()

long ossimMillerProjection::Convert_Miller_To_Geodetic ( double  Easting,
double  Northing,
double *  Latitude,
double *  Longitude 
) const
private

The function Convert_Miller_To_Geodetic converts Miller Cylindrical projection easting and northing coordinates to geodetic (latitude and longitude) coordinates, according to the current ellipsoid and Miller Cylindrical projection coordinates. If any errors occur, the error code(s) are returned by the function, otherwise MILL_NO_ERROR is returned.

Easting : Easting (X) in meters (input) Northing : Northing (Y) in meters (input) Latitude : Latitude (phi) in radians (output) Longitude : Longitude (lambda) in radians (output)

Definition at line 336 of file ossimMillerProjection.cpp.

References Mill_False_Easting, Mill_False_Northing, MILL_NO_ERROR, Mill_Origin_Long, and Ra.

Referenced by inverse().

340 { /* Begin Convert_Miller_To_Geodetic */
341 /*
342  * The function Convert_Miller_To_Geodetic converts Miller Cylindrical projection
343  * (easting and northing) coordinates to geodetic (latitude and longitude)
344  * coordinates, according to the current ellipsoid and Miller Cylindrical projection
345  * coordinates. If any errors occur, the error code(s) are returned by the
346  * function, otherwise MILL_NO_ERROR is returned.
347  *
348  * Easting : Easting (X) in meters (input)
349  * Northing : Northing (Y) in meters (input)
350  * Latitude : Latitude (phi) in radians (output)
351  * Longitude : Longitude (lambda) in radians (output)
352  */
353 
354  double dx, dy;
355  long Error_Code = MILL_NO_ERROR;
356 
357 // if ((Easting < (Mill_False_Easting + Mill_Min_Easting))
358 // || (Easting > (Mill_False_Easting + Mill_Max_Easting)))
359 // { /* Easting out of range */
360 // Error_Code |= MILL_EASTING_ERROR;
361 // }
362 // if ((Northing < (Mill_False_Northing - Mill_Delta_Northing)) ||
363 // (Northing > (Mill_False_Northing + Mill_Delta_Northing) ))
364 // { /* Northing out of range */
365 // Error_Code |= MILL_NORTHING_ERROR;
366 // }
367 
368  if (!Error_Code)
369  {
370  dy = Northing - Mill_False_Northing;
371  dx = Easting - Mill_False_Easting;
372  *Latitude = atan(sinh(0.8 * dy / Ra)) / 0.8;
373  *Longitude = Mill_Origin_Long + dx / Ra;
374 
375 // if (*Latitude > PI_OVER_2) /* force distorted values to 90, -90 degrees */
376 // *Latitude = PI_OVER_2;
377 // else if (*Latitude < -PI_OVER_2)
378 // *Latitude = -PI_OVER_2;
379 
380 // if (*Longitude > PI)
381 // *Longitude -= TWO_PI;
382 // if (*Longitude < -PI)
383 // *Longitude += TWO_PI;
384 
385 // if (*Longitude > PI) /* force distorted values to 180, -180 degrees */
386 // *Longitude = PI;
387 // else if (*Longitude < -PI)
388 // *Longitude = -PI;
389 
390  }
391  return (Error_Code);
392 } /* End Convert_Miller_To_Geodetic */
#define MILL_NO_ERROR

◆ dup()

virtual ossimObject* ossimMillerProjection::dup ( ) const
inlinevirtual

Implements ossimProjection.

Definition at line 30 of file ossimMillerProjection.h.

30 {return new ossimMillerProjection(*this);}
ossimMillerProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ forward()

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

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

Implements ossimMapProjection.

Definition at line 131 of file ossimMillerProjection.cpp.

References ossimGpt::changeDatum(), ossimDatum::code(), Convert_Geodetic_To_Miller(), ossimGpt::datum(), ossimGpt::latr(), ossimGpt::lonr(), and ossimMapProjection::theDatum.

132 {
133  double easting = 0.0;
134  double northing = 0.0;
135  ossimGpt gpt = latLon;
136 
137  if (theDatum)
138  {
139  if (theDatum->code() != latLon.datum()->code())
140  {
141  gpt.changeDatum(theDatum); // Shift to our datum.
142  }
143  }
144 
146  gpt.lonr(),
147  &easting,
148  &northing);
149 
150  return ossimDpt(easting, northing);
151 }
virtual const ossimString & code() const
Definition: ossimDatum.h:57
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
long Convert_Geodetic_To_Miller(double Latitude, double Longitude, double *Easting, double *Northing) const
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
double latr() const
latr().
Definition: ossimGpt.h:66
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ Get_Miller_Parameters()

void ossimMillerProjection::Get_Miller_Parameters ( double *  a,
double *  f,
double *  Central_Meridian,
double *  False_Easting,
double *  False_Northing 
) const
private

The function Get_Miller_Parameters returns the current ellipsoid parameters and Miller Cylindrical projection parameters.

a : Semi-major axis of ellipsoid, in meters (output) f : Flattening of ellipsoid (output) Central_Meridian : Longitude in radians at the center of (output) the projection False_Easting : A coordinate value in meters assigned to the central meridian of the projection. (output) False_Northing : A coordinate value in meters assigned to the origin latitude of the projection (output)

Definition at line 254 of file ossimMillerProjection.cpp.

References Mill_a, Mill_f, Mill_False_Easting, Mill_False_Northing, and Mill_Origin_Long.

259 { /* Begin Get_Miller_Parameters */
260 /*
261  * The function Get_Miller_Parameters returns the current ellipsoid
262  * parameters and Miller Cylindrical projection parameters.
263  *
264  * a : Semi-major axis of ellipsoid, in meters (output)
265  * f : Flattening of ellipsoid (output)
266  * Central_Meridian : Longitude in radians at the center of (output)
267  * the projection
268  * False_Easting : A coordinate value in meters assigned to the
269  * central meridian of the projection. (output)
270  * False_Northing : A coordinate value in meters assigned to the
271  * origin latitude of the projection (output)
272  */
273 
274  *a = Mill_a;
275  *f = Mill_f;
276  *Central_Meridian = Mill_Origin_Long;
277  *False_Easting = Mill_False_Easting;
278  *False_Northing = Mill_False_Northing;
279 
280  return;
281 } /* End Get_Miller_Parameters */

◆ getFalseEasting()

double ossimMillerProjection::getFalseEasting ( ) const
inlinevirtual
Returns
The false easting.

Reimplemented from ossimMapProjection.

Definition at line 59 of file ossimMillerProjection.h.

◆ getFalseNorthing()

double ossimMillerProjection::getFalseNorthing ( ) const
inlinevirtual
Returns
The false northing.

Reimplemented from ossimMapProjection.

Definition at line 60 of file ossimMillerProjection.h.

◆ inverse()

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

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

Implements ossimMapProjection.

Definition at line 118 of file ossimMillerProjection.cpp.

References Convert_Miller_To_Geodetic(), DEG_PER_RAD, ossimMapProjection::theDatum, ossimDpt::x, and ossimDpt::y.

119 {
120  double lat = 0.0;
121  double lon = 0.0;
122 
123  Convert_Miller_To_Geodetic(eastingNorthing.x,
124  eastingNorthing.y,
125  &lat,
126  &lon);
127 
128  return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
129 }
#define DEG_PER_RAD
long Convert_Miller_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude) const
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ loadState()

bool ossimMillerProjection::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 158 of file ossimMillerProjection.cpp.

References ossimKeywordlist::find(), ossimMapProjection::loadState(), Mill_False_Easting, Mill_False_Northing, setDefaults(), STATIC_TYPE_NAME, ossimMapProjection::theFalseEastingNorthing, ossimKeywordNames::TYPE_KW, update(), ossimDpt::x, and ossimDpt::y.

160 {
161  bool flag = ossimMapProjection::loadState(kwl, prefix);
162 
163  const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
164 
165  setDefaults();
166 
168  {
171  }
172 
173  update();
174 
175  return flag;
176 }
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 y
Definition: ossimDpt.h:165
static const char * TYPE_KW
#define STATIC_TYPE_NAME(T)
Definition: ossimRtti.h:325
double x
Definition: ossimDpt.h:164
ossimDpt theFalseEastingNorthing
Hold the false easting northing.

◆ saveState()

bool ossimMillerProjection::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 153 of file ossimMillerProjection.cpp.

References ossimMapProjection::saveState().

154 {
155  return ossimMapProjection::saveState(kwl, prefix);
156 }
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.

◆ Set_Miller_Parameters()

long ossimMillerProjection::Set_Miller_Parameters ( double  a,
double  f,
double  Central_Meridian,
double  False_Easting,
double  False_Northing 
)
private

The function Set_Miller_Parameters receives the ellipsoid parameters and Miller Cylindrical projcetion parameters as inputs, and sets the corresponding state variables. If any errors occur, the error code(s) are returned by the function, otherwise MILL_NO_ERROR is returned.

a : Semi-major axis of ellipsoid, in meters (input) f : Flattening of ellipsoid (input) Central_Meridian : Longitude in radians at the center of (input) the projection False_Easting : A coordinate value in meters assigned to the central meridian of the projection. (input) False_Northing : A coordinate value in meters assigned to the origin latitude of the projection (input)

Definition at line 183 of file ossimMillerProjection.cpp.

References es2, es4, es6, Mill_a, Mill_f, Mill_False_Easting, Mill_False_Northing, Mill_Max_Easting, Mill_Min_Easting, MILL_NO_ERROR, Mill_Origin_Long, and Ra.

Referenced by update().

188 { /* Begin Set_Miller_Parameters */
189 /*
190  * The function Set_Miller_Parameters receives the ellipsoid parameters and
191  * Miller Cylindrical projcetion parameters as inputs, and sets the corresponding
192  * state variables. If any errors occur, the error code(s) are returned by the
193  * function, otherwise MILL_NO_ERROR is returned.
194  *
195  * a : Semi-major axis of ellipsoid, in meters (input)
196  * f : Flattening of ellipsoid (input)
197  * Central_Meridian : Longitude in radians at the center of (input)
198  * the projection
199  * False_Easting : A coordinate value in meters assigned to the
200  * central meridian of the projection. (input)
201  * False_Northing : A coordinate value in meters assigned to the
202  * origin latitude of the projection (input)
203  */
204 
205 // double inv_f = 1 / f;
206  long Error_Code = MILL_NO_ERROR;
207 
208 // if (a <= 0.0)
209 // { /* Semi-major axis must be greater than zero */
210 // Error_Code |= MILL_A_ERROR;
211 // }
212 // if ((inv_f < 250) || (inv_f > 350))
213 // { /* Inverse flattening must be between 250 and 350 */
214 // Error_Code |= MILL_INV_F_ERROR;
215 // }
216 // if ((Central_Meridian < -PI) || (Central_Meridian > TWO_PI))
217 // { /* origin longitude out of range */
218 // Error_Code |= MILL_CENT_MER_ERROR;
219 // }
220  if (!Error_Code)
221  { /* no errors */
222  Mill_a = a;
223  Mill_f = f;
224  es2 = 2 * Mill_f - Mill_f * Mill_f;
225  es4 = es2 * es2;
226  es6 = es4 * es2;
227  /* spherical radius */
228  Ra = Mill_a * (1.0 - es2 / 6.0 - 17.0 * es4 / 360.0 - 67.0 * es6 /3024.0);
229 // if (Central_Meridian > PI)
230 // Central_Meridian -= TWO_PI;
231  Mill_Origin_Long = Central_Meridian;
232  Mill_False_Easting = False_Easting;
233  Mill_False_Northing = False_Northing;
234  if (Mill_Origin_Long > 0)
235  {
236  Mill_Max_Easting = 19903915.0;
237  Mill_Min_Easting = -20015110.0;
238  }
239  else if (Mill_Origin_Long < 0)
240  {
241  Mill_Max_Easting = 20015110.0;
242  Mill_Min_Easting = -19903915.0;
243  }
244  else
245  {
246  Mill_Max_Easting = 20015110.0;
247  Mill_Min_Easting = -20015110.0;
248  }
249  } /* End if(!Error_Code) */
250  return (Error_Code);
251 } /* End Set_Miller_Parameters */
#define MILL_NO_ERROR

◆ setCentralMeridian()

void ossimMillerProjection::setCentralMeridian ( double  centralMeridian)

Definition at line 103 of file ossimMillerProjection.cpp.

References Mill_Origin_Long, and update().

104 {
105  Mill_Origin_Long = centralMeridian;
106  update();
107 }

◆ setDefaults()

void ossimMillerProjection::setDefaults ( )

◆ setFalseEasting()

void ossimMillerProjection::setFalseEasting ( double  falseEasting)

SetFalseEasting. The value is in meters. Update is then called so we can pre-compute paramters

Definition at line 82 of file ossimMillerProjection.cpp.

References Mill_False_Easting, and update().

83 {
84  Mill_False_Easting = falseEasting;
85  update();
86 }

◆ setFalseEastingNorthing()

void ossimMillerProjection::setFalseEastingNorthing ( double  falseEasting,
double  falseNorthing 
)

Sets both false easting and northing values. The values are expected to be in meters. Update is then called so we can pre-compute paramters

Definition at line 109 of file ossimMillerProjection.cpp.

References Mill_False_Easting, Mill_False_Northing, and update().

111 {
112  Mill_False_Easting = falseEasting;
113  Mill_False_Northing = falseNorthing;
114 
115  update();
116 }

◆ setFalseNorthing()

void ossimMillerProjection::setFalseNorthing ( double  falseNorthing)

SetFalseNorthing. The value is in meters. Update is then called so we can pre-compute paramters

Definition at line 88 of file ossimMillerProjection.cpp.

References Mill_False_Northing, and update().

89 {
90  Mill_False_Northing = falseNorthing;
91  update();
92 }

◆ update()

void ossimMillerProjection::update ( )
virtual

Reimplemented from ossimMapProjection.

Definition at line 68 of file ossimMillerProjection.cpp.

References ossimEllipsoid::getA(), ossimEllipsoid::getFlattening(), ossimGpt::lonr(), Mill_False_Easting, Mill_False_Northing, Set_Miller_Parameters(), ossimMapProjection::theEllipsoid, ossimMapProjection::theFalseEastingNorthing, ossimMapProjection::theOrigin, ossimMapProjection::update(), ossimDpt::x, and ossimDpt::y.

Referenced by loadState(), ossimMillerProjection(), setCentralMeridian(), setFalseEasting(), setFalseEastingNorthing(), and setFalseNorthing().

69 {
72  theOrigin.lonr(),
75 
78 
80 }
double y
Definition: ossimDpt.h:165
long Set_Miller_Parameters(double a, double f, double Central_Meridian, double False_Easting, double False_Northing)
const double & getA() const
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
double x
Definition: ossimDpt.h:164
const double & getFlattening() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.

Member Data Documentation

◆ es2

double ossimMillerProjection::es2
mutableprivate

Definition at line 81 of file ossimMillerProjection.h.

Referenced by Set_Miller_Parameters().

◆ es4

double ossimMillerProjection::es4
mutableprivate

Definition at line 82 of file ossimMillerProjection.h.

Referenced by Set_Miller_Parameters().

◆ es6

double ossimMillerProjection::es6
mutableprivate

Definition at line 83 of file ossimMillerProjection.h.

Referenced by Set_Miller_Parameters().

◆ Mill_a

double ossimMillerProjection::Mill_a
mutableprivate

Definition at line 79 of file ossimMillerProjection.h.

Referenced by Get_Miller_Parameters(), and Set_Miller_Parameters().

◆ Mill_Delta_Northing

double ossimMillerProjection::Mill_Delta_Northing
mutableprivate

Definition at line 90 of file ossimMillerProjection.h.

Referenced by ossimMillerProjection(), and setDefaults().

◆ Mill_f

double ossimMillerProjection::Mill_f
mutableprivate

Definition at line 80 of file ossimMillerProjection.h.

Referenced by Get_Miller_Parameters(), and Set_Miller_Parameters().

◆ Mill_False_Easting

double ossimMillerProjection::Mill_False_Easting
mutableprivate

◆ Mill_False_Northing

double ossimMillerProjection::Mill_False_Northing
mutableprivate

◆ Mill_Max_Easting

double ossimMillerProjection::Mill_Max_Easting
mutableprivate

◆ Mill_Min_Easting

double ossimMillerProjection::Mill_Min_Easting
mutableprivate

◆ Mill_Origin_Long

double ossimMillerProjection::Mill_Origin_Long
mutableprivate

◆ Ra

double ossimMillerProjection::Ra
mutableprivate

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