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
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 #ifndef GDAL_ALG_H_INCLUDED
00087 #define GDAL_ALG_H_INCLUDED
00088
00095 #include "gdal.h"
00096 #include "cpl_minixml.h"
00097
00098 CPL_C_START
00099
00100 int CPL_DLL GDALComputeMedianCutPCT( GDALRasterBandH hRed,
00101 GDALRasterBandH hGreen,
00102 GDALRasterBandH hBlue,
00103 int (*pfnIncludePixel)(int,int,void*),
00104 int nColors,
00105 GDALColorTableH hColorTable,
00106 GDALProgressFunc pfnProgress,
00107 void * pProgressArg );
00108
00109 int CPL_DLL GDALDitherRGB2PCT( GDALRasterBandH hRed,
00110 GDALRasterBandH hGreen,
00111 GDALRasterBandH hBlue,
00112 GDALRasterBandH hTarget,
00113 GDALColorTableH hColorTable,
00114 GDALProgressFunc pfnProgress,
00115 void * pProgressArg );
00116
00117 int CPL_DLL GDALChecksumImage( GDALRasterBandH hBand,
00118 int nXOff, int nYOff, int nXSize, int nYSize );
00119
00120
00121
00122
00123
00124
00125 typedef int
00126 (*GDALTransformerFunc)( void *pTransformerArg,
00127 int bDstToSrc, int nPointCount,
00128 double *x, double *y, double *z, int *panSuccess );
00129
00130
00131
00132
00133
00134 void CPL_DLL *
00135 GDALCreateGenImgProjTransformer( GDALDatasetH hSrcDS, const char *pszSrcWKT,
00136 GDALDatasetH hDstDS, const char *pszDstWKT,
00137 int bGCPUseOK, double dfGCPErrorThreshold,
00138 int nOrder );
00139 void CPL_DLL GDALSetGenImgProjTransformerDstGeoTransform( void *,
00140 const double * );
00141 void CPL_DLL GDALDestroyGenImgProjTransformer( void * );
00142 int CPL_DLL GDALGenImgProjTransform(
00143 void *pTransformArg, int bDstToSrc, int nPointCount,
00144 double *x, double *y, double *z, int *panSuccess );
00145
00146
00147 void CPL_DLL *
00148 GDALCreateReprojectionTransformer( const char *pszSrcWKT,
00149 const char *pszDstWKT );
00150 void CPL_DLL GDALDestroyReprojectionTransformer( void * );
00151 int CPL_DLL GDALReprojectionTransform(
00152 void *pTransformArg, int bDstToSrc, int nPointCount,
00153 double *x, double *y, double *z, int *panSuccess );
00154
00155
00156 void CPL_DLL *
00157 GDALCreateGCPTransformer( int nGCPCount, const GDAL_GCP *pasGCPList,
00158 int nReqOrder, int bReversed );
00159 void CPL_DLL GDALDestroyGCPTransformer( void *pTransformArg );
00160 int CPL_DLL GDALGCPTransform(
00161 void *pTransformArg, int bDstToSrc, int nPointCount,
00162 double *x, double *y, double *z, int *panSuccess );
00163
00164
00165
00166 void CPL_DLL *
00167 GDALCreateRPCTransformer( GDALRPCInfo *psRPC, int bReversed,
00168 double dfPixErrThreshold );
00169 void CPL_DLL GDALDestroyRPCTransformer( void *pTransformArg );
00170 int CPL_DLL GDALRPCTransform(
00171 void *pTransformArg, int bDstToSrc, int nPointCount,
00172 double *x, double *y, double *z, int *panSuccess );
00173
00174
00175 void CPL_DLL *
00176 GDALCreateApproxTransformer( GDALTransformerFunc pfnRawTransformer,
00177 void *pRawTransformerArg, double dfMaxError );
00178 void CPL_DLL GDALDestroyApproxTransformer( void *pApproxArg );
00179 int CPL_DLL GDALApproxTransform(
00180 void *pTransformArg, int bDstToSrc, int nPointCount,
00181 double *x, double *y, double *z, int *panSuccess );
00182
00183
00184
00185
00186 int CPL_DLL GDALSimpleImageWarp( GDALDatasetH hSrcDS,
00187 GDALDatasetH hDstDS,
00188 int nBandCount, int *panBandList,
00189 GDALTransformerFunc pfnTransform,
00190 void *pTransformArg,
00191 GDALProgressFunc pfnProgress,
00192 void *pProgressArg,
00193 char **papszWarpOptions );
00194
00195 CPLErr CPL_DLL
00196 GDALSuggestedWarpOutput( GDALDatasetH hSrcDS,
00197 GDALTransformerFunc pfnTransformer,
00198 void *pTransformArg,
00199 double *padfGeoTransformOut,
00200 int *pnPixels, int *pnLines );
00201
00202 CPLXMLNode CPL_DLL *
00203 GDALSerializeTransformer( GDALTransformerFunc pfnFunc, void *pTransformArg );
00204 CPLErr CPL_DLL GDALDeserializeTransformer( CPLXMLNode *psTree,
00205 GDALTransformerFunc *ppfnFunc,
00206 void **ppTransformArg );
00207
00208
00209
00210
00211
00212
00213 typedef CPLErr (*GDALContourWriter)( double dfLevel, int nPoints,
00214 double *padfX, double *padfY, void * );
00215
00216 typedef void *GDALContourGeneratorH;
00217
00218 GDALContourGeneratorH CPL_DLL
00219 GDAL_CG_Create( int nWidth, int nHeight,
00220 int bNoDataSet, double dfNoDataValue,
00221 double dfContourInterval, double dfContourBase,
00222 GDALContourWriter pfnWriter, void *pCBData );
00223 CPLErr CPL_DLL GDAL_CG_FeedLine( GDALContourGeneratorH hCG,
00224 double *padfScanline );
00225 void CPL_DLL GDAL_CG_Destroy( GDALContourGeneratorH hCG );
00226
00227 typedef struct
00228 {
00229 void *hLayer;
00230
00231 double adfGeoTransform[6];
00232
00233 int nElevField;
00234 int nIDField;
00235 int nNextID;
00236 } OGRContourWriterInfo;
00237
00238 CPLErr CPL_DLL
00239 OGRContourWriter( double, int, double *, double *, void *pInfo );
00240
00241 CPLErr CPL_DLL
00242 GDALContourGenerate( GDALRasterBandH hBand,
00243 double dfContourInterval, double dfContourBase,
00244 int nFixedLevelCount, double *padfFixedLevels,
00245 int bUseNoData, double dfNoDataValue,
00246 void *hLayer, int iIDField, int iElevField,
00247 GDALProgressFunc pfnProgress, void *pProgressArg );
00248
00249 CPL_C_END
00250
00251 #endif