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
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 #ifndef GEO_NORMALIZE_H_INCLUDED
00071 #define GEO_NORMALIZE_H_INCLUDED
00072
00073 #include <stdio.h>
00074 #include "geotiff.h"
00075
00076 #ifdef __cplusplus
00077 extern "C" {
00078 #endif
00079
00086 #define MAX_GTIF_PROJPARMS 10
00087
00092 typedef struct {
00095 short Model;
00096
00098 short PCS;
00099
00102 short GCS;
00103
00105 short UOMLength;
00106
00108 double UOMLengthInMeters;
00109
00111 short UOMAngle;
00112
00114 double UOMAngleInDegrees;
00115
00117 short Datum;
00118
00121 short PM;
00122
00125 double PMLongToGreenwich;
00126
00129 short Ellipsoid;
00130
00132 double SemiMajor;
00133
00135 double SemiMinor;
00136
00138 short ProjCode;
00139
00142 short Projection;
00143
00147 short CTProjection;
00148
00150 int nParms;
00151
00156 double ProjParm[MAX_GTIF_PROJPARMS];
00157
00160 int ProjParmId[MAX_GTIF_PROJPARMS];
00161
00162
00165 int MapSys;
00166
00168 int Zone;
00169
00170 } GTIFDefn;
00171
00172 int CPL_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
00173 short *pnProjOp,
00174 short *pnUOMLengthCode, short *pnGeogCS );
00175 int CPL_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
00176 char ** ppszProjTRFName,
00177 short * pnProjMethod,
00178 double * padfProjParms );
00179 int CPL_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
00180 short *pnDatum, short *pnPM, short *pnUOMAngle );
00181 int CPL_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
00182 short * pnEllipsoid );
00183 int CPL_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
00184 double * pdfSemiMajor,
00185 double * pdfSemiMinor );
00186 int CPL_DLL GTIFGetPMInfo( int nPM, char **ppszName,
00187 double * pdfLongToGreenwich );
00188
00189 double CPL_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
00190 int CPL_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
00191 char **ppszUOMName,
00192 double * pdfInMeters );
00193 int CPL_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
00194 char **ppszUOMName,
00195 double * pdfInDegrees );
00196 double CPL_DLL GTIFAngleToDD( double dfAngle, int nUOMAngle );
00197
00198
00199
00200 void CPL_DLL GTIFFreeMemory( char * );
00201 void CPL_DLL GTIFDeaccessCSV( void );
00202
00203 int CPL_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
00204 void CPL_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
00205 void CPL_DLL GTIFFreeDefn( GTIF * );
00206
00207 void CPL_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
00208
00209 const char CPL_DLL *GTIFDecToDMS( double, const char *, int );
00210
00211
00212
00213
00214
00215
00216 #define MapSys_UTM_North -9001
00217 #define MapSys_UTM_South -9002
00218 #define MapSys_State_Plane_27 -9003
00219 #define MapSys_State_Plane_83 -9004
00220
00221 int CPL_DLL GTIFMapSysToPCS( int MapSys, int Datum, int nZone );
00222 int CPL_DLL GTIFMapSysToProj( int MapSys, int nZone );
00223 int CPL_DLL GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone );
00224 int CPL_DLL GTIFProjToMapSys( int ProjCode, int * pZone );
00225
00226
00227
00228
00229 char CPL_DLL *GTIFGetProj4Defn( GTIFDefn * );
00230
00231 int CPL_DLL GTIFProj4ToLatLong( GTIFDefn *, int, double *, double * );
00232 int CPL_DLL GTIFProj4FromLatLong( GTIFDefn *, int, double *, double * );
00233
00234 int CPL_DLL GTIFSetFromProj4( GTIF *gtif, const char *proj4 );
00235
00236 #if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)
00237 # define HAVE_GTIFPROJ4
00238 #endif
00239
00240 #ifdef __cplusplus
00241 }
00242 #endif
00243
00244 #endif