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 #ifndef GEO_NORMALIZE_H_INCLUDED
00068 #define GEO_NORMALIZE_H_INCLUDED
00069
00070 #include <stdio.h>
00071 #include "geotiff.h"
00072
00073 #ifdef __cplusplus
00074 extern "C" {
00075 #endif
00076
00083 #define MAX_GTIF_PROJPARMS 10
00084
00089 typedef struct {
00092 short Model;
00093
00095 short PCS;
00096
00099 short GCS;
00100
00102 short UOMLength;
00103
00105 double UOMLengthInMeters;
00106
00108 short UOMAngle;
00109
00111 double UOMAngleInDegrees;
00112
00114 short Datum;
00115
00118 short PM;
00119
00122 double PMLongToGreenwich;
00123
00126 short Ellipsoid;
00127
00129 double SemiMajor;
00130
00132 double SemiMinor;
00133
00135 short ProjCode;
00136
00139 short Projection;
00140
00144 short CTProjection;
00145
00147 int nParms;
00148
00153 double ProjParm[MAX_GTIF_PROJPARMS];
00154
00157 int ProjParmId[MAX_GTIF_PROJPARMS];
00158
00159
00162 int MapSys;
00163
00165 int Zone;
00166
00167 } GTIFDefn;
00168
00169 int CPL_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
00170 short *pnProjOp,
00171 short *pnUOMLengthCode, short *pnGeogCS );
00172 int CPL_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
00173 char ** ppszProjTRFName,
00174 short * pnProjMethod,
00175 double * padfProjParms );
00176 int CPL_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
00177 short *pnDatum, short *pnPM, short *pnUOMAngle );
00178 int CPL_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
00179 short * pnEllipsoid );
00180 int CPL_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
00181 double * pdfSemiMajor,
00182 double * pdfSemiMinor );
00183 int CPL_DLL GTIFGetPMInfo( int nPM, char **ppszName,
00184 double * pdfLongToGreenwich );
00185
00186 double CPL_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
00187 int CPL_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
00188 char **ppszUOMName,
00189 double * pdfInMeters );
00190 int CPL_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
00191 char **ppszUOMName,
00192 double * pdfInDegrees );
00193 double CPL_DLL GTIFAngleToDD( double dfAngle, int nUOMAngle );
00194
00195
00196
00197 void CPL_DLL GTIFFreeMemory( char * );
00198 void CPL_DLL GTIFDeaccessCSV( void );
00199
00200 int CPL_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
00201 void CPL_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
00202 void CPL_DLL GTIFFreeDefn( GTIF * );
00203
00204 void CPL_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
00205
00206 const char CPL_DLL *GTIFDecToDMS( double, const char *, int );
00207
00208
00209
00210
00211
00212
00213 #define MapSys_UTM_North -9001
00214 #define MapSys_UTM_South -9002
00215 #define MapSys_State_Plane_27 -9003
00216 #define MapSys_State_Plane_83 -9004
00217
00218 int CPL_DLL GTIFMapSysToPCS( int MapSys, int Datum, int nZone );
00219 int CPL_DLL GTIFMapSysToProj( int MapSys, int nZone );
00220 int CPL_DLL GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone );
00221 int CPL_DLL GTIFProjToMapSys( int ProjCode, int * pZone );
00222
00223
00224
00225
00226 char CPL_DLL *GTIFGetProj4Defn( GTIFDefn * );
00227 int CPL_DLL GTIFProj4ToLatLong( GTIFDefn *, int, double *, double * );
00228 int CPL_DLL GTIFProj4FromLatLong( GTIFDefn *, int, double *, double * );
00229
00230 #if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)
00231 # define HAVE_GTIFPROJ4
00232 #endif
00233
00234 #ifdef __cplusplus
00235 }
00236 #endif
00237
00238 #endif