Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

geo_normalize.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * $Id: geo_normalize_h-source.html 385 2001-03-05 04:58:33Z warmerda $
00003  *
00004  * Project:  libgeotiff
00005  * Purpose:  Include file related to geo_normalize.c containing Code to
00006  *           normalize PCS and other composite codes in a GeoTIFF file.
00007  * Author:   Frank Warmerdam, warmerda@home.com
00008  *
00009  ******************************************************************************
00010  * Copyright (c) 1999, Frank Warmerdam
00011  *
00012  * Permission is hereby granted, free of charge, to any person obtaining a
00013  * copy of this software and associated documentation files (the "Software"),
00014  * to deal in the Software without restriction, including without limitation
00015  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00016  * and/or sell copies of the Software, and to permit persons to whom the
00017  * Software is furnished to do so, subject to the following conditions:
00018  *
00019  * The above copyright notice and this permission notice shall be included
00020  * in all copies or substantial portions of the Software.
00021  *
00022  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00023  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00024  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00025  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00026  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00027  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00028  * DEALINGS IN THE SOFTWARE.
00029  ******************************************************************************
00030  *
00031  * $Log$
00031  * Revision 1.2  2001/03/05 04:58:33  warmerda
00031  * updated
00031  *
00032  * Revision 1.7  1999/09/17 00:55:26  warmerda
00033  * added GTIFGetUOMAngleInfo(), and UOMAngle in GTIFDefn
00034  *
00035  * Revision 1.6  1999/05/04 03:13:42  warmerda
00036  * Added prototype
00037  *
00038  * Revision 1.5  1999/04/29 23:02:55  warmerda
00039  * added docs, and MapSys related stuff
00040  *
00041  * Revision 1.4  1999/03/18 21:35:19  geotiff
00042  * Added PROJ.4 related stuff
00043  *
00044  * Revision 1.3  1999/03/17 20:44:04  geotiff
00045  * added CPL_DLL related support
00046  *
00047  * Revision 1.2  1999/03/10 18:24:06  geotiff
00048  * corrected to use int'
00049  *
00050  */
00051 
00052 #ifndef GEO_NORMALIZE_H_INCLUDED
00053 #define GEO_NORMALIZE_H_INCLUDED
00054 
00055 #include <stdio.h>
00056 #include "geotiff.h"
00057 
00058 #ifdef __cplusplus
00059 extern "C" {
00060 #endif
00061 
00068 #define MAX_GTIF_PROJPARMS      10
00069 
00074 typedef struct {
00077     short       Model;
00078 
00080     short       PCS;
00081 
00084     short       GCS;          
00085 
00087     short       UOMLength;
00088 
00090     double      UOMLengthInMeters;
00091 
00093     short       UOMAngle;
00094 
00096     double      UOMAngleInDegrees;
00097     
00099     short       Datum;
00100 
00103     short       PM;
00104 
00107     double      PMLongToGreenwich;
00108 
00111     short       Ellipsoid;
00112 
00114     double      SemiMajor;
00115 
00117     double      SemiMinor;
00118 
00120     short       ProjCode;
00121 
00124     short       Projection;
00125 
00129     short       CTProjection;   
00130 
00132     int         nParms;
00133 
00138     double      ProjParm[MAX_GTIF_PROJPARMS];
00139 
00142     int         ProjParmId[MAX_GTIF_PROJPARMS]; /* geokey identifier,
00143                                                    eg. ProjFalseEastingGeoKey*/
00144 
00147     int         MapSys;
00148 
00150     int         Zone;
00151 
00152 } GTIFDefn;
00153 
00154 int CPL_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
00155                             short *pnUOMLengthCode, short *pnUOMAngleCode,
00156                             short *pnGeogCS, short *pnProjectionCSCode );
00157 int CPL_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
00158                                 char ** ppszProjTRFName,
00159                                 short * pnProjMethod,
00160                                 double * padfProjParms );
00161 int CPL_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
00162                             short *pnDatum, short *pnPM, short *pnUOMAngle );
00163 int CPL_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
00164                               short * pnEllipsoid );
00165 int CPL_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
00166                                   double * pdfSemiMajor,
00167                                   double * pdfSemiMinor );
00168 int CPL_DLL GTIFGetPMInfo( int nPM, char **ppszName,
00169                            double * pdfLongToGreenwich );
00170 
00171 double CPL_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
00172 int CPL_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
00173                                   char **ppszUOMName,
00174                                   double * pdfInMeters );
00175 int CPL_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
00176                                  char **ppszUOMName,
00177                                  double * pdfInDegrees );
00178 
00179 int CPL_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
00180 void CPL_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
00181 void CPL_DLL GTIFFreeDefn( GTIF * );
00182 
00183 void CPL_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
00184 
00185 const char CPL_DLL *GTIFDecToDMS( double, const char *, int );
00186 
00187 /*
00188  * These are useful for recognising UTM and State Plane, with or without
00189  * CSV files being found.
00190  */
00191 
00192 #define MapSys_UTM_North        -9001
00193 #define MapSys_UTM_South        -9002
00194 #define MapSys_State_Plane_27   -9003
00195 #define MapSys_State_Plane_83   -9004
00196 
00197 int CPL_DLL   GTIFMapSysToPCS( int MapSys, int Datum, int nZone );
00198 int CPL_DLL   GTIFMapSysToProj( int MapSys, int nZone );
00199 int CPL_DLL   GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone );
00200 int CPL_DLL   GTIFProjToMapSys( int ProjCode, int * pZone );
00201 
00202 /*
00203  * These are only useful if using libgeotiff with libproj (PROJ.4+).
00204  */
00205 char CPL_DLL *GTIFGetProj4Defn( GTIFDefn * );
00206 int  CPL_DLL  GTIFProj4ToLatLong( GTIFDefn *, int, double *, double * );
00207 int  CPL_DLL  GTIFProj4FromLatLong( GTIFDefn *, int, double *, double * );
00208 
00209 #if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)
00210 #  define HAVE_GTIFPROJ4
00211 #endif
00212 
00213 #ifdef __cplusplus
00214 }
00215 #endif
00216     
00217 #endif /* ndef GEO_NORMALIZE_H_INCLUDED */

Generated at Sun Mar 4 23:32:44 2001 for libgeotiff by doxygen1.2.3-20001105 written by Dimitri van Heesch, © 1997-2000