- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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

Go to the documentation of this file.

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