- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# Y:/msp/devkits/temp_geotrans/master/geotrans3.1/CCS/src/dtcc/CoordinateSystems/mollweid/Mollweide.h

Go to the documentation of this file.

    00001 // CLASSIFICATION: UNCLASSIFIED
    00002
    00003 #ifndef Mollweide_H
    00004 #define Mollweide_H
    00005
    00006 /***************************************************************************/
    00007 /* RSC IDENTIFIER: MOLLWEIDE
    00008  *
    00009  * ABSTRACT
    00010  *
    00011  *    This component provides conversions between Geodetic coordinates
    00012  *    (latitude and longitude in radians) and Mollweide projection coordinates
    00013  *    (easting and northing in meters).  The Mollweide Pseudocylindrical
    00014  *    projection employs a spherical Earth model.  The Spherical Radius
    00015  *    used is the the radius of the sphere having the same area as the
    00016  *    ellipsoid.
    00017  *
    00018  * ERROR HANDLING
    00019  *
    00020  *    This component checks parameters for valid values.  If an invalid value
    00021  *    is found, the error code is combined with the current error code using
    00022  *    the bitwise or.  This combining allows multiple error codes to be
    00023  *    returned. The possible error codes are:
    00024  *
    00025  *          MOLL_NO_ERROR           : No errors occurred in function
    00026  *          MOLL_LAT_ERROR          : Latitude outside of valid range
    00027  *                                      (-90 to 90 degrees)
    00028  *          MOLL_LON_ERROR          : Longitude outside of valid range
    00029  *                                      (-180 to 360 degrees)
    00030  *          MOLL_EASTING_ERROR      : Easting outside of valid range
    00031  *                                      (False_Easting +/- ~18,000,000 m,
    00032  *                                       depending on ellipsoid parameters)
    00033  *          MOLL_NORTHING_ERROR     : Northing outside of valid range
    00034  *                                      (False_Northing +/- ~9,000,000 m,
    00035  *                                       depending on ellipsoid parameters)
    00036  *          MOLL_ORIGIN_LON_ERROR   : Origin longitude outside of valid range
    00037  *                                      (-180 to 360 degrees)
    00038  *          MOLL_A_ERROR            : Semi-major axis less than or equal to zero
    00039  *          MOLL_INV_F_ERROR        : Inverse flattening outside of valid range
    00040  *                                                                                        (250 to 350)
    00041  *
    00042  * REUSE NOTES
    00043  *
    00044  *    MOLLWEID is intended for reuse by any application that performs a
    00045  *    Mollweide projection or its inverse.
    00046  *
    00047  * REFERENCES
    00048  *
    00049  *    Further information on MOLLWEID can be found in the Reuse Manual.
    00050  *
    00051  *    MOLLWEID originated from :  U.S. Army Topographic Engineering Center
    00052  *                                Geospatial Information Division
    00053  *                                7701 Telegraph Road
    00054  *                                Alexandria, VA  22310-3864
    00055  *
    00056  * LICENSES
    00057  *
    00058  *    None apply to this component.
    00059  *
    00060  * RESTRICTIONS
    00061  *
    00062  *    MOLLWEID has no restrictions.
    00063  *
    00064  * ENVIRONMENT
    00065  *
    00066  *    MOLLWEID was tested and certified in the following environments:
    00067  *
    00068  *    1. Solaris 2.5 with GCC 2.8.1
    00069  *    2. Windows 95 with MS Visual C++ 6
    00070  *
    00071  * MODIFICATIONS
    00072  *
    00073  *    Date              Description
    00074  *    ----              -----------
    00075  *    04-16-99          Original Code
    00076  *    03-05-07          Original C++ Code
    00077  *
    00078  */
    00079
    00080
    00081 #include "CoordinateSystem.h"
    00082
    00083
    00084 namespace MSP
    00085 {
    00086   namespace CCS
    00087   {
    00088     class MapProjection3Parameters;
    00089     class MapProjectionCoordinates;
    00090     class GeodeticCoordinates;
    00091
    00092
    00093     /***************************************************************************/
    00094     /*
    00095      *                              DEFINES
    00096      */
    00097
    00098     class Mollweide : public CoordinateSystem
    00099     {
    00100     public:
    00101
    00102       /*
    00103        * The constructor receives the ellipsoid parameters and
    00104        * Mollweide projcetion parameters as inputs, and sets the corresponding state
    00105        * variables.  If any errors occur, an exception is thrown with a description
    00106        * of the error.
    00107        *
    00108        *    ellipsoidSemiMajorAxis  : Semi-major axis of ellipsoid, in meters   (input)
    00109        *    ellipsoidFlattening     : Flattening of ellipsoid                                                   (input)
    00110        *    centralMeridian         : Longitude in radians at the center of     (input)
    00111        *                              the projection
    00112        *    falseEasting            : A coordinate value in meters assigned to the
    00113        *                              central meridian of the projection.       (input)
    00114        *    falseNorthing           : A coordinate value in meters assigned to the
    00115        *                              origin latitude of the projection         (input)
    00116        */
    00117
    00118             Mollweide( double ellipsoidSemiMajorAxis, double ellipsoidFlattening, double centralMeridian, double falseEasting, double falseNorthing );
    00119
    00120
    00121       Mollweide( const Mollweide &m );
    00122
    00123
    00124             ~Mollweide( void );
    00125
    00126
    00127       Mollweide& operator=( const Mollweide &m );
    00128
    00129
    00130       /*
    00131        * The function getParameters returns the current ellipsoid
    00132        * parameters and Mollweide projection parameters.
    00133        *
    00134        *    ellipsoidSemiMajorAxis  : Semi-major axis of ellipsoid, in meters   (output)
    00135        *    ellipsoidFlattening     : Flattening of ellipsoid                                                   (output)
    00136        *    centralMeridian         : Longitude in radians at the center of     (output)
    00137        *                              the projection
    00138        *    falseEasting            : A coordinate value in meters assigned to the
    00139        *                              central meridian of the projection.       (output)
    00140        *    falseNorthing           : A coordinate value in meters assigned to the
    00141        *                              origin latitude of the projection         (output)
    00142        */
    00143
    00144       MapProjection3Parameters* getParameters() const;
    00145
    00146
    00147       /*
    00148        * The function convertFromGeodetic converts geodetic (latitude and
    00149        * longitude) coordinates to Mollweide projection (easting and northing)
    00150        * coordinates, according to the current ellipsoid and Mollweide projection
    00151        * parameters.  If any errors occur, an exception is thrown with a description
    00152        * of the error.
    00153        *
    00154        *    longitude         : Longitude (lambda) in radians       (input)
    00155        *    latitude          : Latitude (phi) in radians           (input)
    00156        *    easting           : Easting (X) in meters               (output)
    00157        *    northing          : Northing (Y) in meters              (output)
    00158        */
    00159
    00160       MSP::CCS::MapProjectionCoordinates* convertFromGeodetic( MSP::CCS::GeodeticCoordinates* geodeticCoordinates );
    00161
    00162
    00163       /*
    00164        * The function convertToGeodetic converts Mollweide projection
    00165        * (easting and northing) coordinates to geodetic (latitude and longitude)
    00166        * coordinates, according to the current ellipsoid and Mollweide projection
    00167        * coordinates. If any errors occur, an exception is thrown with a description
    00168        * of the error.
    00169        *
    00170        *    easting           : Easting (X) in meters                  (input)
    00171        *    northing          : Northing (Y) in meters                 (input)
    00172        *    longitude         : Longitude (lambda) in radians          (output)
    00173        *    latitude          : Latitude (phi) in radians              (output)
    00174        */
    00175
    00176       MSP::CCS::GeodeticCoordinates* convertToGeodetic( MSP::CCS::MapProjectionCoordinates* mapProjectionCoordinates );
    00177
    00178     private:
    00179
    00180       /* Ellipsoid Parameters, default to WGS 84 */
    00181       double es2;             /* Eccentricity (0.08181919084262188000) squared */
    00182       double es4;             /* es2 * es2      */
    00183       double es6;             /* es4 * es2  */
    00184       double Sqrt2_Ra;        /* sqrt(2.0) * Spherical Radius(6371007.1810824) */
    00185       double Sqrt8_Ra;        /* sqrt(8.0) * Spherical Radius(6371007.1810824) */
    00186
    00187       /* Mollweide projection Parameters */
    00188       double Moll_Origin_Long;            /* Longitude of origin in radians    */
    00189       double Moll_False_Easting;
    00190       double Moll_False_Northing;
    00191       double Moll_Delta_Northing;
    00192       double Moll_Max_Easting;
    00193       double Moll_Min_Easting;
    00194
    00195     };
    00196   }
    00197 }
    00198
    00199 #endif
    00200
    00201
    00202 // CLASSIFICATION: UNCLASSIFIED