gauss.h
资源名称:QGIS.rar [点击查看]
上传用户:oybseng
上传日期:2015-04-27
资源大小:7831k
文件大小:8k
源码类别:
GDI/图象编程
开发平台:
Visual C++
- #ifndef Gauss_H
- #define Gauss_H
- /***************************************************************************/
- /* RSC IDENTIFIER: Gauss
- *
- * ABSTRACT
- *
- * This component provides conversions between geodetic coordinates
- * (latitude and longitudes) and Universal Transverse Mercator (Gauss)
- * projection (zone, hemisphere, easting, and northing) coordinates.
- *
- * ERROR HANDLING
- *
- * This component checks parameters for valid values. If an invalid value
- * is found, the error code is combined with the current error code using
- * the bitwise or. This combining allows multiple error codes to be
- * returned. The possible error codes are:
- *
- * GAUSS_NO_ERROR : No errors occurred in function
- * GAUSS_LAT_ERROR : Latitude outside of valid range
- * (-80.5 to 84.5 degrees)
- * GAUSS_LON_ERROR : Longitude outside of valid range
- * (-180 to 360 degrees)
- * GAUSS_EASTING_ERROR : Easting outside of valid range
- * (100,000 to 900,000 meters)
- * GAUSS_NORTHING_ERROR : Northing outside of valid range
- * (0 to 10,000,000 meters)
- * GAUSS_ZONE_ERROR : Zone outside of valid range (1 to 60)
- * GAUSS_HEMISPHERE_ERROR : Invalid hemisphere ('N' or 'S')
- * GAUSS_ZONE_OVERRIDE_ERROR: Zone outside of valid range
- * (1 to 60) and within 1 of 'natural' zone
- * GAUSS_A_ERROR : Semi-major axis less than or equal to zero
- * GAUSS_INV_F_ERROR : Inverse flattening outside of valid range
- * (250 to 350)
- *
- * REUSE NOTES
- *
- * Gauss is intended for reuse by any application that performs a Universal
- * Transverse Mercator (Gauss) projection or its inverse.
- *
- * REFERENCES
- *
- * Further information on Gauss can be found in the Reuse Manual.
- *
- * Gauss originated from : U.S. Army Topographic Engineering Center
- * Geospatial Information Division
- * 7701 Telegraph Road
- * Alexandria, VA 22310-3864
- *
- * LICENSES
- *
- * None apply to this component.
- *
- * RESTRICTIONS
- *
- * Gauss has no restrictions.
- *
- * ENVIRONMENT
- *
- * Gauss was tested and certified in the following environments:
- *
- * 1. Solaris 2.5 with GCC, version 2.8.1
- * 2. MSDOS with MS Visual C++, version 6
- *
- * MODIFICATIONS
- *
- * Date Description
- * ---- -----------
- * 10-02-97 Original Code
- *
- */
- /***************************************************************************/
- /*
- * DEFINES
- */
- #define GAUSS_NO_ERROR 0x0000
- #define GAUSS_LAT_ERROR 0x0001
- #define GAUSS_LON_ERROR 0x0002
- #define GAUSS_EASTING_ERROR 0x0004
- #define GAUSS_NORTHING_ERROR 0x0008
- #define GAUSS_ZONE_ERROR 0x0010
- #define GAUSS_HEMISPHERE_ERROR 0x0020
- #define GAUSS_ZONE_OVERRIDE_ERROR 0x0040
- #define GAUSS_A_ERROR 0x0080
- #define GAUSS_INV_F_ERROR 0x0100
- /***************************************************************************/
- /*
- * FUNCTION PROTOTYPES
- * for Gauss.C
- */
- /* ensure proper linkage to c++ programs */
- #ifdef __cplusplus
- extern "C" {
- #endif
- long Set_Gauss_Parameters(double a,
- double f,
- double L0_rad);
- /*
- * The function Set_Gauss_Parameters receives the ellipsoid parameters and
- * Gauss zone override parameter as inputs, and sets the corresponding state
- * variables. If any errors occur, the error code(s) are returned by the
- * function, otherwise Gauss_NO_ERROR is returned.
- *
- * a : Semi-major axis of ellipsoid, in meters (input)
- * f : Flattening of ellipsoid (input)
- * override : Gauss override zone, zero indicates no override (input)
- */
- void Get_Gauss_Parameters(double *a,
- double *f,
- double *L0_rad);
- /*
- * The function Get_Gauss_Parameters returns the current ellipsoid
- * parameters and Gauss zone override parameter.
- *
- * a : Semi-major axis of ellipsoid, in meters (output)
- * f : Flattening of ellipsoid (output)
- * override : Gauss override zone, zero indicates no override (output)
- */
- long Convert_Geodetic_To_Gauss (double Latitude,
- double Longitude,
- double *Easting,
- double *Northing);
- /*
- * The function Convert_Geodetic_To_Gauss converts geodetic (latitude and
- * longitude) coordinates to Gauss projection (zone, hemisphere, easting and
- * northing) coordinates according to the current ellipsoid and Gauss zone
- * override parameters. If any errors occur, the error code(s) are returned
- * by the function, otherwise Gauss_NO_ERROR is returned.
- *
- * Latitude : Latitude in radians (input)
- * Longitude : Longitude in radians (input)
- * Zone : Gauss zone (output)
- * Hemisphere : North or South hemisphere (output)
- * Easting : Easting (X) in meters (output)
- * Northing : Northing (Y) in meters (output)
- */
- long Convert_Gauss_To_Geodetic(double Easting,
- double Northing,
- double *Latitude,
- double *Longitude);
- /*
- * The function Convert_Gauss_To_Geodetic converts Gauss projection (zone,
- * hemisphere, easting and northing) coordinates to geodetic(latitude
- * and longitude) coordinates, according to the current ellipsoid
- * parameters. If any errors occur, the error code(s) are returned
- * by the function, otherwise GAUSS__NO_ERROR is returned.
- *
- * Zone : Gauss zone (input)
- * Hemisphere : North or South hemisphere (input)
- * Easting : Easting (X) in meters (input)
- * Northing : Northing (Y) in meters (input)
- * Latitude : Latitude in radians (output)
- * Longitude : Longitude in radians (output)
- */
- /*
- ////GeoView_Tech_Mark_Begin
- //================================================================//
- //GeoView_Doc_Mark_Begin
- // 函数名: GaussTransStrip
- // 功 能: 高斯投影换带转换
- // 参 数:
- // (入口): double source_easting,double source_northing, 原投影带的x,y坐标点;double source_L0,原投影带中央经线
- // double result_L0,目标投影带中央经线; a - 地球长轴, afa - 扁率倒数
- // (出口): double &result_easting, double &result_northing 函数中坐标为转换过的坐标, x 轴指向东, y轴指向北
- // 返 回: 无
- // 调用方法: GaussTransStrip(double source_easting,double source_northing, double source_L0,double result_L0, double a,double afa,double &result_easting, double &result_northing)
- //GeoView_Doc_Mark_End
- // 主要思路:
- // 创建日期:2004/3/4 李新川
- // 修改日期:2004/3/4 李新川
- //================================================================//
- */
- void Convert_Gauss_Trans_Strip(double source_easting,
- double source_northing,
- double source_L0,
- double result_L0,
- double *result_easting,
- double *result_northing);
- #ifdef __cplusplus
- }
- #endif
- #endif /* Gauss_H */