Go to the documentation of this file.
31 #ifndef GDALWARPER_H_INCLUDED
32 #define GDALWARPER_H_INCLUDED
44 #include "cpl_multiproc.h"
78 (*GDALMaskFunc)(
void *pMaskFuncArg,
81 int nXSize,
int nYSize,
82 GByte **papabyImageData,
83 int bMaskIsFloat,
void *pMask );
86 GDALWarpNoDataMasker(
void *pMaskFuncArg,
int nBandCount,
GDALDataType eType,
87 int nXOff,
int nYOff,
int nXSize,
int nYSize,
88 GByte **papabyImageData,
int bMaskIsFloat,
89 void *pValidityMask,
int* pbOutAllValid );
92 GDALWarpDstAlphaMasker(
void *pMaskFuncArg,
int nBandCount,
GDALDataType eType,
93 int nXOff,
int nYOff,
int nXSize,
int nYSize,
95 int bMaskIsFloat,
void *pValidityMask );
97 GDALWarpSrcAlphaMasker(
void *pMaskFuncArg,
int nBandCount,
GDALDataType eType,
98 int nXOff,
int nYOff,
int nXSize,
int nYSize,
100 int bMaskIsFloat,
void *pValidityMask,
int* pbOutAllOpaque );
103 GDALWarpSrcMaskMasker(
void *pMaskFuncArg,
int nBandCount,
GDALDataType eType,
104 int nXOff,
int nYOff,
int nXSize,
int nYSize,
106 int bMaskIsFloat,
void *pValidityMask );
109 GDALWarpCutlineMasker(
void *pMaskFuncArg,
int nBandCount,
GDALDataType eType,
110 int nXOff,
int nYOff,
int nXSize,
int nYSize,
112 int bMaskIsFloat,
void *pValidityMask );
122 char **papszWarpOptions;
125 double dfWarpMemoryLimit;
156 double *padfSrcNoDataReal;
160 double *padfSrcNoDataImag;
163 double *padfDstNoDataReal;
167 double *padfDstNoDataImag;
171 GDALProgressFunc pfnProgress;
180 void *pTransformerArg;
183 GDALMaskFunc *papfnSrcPerBandValidityMaskFunc;
185 void **papSrcPerBandValidityMaskFuncArg;
188 GDALMaskFunc pfnSrcValidityMaskFunc;
190 void *pSrcValidityMaskFuncArg;
193 GDALMaskFunc pfnSrcDensityMaskFunc;
195 void *pSrcDensityMaskFuncArg;
198 GDALMaskFunc pfnDstDensityMaskFunc;
200 void *pDstDensityMaskFuncArg;
203 GDALMaskFunc pfnDstValidityMaskFunc;
205 void *pDstValidityMaskFuncArg;
208 CPLErr (*pfnPreWarpChunkProcessor)(
void *pKern,
void *pArg );
210 void *pPreWarpProcessorArg;
213 CPLErr (*pfnPostWarpChunkProcessor)(
void *pKern,
void *pArg);
215 void *pPostWarpProcessorArg;
221 double dfCutlineBlendDist;
230 void CPL_DLL CPL_STDCALL
233 void CPL_DLL CPL_STDCALL
236 void CPL_DLL CPL_STDCALL
239 void CPL_DLL CPL_STDCALL
242 void CPL_DLL CPL_STDCALL
245 void CPL_DLL CPL_STDCALL
248 void CPL_DLL CPL_STDCALL
262 CPLErr CPL_DLL CPL_STDCALL
267 GDALProgressFunc pfnProgress,
void *pProgressArg,
270 CPLErr CPL_DLL CPL_STDCALL
272 const char *pszDstFilename,
const char *pszDstWKT,
276 GDALProgressFunc pfnProgress,
void *pProgressArg,
285 const char *pszSrcWKT,
const char *pszDstWKT,
291 int nPixels,
int nLines,
double *padfGeoTransform,
294 CPLErr CPL_DLL CPL_STDCALL
300 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
311 #define WARP_EXTRA_ELTS 1
326 char **papszWarpOptions;
340 double dfSrcXExtraSize;
342 double dfSrcYExtraSize;
344 GByte **papabySrcImage;
351 float *pafUnifiedSrcDensity;
358 GByte **papabyDstImage;
362 float *pafDstDensity;
394 void *pTransformerArg;
397 GDALProgressFunc pfnProgress;
402 double dfProgressBase;
404 double dfProgressScale;
407 double *padfDstNoDataReal;
422 void* GWKThreadsCreate(
char** papszWarpOptions,
424 void* pTransformerArg);
425 void GWKThreadsEnd(
void* psThreadDataIn);
439 typedef struct _GDALWarpChunk GDALWarpChunk;
450 int ValidateOptions();
452 CPLErr ComputeSourceWindow(
int nDstXOff,
int nDstYOff,
453 int nDstXSize,
int nDstYSize,
454 int *pnSrcXOff,
int *pnSrcYOff,
455 int *pnSrcXSize,
int *pnSrcYSize,
456 double *pdfSrcXExtraSize,
double *pdfSrcYExtraSize,
457 double* pdfSrcFillRatio );
459 void ComputeSourceWindowStartingFromSource(
460 int nDstXOff,
int nDstYOff,
461 int nDstXSize,
int nDstYSize,
462 double* padfSrcMinX,
double* padfSrcMinY,
463 double* padfSrcMaxX,
double* padfSrcMaxY);
466 const char *pszType );
469 CPLMutex *hWarpMutex;
473 GDALWarpChunk *pasChunkList;
476 unsigned long nLastTimeReported;
480 void WipeChunkList();
481 CPLErr CollectChunkListInternal(
int nDstXOff,
int nDstYOff,
482 int nDstXSize,
int nDstYSize );
483 void CollectChunkList(
int nDstXOff,
int nDstYOff,
484 int nDstXSize,
int nDstYSize );
485 void ReportTiming(
const char * );
492 void* CreateDestinationBuffer(
int nDstXSize,
int nDstYSize,
493 int *pbWasInitialized =
nullptr );
494 static void DestroyDestinationBuffer(
void* pDstBuffer);
498 CPLErr ChunkAndWarpImage(
int nDstXOff,
int nDstYOff,
499 int nDstXSize,
int nDstYSize );
500 CPLErr ChunkAndWarpMulti(
int nDstXOff,
int nDstYOff,
501 int nDstXSize,
int nDstYSize );
502 CPLErr WarpRegion(
int nDstXOff,
int nDstYOff,
503 int nDstXSize,
int nDstYSize,
504 int nSrcXOff=0,
int nSrcYOff=0,
505 int nSrcXSize=0,
int nSrcYSize=0,
506 double dfProgressBase=0.0,
double dfProgressScale=1.0);
507 CPLErr WarpRegion(
int nDstXOff,
int nDstYOff,
508 int nDstXSize,
int nDstYSize,
509 int nSrcXOff,
int nSrcYOff,
510 int nSrcXSize,
int nSrcYSize,
511 double dfSrcXExtraSize,
double dfSrcYExtraSize,
512 double dfProgressBase,
double dfProgressScale);
513 CPLErr WarpRegionToBuffer(
int nDstXOff,
int nDstYOff,
514 int nDstXSize,
int nDstYSize,
517 int nSrcXOff=0,
int nSrcYOff=0,
518 int nSrcXSize=0,
int nSrcYSize=0,
519 double dfProgressBase=0.0,
double dfProgressScale=1.0);
520 CPLErr WarpRegionToBuffer(
int nDstXOff,
int nDstYOff,
521 int nDstXSize,
int nDstYSize,
524 int nSrcXOff,
int nSrcYOff,
525 int nSrcXSize,
int nSrcYSize,
526 double dfSrcXExtraSize,
double dfSrcYExtraSize,
527 double dfProgressBase,
double dfProgressScale);
542 int,
int,
int,
int,
int,
int,
int,
int );
545 int,
int,
int,
int );
554 typedef double (*FilterFuncType)(
double dfX);
558 typedef double (*FilterFunc4ValuesType)(
double* padfVals);
559 FilterFunc4ValuesType GWKGetFilterFunc4Values(
GDALResampleAlg eResampleAlg);
Definition: gdalwarper.h:60
CPLErr GDALCreateAndReprojectImage(GDALDatasetH hSrcDS, const char *pszSrcWKT, const char *pszDstFilename, const char *pszDstWKT, GDALDriverH hDstDriver, char **papszCreateOptions, GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit, double dfMaxError, GDALProgressFunc pfnProgress, void *pProgressArg, GDALWarpOptions *psOptions)
Reproject an image and create the target reprojected image.
Definition: gdalwarper.cpp:239
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:214
Definition: gdalwarper.h:53
CPLErr GDALWarpRegionToBuffer(GDALWarpOperationH, int, int, int, int, void *, GDALDataType, int, int, int, int)
Definition: gdalwarpoperation.cpp:2281
void GDALWarpInitSrcNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal with specified value.
Definition: gdalwarper.cpp:1360
GDALDatasetH GDALAutoCreateWarpedVRT(GDALDatasetH hSrcDS, const char *pszSrcWKT, const char *pszDstWKT, GDALResampleAlg eResampleAlg, double dfMaxError, const GDALWarpOptions *psOptions)
Create virtual warped dataset automatically.
Definition: vrtwarped.cpp:103
Definition: gdalwarper.h:71
void GDALDestroyWarpOptions(GDALWarpOptions *)
Destroy a warp options structure.
Definition: gdalwarper.cpp:1240
GDALDatasetH GDALCreateWarpedVRT(GDALDatasetH hSrcDS, int nPixels, int nLines, double *padfGeoTransform, GDALWarpOptions *psOptions)
Create virtual warped dataset.
Definition: vrtwarped.cpp:273
This class represents the lowest level of abstraction of warping.
Definition: gdalwarper.h:319
Definition: gdalwarper.h:67
GWKAverageOrModeAlg
Definition: gdalwarper.h:66
GDALDataType
Definition: gdal.h:59
Definition: gdalwarper.h:61
Document node structure.
Definition: cpl_minixml.h:65
Definition: gdalwarper.h:441
void GDALWarpInitDstNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfDstNoDataReal with specified value.
Definition: gdalwarper.cpp:1340
void GDALWarpInitDstNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfDstNoDataImag with specified value.
Definition: gdalwarper.cpp:1398
Definition: gdalwarper.h:54
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:336
Definition: gdalwarper.h:55
Warp control options for use with GDALWarpOperation::Initialize()
Definition: gdalwarper.h:119
Definition: gdalwarper.h:70
void GDALDestroyWarpOperation(GDALWarpOperationH)
Definition: gdalwarpoperation.cpp:796
Definition: gdalwarper.h:52
GDALWarpOptions * GDALCloneWarpOptions(const GDALWarpOptions *)
Clone a warp options structure.
Definition: gdalwarper.cpp:1281
CPLErr GDALReprojectImage(GDALDatasetH hSrcDS, const char *pszSrcWKT, GDALDatasetH hDstDS, const char *pszDstWKT, GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit, double dfMaxError, GDALProgressFunc pfnProgress, void *pProgressArg, GDALWarpOptions *psOptions)
Reproject image.
Definition: gdalwarper.cpp:96
Definition: gdalwarper.h:59
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:338
void * GDALWarpOperationH
Opaque type representing a GDALWarpOperation object.
Definition: gdalwarper.h:534
CPLErr GDALWarpRegion(GDALWarpOperationH, int, int, int, int, int, int, int, int)
Definition: gdalwarpoperation.cpp:1658
Definition: gdalwarper.h:68
GDALResampleAlg
Definition: gdalwarper.h:49
Definition: gdalwarper.h:51
Definition: gdalwarper.h:58
int(* GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Definition: gdal_alg.h:113
void GDALWarpInitSrcNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfSrcNoDataImag with specified value.
Definition: gdalwarper.cpp:1417
void GDALWarpInitDefaultBandMapping(GDALWarpOptions *, int nBandCount)
Init src and dst band mappings such that Bands[i] = i+1 for nBandCount Does nothing if psOptionsIn->n...
Definition: gdalwarper.cpp:1528
CPLErr GDALChunkAndWarpImage(GDALWarpOperationH, int, int, int, int)
Definition: gdalwarpoperation.cpp:978
Definition: gdalwarper.h:56
CPLErr GDALChunkAndWarpMulti(GDALWarpOperationH, int, int, int, int)
Definition: gdalwarpoperation.cpp:1213
CPLErr
Error category.
Definition: cpl_error.h:51
Definition: gdalwarper.h:72
void GDALWarpInitNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal and padfDstNoDataReal with specified value.
Definition: gdalwarper.cpp:1380
GDALWarpOperationH GDALCreateWarpOperation(const GDALWarpOptions *)
Definition: gdalwarpoperation.cpp:775
Definition: gdalwarper.h:50
Definition: gdalwarper.h:69
void GDALWarpResolveWorkingDataType(GDALWarpOptions *)
If the working data type is unknown, this method will determine a valid working data type to support ...
Definition: gdalwarper.cpp:1437
CPLErr GDALInitializeWarpedVRT(GDALDatasetH hDS, GDALWarpOptions *psWO)
Set warp info on virtual warped dataset.
Definition: vrtwarped.cpp:1173
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:995
GDALWarpOptions * GDALCreateWarpOptions(void)
Create a warp options structure.
Definition: gdalwarper.cpp:1221
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:254
Definition: gdalwarper.h:62
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition: gdal.h:260
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:206
Generated for GDAL by
1.8.16.