00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef GEO_NORMALIZE_H_INCLUDED
00032 #define GEO_NORMALIZE_H_INCLUDED
00033
00034 #include <stdio.h>
00035 #include "geotiff.h"
00036
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040
00047 #define MAX_GTIF_PROJPARMS 10
00048
00053 typedef struct {
00056 short Model;
00057
00059 short PCS;
00060
00063 short GCS;
00064
00066 short UOMLength;
00067
00069 double UOMLengthInMeters;
00070
00072 short UOMAngle;
00073
00075 double UOMAngleInDegrees;
00076
00078 short Datum;
00079
00082 short PM;
00083
00086 double PMLongToGreenwich;
00087
00090 short Ellipsoid;
00091
00093 double SemiMajor;
00094
00096 double SemiMinor;
00097
00099 short TOWGS84Count;
00100
00102 double TOWGS84[7];
00103
00105 short ProjCode;
00106
00109 short Projection;
00110
00114 short CTProjection;
00115
00117 int nParms;
00118
00123 double ProjParm[MAX_GTIF_PROJPARMS];
00124
00127 int ProjParmId[MAX_GTIF_PROJPARMS];
00128
00129
00132 int MapSys;
00133
00135 int Zone;
00136
00138 int DefnSet;
00139
00140 } GTIFDefn;
00141
00142 int CPL_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
00143 short *pnProjOp,
00144 short *pnUOMLengthCode, short *pnGeogCS );
00145 int CPL_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
00146 char ** ppszProjTRFName,
00147 short * pnProjMethod,
00148 double * padfProjParms );
00149 int CPL_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
00150 short *pnDatum, short *pnPM, short *pnUOMAngle );
00151 int CPL_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
00152 short * pnEllipsoid );
00153 int CPL_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
00154 double * pdfSemiMajor,
00155 double * pdfSemiMinor );
00156 int CPL_DLL GTIFGetPMInfo( int nPM, char **ppszName,
00157 double * pdfLongToGreenwich );
00158
00159 double CPL_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
00160 int CPL_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
00161 char **ppszUOMName,
00162 double * pdfInMeters );
00163 int CPL_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
00164 char **ppszUOMName,
00165 double * pdfInDegrees );
00166 double CPL_DLL GTIFAngleToDD( double dfAngle, int nUOMAngle );
00167
00168
00169
00170 void CPL_DLL GTIFFreeMemory( char * );
00171 void CPL_DLL GTIFDeaccessCSV( void );
00172
00173 int CPL_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
00174 void CPL_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
00175 void CPL_DLL GTIFFreeDefn( GTIF * );
00176
00177 void CPL_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
00178
00179 const char CPL_DLL *GTIFDecToDMS( double, const char *, int );
00180
00181
00182
00183
00184
00185
00186 #define MapSys_UTM_North -9001
00187 #define MapSys_UTM_South -9002
00188 #define MapSys_State_Plane_27 -9003
00189 #define MapSys_State_Plane_83 -9004
00190
00191 int CPL_DLL GTIFMapSysToPCS( int MapSys, int Datum, int nZone );
00192 int CPL_DLL GTIFMapSysToProj( int MapSys, int nZone );
00193 int CPL_DLL GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone );
00194 int CPL_DLL GTIFProjToMapSys( int ProjCode, int * pZone );
00195
00196
00197
00198
00199 char CPL_DLL *GTIFGetProj4Defn( GTIFDefn * );
00200
00201 int CPL_DLL GTIFProj4ToLatLong( GTIFDefn *, int, double *, double * );
00202 int CPL_DLL GTIFProj4FromLatLong( GTIFDefn *, int, double *, double * );
00203
00204 int CPL_DLL GTIFSetFromProj4( GTIF *gtif, const char *proj4 );
00205
00206 #if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)
00207 # define HAVE_GTIFPROJ4
00208 #endif
00209
00210 #ifdef __cplusplus
00211 }
00212 #endif
00213
00214 #endif