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