GDAL
gdalwarper.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id$
3  *
4  * Project: GDAL High Performance Warper
5  * Purpose: Prototypes, and definitions for warping related work.
6  * Author: Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 2003, Frank Warmerdam
10  * Copyright (c) 2009-2012, Even Rouault <even dot rouault at spatialys.com>
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining a
13  * copy of this software and associated documentation files (the "Software"),
14  * to deal in the Software without restriction, including without limitation
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16  * and/or sell copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be included
20  * in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28  * DEALINGS IN THE SOFTWARE.
29  ****************************************************************************/
30 
31 #ifndef GDALWARPER_H_INCLUDED
32 #define GDALWARPER_H_INCLUDED
33 
42 #include "gdal_alg.h"
43 #include "cpl_minixml.h"
44 #include "cpl_multiproc.h"
45 
47 
48 /* Note: values are selected to be consistent with GDALRIOResampleAlg of
49  * gcore/gdal.h */
51 typedef enum
54  0, GRA_Bilinear = 1, GRA_Cubic = 2, GRA_CubicSpline = 3, GRA_Lanczos = 4,
64  GRA_Mode = 6,
65  /* GRA_Gauss=7 reserved. */ GRA_Max =
67  8, GRA_Min =
69  9, GRA_Med =
71  10,
73  GRA_Q1 = 11,
75  GRA_Q3 = 12,
78  GRA_Sum = 13,
81  GRA_RMS = 14,
83  GRA_LAST_VALUE = GRA_RMS
86 
88 typedef enum
99 
101 typedef int (*GDALMaskFunc)(void *pMaskFuncArg, int nBandCount,
102  GDALDataType eType, int nXOff, int nYOff,
103  int nXSize, int nYSize, GByte **papabyImageData,
104  int bMaskIsFloat, void *pMask);
105 
106 CPLErr CPL_DLL GDALWarpNoDataMasker(void *pMaskFuncArg, int nBandCount,
107  GDALDataType eType, int nXOff, int nYOff,
108  int nXSize, int nYSize,
109  GByte **papabyImageData, int bMaskIsFloat,
110  void *pValidityMask, int *pbOutAllValid);
111 
112 CPLErr CPL_DLL GDALWarpDstAlphaMasker(void *pMaskFuncArg, int nBandCount,
113  GDALDataType eType, int nXOff, int nYOff,
114  int nXSize, int nYSize,
115  GByte ** /*ppImageData */,
116  int bMaskIsFloat, void *pValidityMask);
117 CPLErr CPL_DLL GDALWarpSrcAlphaMasker(void *pMaskFuncArg, int nBandCount,
118  GDALDataType eType, int nXOff, int nYOff,
119  int nXSize, int nYSize,
120  GByte ** /*ppImageData */,
121  int bMaskIsFloat, void *pValidityMask,
122  int *pbOutAllOpaque);
123 
124 CPLErr CPL_DLL GDALWarpSrcMaskMasker(void *pMaskFuncArg, int nBandCount,
125  GDALDataType eType, int nXOff, int nYOff,
126  int nXSize, int nYSize,
127  GByte ** /*ppImageData */,
128  int bMaskIsFloat, void *pValidityMask);
129 
130 CPLErr CPL_DLL GDALWarpCutlineMasker(void *pMaskFuncArg, int nBandCount,
131  GDALDataType eType, int nXOff, int nYOff,
132  int nXSize, int nYSize,
133  GByte ** /* ppImageData */,
134  int bMaskIsFloat, void *pValidityMask);
135 
136 /* GCMVF stands for GDALWARP_CUTLINE_MASKER_VALIDITY_FLAG */
137 #define GCMVF_PARTIAL_INTERSECTION 0
138 #define GCMVF_NO_INTERSECTION 1
139 #define GCMVF_CHUNK_FULLY_WITHIN_CUTLINE 2
140 CPLErr CPL_DLL GDALWarpCutlineMaskerEx(void *pMaskFuncArg, int nBandCount,
141  GDALDataType eType, int nXOff, int nYOff,
142  int nXSize, int nYSize,
143  GByte ** /* ppImageData */,
144  int bMaskIsFloat, void *pValidityMask,
145  int *pnValidityFlag);
148 /************************************************************************/
149 /* GDALWarpOptions */
150 /************************************************************************/
151 
153 typedef struct
154 {
155 
157 
160 
163 
167 
170 
174 
177 
180 
183 
186 
189 
197 
205 
208  GDALProgressFunc pfnProgress;
209 
212 
215 
218 
223 
228 
230  GDALMaskFunc pfnSrcDensityMaskFunc;
233 
235  GDALMaskFunc pfnDstDensityMaskFunc;
238 
243 
245  CPLErr (*pfnPreWarpChunkProcessor)(void *pKern, void *pArg);
248 
250  CPLErr (*pfnPostWarpChunkProcessor)(void *pKern, void *pArg);
253 
255  void *hCutline;
256 
260 
262 
263 GDALWarpOptions CPL_DLL *CPL_STDCALL GDALCreateWarpOptions(void);
264 void CPL_DLL CPL_STDCALL GDALDestroyWarpOptions(GDALWarpOptions *);
265 GDALWarpOptions CPL_DLL *CPL_STDCALL
267 
268 void CPL_DLL CPL_STDCALL GDALWarpInitDstNoDataReal(GDALWarpOptions *,
269  double dNoDataReal);
270 
271 void CPL_DLL CPL_STDCALL GDALWarpInitSrcNoDataReal(GDALWarpOptions *,
272  double dNoDataReal);
273 
274 void CPL_DLL CPL_STDCALL GDALWarpInitNoDataReal(GDALWarpOptions *,
275  double dNoDataReal);
276 
277 void CPL_DLL CPL_STDCALL GDALWarpInitDstNoDataImag(GDALWarpOptions *,
278  double dNoDataImag);
279 
280 void CPL_DLL CPL_STDCALL GDALWarpInitSrcNoDataImag(GDALWarpOptions *,
281  double dNoDataImag);
282 
283 void CPL_DLL CPL_STDCALL GDALWarpResolveWorkingDataType(GDALWarpOptions *);
284 
285 void CPL_DLL CPL_STDCALL GDALWarpInitDefaultBandMapping(GDALWarpOptions *,
286  int nBandCount);
287 
289 CPLXMLNode CPL_DLL *CPL_STDCALL
290 GDALSerializeWarpOptions(const GDALWarpOptions *);
291 GDALWarpOptions CPL_DLL *CPL_STDCALL GDALDeserializeWarpOptions(CPLXMLNode *);
294 /************************************************************************/
295 /* GDALReprojectImage() */
296 /************************************************************************/
297 
298 CPLErr CPL_DLL CPL_STDCALL GDALReprojectImage(
299  GDALDatasetH hSrcDS, const char *pszSrcWKT, GDALDatasetH hDstDS,
300  const char *pszDstWKT, GDALResampleAlg eResampleAlg,
301  double dfWarpMemoryLimit, double dfMaxError, GDALProgressFunc pfnProgress,
302  void *pProgressArg, GDALWarpOptions *psOptions);
303 
304 CPLErr CPL_DLL CPL_STDCALL GDALCreateAndReprojectImage(
305  GDALDatasetH hSrcDS, const char *pszSrcWKT, const char *pszDstFilename,
306  const char *pszDstWKT, GDALDriverH hDstDriver, char **papszCreateOptions,
307  GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit, double dfMaxError,
308  GDALProgressFunc pfnProgress, void *pProgressArg,
309  GDALWarpOptions *psOptions);
310 
311 /************************************************************************/
312 /* VRTWarpedDataset */
313 /************************************************************************/
314 
315 GDALDatasetH CPL_DLL CPL_STDCALL
316 GDALAutoCreateWarpedVRT(GDALDatasetH hSrcDS, const char *pszSrcWKT,
317  const char *pszDstWKT, GDALResampleAlg eResampleAlg,
318  double dfMaxError, const GDALWarpOptions *psOptions);
319 
320 GDALDatasetH CPL_DLL CPL_STDCALL GDALAutoCreateWarpedVRTEx(
321  GDALDatasetH hSrcDS, const char *pszSrcWKT, const char *pszDstWKT,
322  GDALResampleAlg eResampleAlg, double dfMaxError,
323  const GDALWarpOptions *psOptions, CSLConstList papszTransformerOptions);
324 
325 GDALDatasetH CPL_DLL CPL_STDCALL
326 GDALCreateWarpedVRT(GDALDatasetH hSrcDS, int nPixels, int nLines,
327  double *padfGeoTransform, GDALWarpOptions *psOptions);
328 
329 CPLErr CPL_DLL CPL_STDCALL GDALInitializeWarpedVRT(GDALDatasetH hDS,
330  GDALWarpOptions *psWO);
331 
332 CPL_C_END
333 
334 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
335 
336 #include <vector>
337 #include <utility>
338 
339 /************************************************************************/
340 /* GDALWarpKernel */
341 /* */
342 
348 #define WARP_EXTRA_ELTS 1
349 
357 class CPL_DLL GDALWarpKernel
358 {
360 
361  public:
364 
370  int nBands;
371 
385 
395 
406 
408  double dfXScale;
410  double dfYScale;
412  double dfXFilter;
414  double dfYFilter;
416  int nXRadius;
418  int nYRadius;
423 
426  int nSrcXOff;
429  int nSrcYOff;
430 
433  int nDstXOff;
436  int nDstYOff;
437 
442 
444  GDALProgressFunc pfnProgress;
446  void *pProgress;
447 
452 
455 
458  void *psThreadData;
459 
460  bool bApplyVerticalShift = false;
461 
462  double dfMultFactorVerticalShift = 1.0;
465  GDALWarpKernel();
466  virtual ~GDALWarpKernel();
467 
468  CPLErr Validate();
469  CPLErr PerformWarp();
470 };
471 
473 void *GWKThreadsCreate(char **papszWarpOptions,
474  GDALTransformerFunc pfnTransformer,
475  void *pTransformerArg);
476 void GWKThreadsEnd(void *psThreadDataIn);
479 /************************************************************************/
480 /* GDALWarpOperation() */
481 /* */
482 /* This object is application created, or created by a higher */
483 /* level convenience function. It is responsible for */
484 /* subdividing the operation into chunks, loading and saving */
485 /* imagery, and establishing the varios validity and density */
486 /* masks. Actual resampling is done by the GDALWarpKernel. */
487 /************************************************************************/
488 
490 typedef struct _GDALWarpChunk GDALWarpChunk;
493 class CPL_DLL GDALWarpOperation
494 {
495 
497 
498  private:
499  GDALWarpOptions *psOptions;
500 
501  void WipeOptions();
502  int ValidateOptions();
503 
504  CPLErr ComputeSourceWindow(int nDstXOff, int nDstYOff, int nDstXSize,
505  int nDstYSize, int *pnSrcXOff, int *pnSrcYOff,
506  int *pnSrcXSize, int *pnSrcYSize,
507  double *pdfSrcXExtraSize,
508  double *pdfSrcYExtraSize,
509  double *pdfSrcFillRatio);
510 
511  void ComputeSourceWindowStartingFromSource(int nDstXOff, int nDstYOff,
512  int nDstXSize, int nDstYSize,
513  double *padfSrcMinX,
514  double *padfSrcMinY,
515  double *padfSrcMaxX,
516  double *padfSrcMaxY);
517 
518  static CPLErr CreateKernelMask(GDALWarpKernel *, int iBand,
519  const char *pszType);
520 
521  CPLMutex *hIOMutex;
522  CPLMutex *hWarpMutex;
523 
524  int nChunkListCount;
525  int nChunkListMax;
526  GDALWarpChunk *pasChunkList;
527 
528  int bReportTimings;
529  unsigned long nLastTimeReported;
530 
531  void *psThreadData;
532 
533  // Coordinates a few special points in target image space, to determine
534  // if ComputeSourceWindow() must use a grid based sampling.
535  std::vector<std::pair<double, double>> aDstXYSpecialPoints{};
536 
537  bool m_bIsTranslationOnPixelBoundaries = false;
538 
539  void WipeChunkList();
540  CPLErr CollectChunkListInternal(int nDstXOff, int nDstYOff, int nDstXSize,
541  int nDstYSize);
542  void CollectChunkList(int nDstXOff, int nDstYOff, int nDstXSize,
543  int nDstYSize);
544  void ReportTiming(const char *);
545 
546  public:
548  virtual ~GDALWarpOperation();
549 
550  CPLErr Initialize(const GDALWarpOptions *psNewOptions);
551  void *CreateDestinationBuffer(int nDstXSize, int nDstYSize,
552  int *pbWasInitialized = nullptr);
553  static void DestroyDestinationBuffer(void *pDstBuffer);
554 
555  const GDALWarpOptions *GetOptions();
556 
557  CPLErr ChunkAndWarpImage(int nDstXOff, int nDstYOff, int nDstXSize,
558  int nDstYSize);
559  CPLErr ChunkAndWarpMulti(int nDstXOff, int nDstYOff, int nDstXSize,
560  int nDstYSize);
561  CPLErr WarpRegion(int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize,
562  int nSrcXOff = 0, int nSrcYOff = 0, int nSrcXSize = 0,
563  int nSrcYSize = 0, double dfProgressBase = 0.0,
564  double dfProgressScale = 1.0);
565  CPLErr WarpRegion(int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize,
566  int nSrcXOff, int nSrcYOff, int nSrcXSize, int nSrcYSize,
567  double dfSrcXExtraSize, double dfSrcYExtraSize,
568  double dfProgressBase, double dfProgressScale);
569  CPLErr WarpRegionToBuffer(int nDstXOff, int nDstYOff, int nDstXSize,
570  int nDstYSize, void *pDataBuf,
571  GDALDataType eBufDataType, int nSrcXOff = 0,
572  int nSrcYOff = 0, int nSrcXSize = 0,
573  int nSrcYSize = 0, double dfProgressBase = 0.0,
574  double dfProgressScale = 1.0);
575  CPLErr WarpRegionToBuffer(int nDstXOff, int nDstYOff, int nDstXSize,
576  int nDstYSize, void *pDataBuf,
577  GDALDataType eBufDataType, int nSrcXOff,
578  int nSrcYOff, int nSrcXSize, int nSrcYSize,
579  double dfSrcXExtraSize, double dfSrcYExtraSize,
580  double dfProgressBase, double dfProgressScale);
581 };
582 
583 #endif /* def __cplusplus */
584 
586 
588 typedef void *GDALWarpOperationH;
589 
592 CPLErr CPL_DLL GDALChunkAndWarpImage(GDALWarpOperationH, int, int, int, int);
593 CPLErr CPL_DLL GDALChunkAndWarpMulti(GDALWarpOperationH, int, int, int, int);
594 CPLErr CPL_DLL GDALWarpRegion(GDALWarpOperationH, int, int, int, int, int, int,
595  int, int);
596 CPLErr CPL_DLL GDALWarpRegionToBuffer(GDALWarpOperationH, int, int, int, int,
597  void *, GDALDataType, int, int, int, int);
598 
599 /************************************************************************/
600 /* Warping kernel functions */
601 /************************************************************************/
602 
604 int GWKGetFilterRadius(GDALResampleAlg eResampleAlg);
605 
606 typedef double (*FilterFuncType)(double dfX);
607 FilterFuncType GWKGetFilterFunc(GDALResampleAlg eResampleAlg);
608 
609 // TODO(schwehr): Can padfVals be a const pointer?
610 typedef double (*FilterFunc4ValuesType)(double *padfVals);
611 FilterFunc4ValuesType GWKGetFilterFunc4Values(GDALResampleAlg eResampleAlg);
614 CPL_C_END
615 
616 #endif /* ndef GDAL_ALG_H_INCLUDED */
GDALWarpKernel::nSrcYSize
int nSrcYSize
Height of the source image.
Definition: gdalwarper.h:375
GDALWarpKernel::nXRadius
int nXRadius
X size of window to filter.
Definition: gdalwarper.h:416
GDALWarpKernel::pafUnifiedSrcDensity
float * pafUnifiedSrcDensity
Unified source density of size nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS.
Definition: gdalwarper.h:394
GRA_Med
@ GRA_Med
Definition: gdalwarper.h:70
GDALCreateAndReprojectImage
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:235
GDALWarpKernel::dfXFilter
double dfXFilter
X size of filter kernel.
Definition: gdalwarper.h:412
GDALWarpOptions::padfSrcNoDataImag
double * padfSrcNoDataImag
Definition: gdalwarper.h:196
GDALWarpKernel::dfProgressScale
double dfProgressScale
Scale value for progress computation.
Definition: gdalwarper.h:451
GDALWarpOptions::pfnProgress
GDALProgressFunc pfnProgress
Definition: gdalwarper.h:208
GByte
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:196
GDALWarpKernel::nFiltInitX
int nFiltInitX
X filtering offset.
Definition: gdalwarper.h:420
GDALAutoCreateWarpedVRTEx
GDALDatasetH GDALAutoCreateWarpedVRTEx(GDALDatasetH hSrcDS, const char *pszSrcWKT, const char *pszDstWKT, GDALResampleAlg eResampleAlg, double dfMaxError, const GDALWarpOptions *psOptions, CSLConstList papszTransformerOptions)
Create virtual warped dataset automatically.
Definition: vrtwarped.cpp:152
GDALWarpOptions::pTransformerArg
void * pTransformerArg
Definition: gdalwarper.h:217
GDALWarpOptions::pPostWarpProcessorArg
void * pPostWarpProcessorArg
Unused.
Definition: gdalwarper.h:252
GDALWarpKernel::dfYFilter
double dfYFilter
Y size of filter kernel.
Definition: gdalwarper.h:414
GDALWarpOptions::padfDstNoDataImag
double * padfDstNoDataImag
Definition: gdalwarper.h:204
GDALWarpKernel::papabySrcImage
GByte ** papabySrcImage
Array of nBands source images of size nSrcXSize * nSrcYSize.
Definition: gdalwarper.h:384
GDALWarpKernel::eResample
GDALResampleAlg eResample
Resample algorithm.
Definition: gdalwarper.h:366
GDALWarpKernel::papszWarpOptions
char ** papszWarpOptions
Warp options.
Definition: gdalwarper.h:363
GDALWarpOptions::pfnDstDensityMaskFunc
GDALMaskFunc pfnDstDensityMaskFunc
Unused.
Definition: gdalwarper.h:235
GDALWarpKernel::nDstYOff
int nDstYOff
Y offset of the destination buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:436
GDALWarpKernel::dfYScale
double dfYScale
Y resampling scale, i.e.
Definition: gdalwarper.h:410
GRA_CubicSpline
@ GRA_CubicSpline
Definition: gdalwarper.h:57
GDALWarpOptions::pDstDensityMaskFuncArg
void * pDstDensityMaskFuncArg
Unused.
Definition: gdalwarper.h:237
GDALTransformerFunc
int(* GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Definition: gdal_alg.h:95
GDALWarpRegionToBuffer
CPLErr GDALWarpRegionToBuffer(GDALWarpOperationH, int, int, int, int, void *, GDALDataType, int, int, int, int)
Definition: gdalwarpoperation.cpp:2312
GDALWarpInitSrcNoDataReal
void GDALWarpInitSrcNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal with specified value.
Definition: gdalwarper.cpp:1413
GDALWarpOptions::pSrcDensityMaskFuncArg
void * pSrcDensityMaskFuncArg
Unused.
Definition: gdalwarper.h:232
GDALAutoCreateWarpedVRT
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:131
cpl_minixml.h
GWKAOM_Min
@ GWKAOM_Min
Definition: gdalwarper.h:94
GDALDestroyWarpOptions
void GDALDestroyWarpOptions(GDALWarpOptions *)
Destroy a warp options structure.
Definition: gdalwarper.cpp:1284
GRA_Sum
@ GRA_Sum
Definition: gdalwarper.h:78
GDALWarpOptions::nBandCount
int nBandCount
Definition: gdalwarper.h:176
GDALWarpKernel::nSrcYOff
int nSrcYOff
Y offset of the source buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:429
GDALCreateWarpedVRT
GDALDatasetH GDALCreateWarpedVRT(GDALDatasetH hSrcDS, int nPixels, int nLines, double *padfGeoTransform, GDALWarpOptions *psOptions)
Create virtual warped dataset.
Definition: vrtwarped.cpp:362
GDALWarpKernel
This class represents the lowest level of abstraction of warping.
Definition: gdalwarper.h:357
GWKAOM_Average
@ GWKAOM_Average
Definition: gdalwarper.h:90
GWKAverageOrModeAlg
GWKAverageOrModeAlg
Definition: gdalwarper.h:88
GDALDataType
GDALDataType
Definition: gdal.h:63
GRA_Q1
@ GRA_Q1
Definition: gdalwarper.h:73
GDALWarpKernel::nYRadius
int nYRadius
Y size of window to filter.
Definition: gdalwarper.h:418
CPLXMLNode
Document node structure.
Definition: cpl_minixml.h:69
GDALWarpOperation
Definition: gdalwarper.h:493
GDALWarpKernel::dfXScale
double dfXScale
X resampling scale, i.e.
Definition: gdalwarper.h:408
GDALWarpKernel::dfSrcXExtraSize
double dfSrcXExtraSize
Extra pixels (included in nSrcXSize) reserved for filter window.
Definition: gdalwarper.h:378
GDALWarpInitDstNoDataReal
void GDALWarpInitDstNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfDstNoDataReal with specified value.
Definition: gdalwarper.cpp:1394
GDALWarpOptions::papszWarpOptions
char ** papszWarpOptions
Definition: gdalwarper.h:156
GDALWarpKernel::pafDstDensity
float * pafDstDensity
Destination density of size nDstXSize * nDstYSize.
Definition: gdalwarper.h:405
GDALWarpInitDstNoDataImag
void GDALWarpInitDstNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfDstNoDataImag with specified value.
Definition: gdalwarper.cpp:1451
GDALWarpOptions::pfnSrcValidityMaskFunc
GDALMaskFunc pfnSrcValidityMaskFunc
Unused.
Definition: gdalwarper.h:225
GDALWarpOptions::pProgressArg
void * pProgressArg
Definition: gdalwarper.h:211
GRA_Lanczos
@ GRA_Lanczos
Definition: gdalwarper.h:58
GDALWarpKernel::nFiltInitY
int nFiltInitY
Y filtering offset.
Definition: gdalwarper.h:422
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:306
GRA_Average
@ GRA_Average
Definition: gdalwarper.h:61
GDALWarpOptions
Warp control options for use with GDALWarpOperation::Initialize()
Definition: gdalwarper.h:153
GWKAOM_Max
@ GWKAOM_Max
Definition: gdalwarper.h:93
GDALWarpOptions::nSrcAlphaBand
int nSrcAlphaBand
Definition: gdalwarper.h:185
GDALDestroyWarpOperation
void GDALDestroyWarpOperation(GDALWarpOperationH)
Definition: gdalwarpoperation.cpp:824
GDALWarpKernel::pProgress
void * pProgress
User data provided to pfnProgress.
Definition: gdalwarper.h:446
GDALWarpOptions::panSrcBands
int * panSrcBands
Definition: gdalwarper.h:179
GDALWarpKernel::dfSrcYExtraSize
double dfSrcYExtraSize
Extra pixels (included in nSrcYSize) reserved for filter window.
Definition: gdalwarper.h:381
GDALWarpKernel::pfnTransformer
GDALTransformerFunc pfnTransformer
Pixel transformation function.
Definition: gdalwarper.h:439
GDALWarpOptions::hSrcDS
GDALDatasetH hSrcDS
Definition: gdalwarper.h:169
GWKAOM_RMS
@ GWKAOM_RMS
Definition: gdalwarper.h:97
CSLConstList
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1178
GRA_Cubic
@ GRA_Cubic
Definition: gdalwarper.h:56
GWKAOM_Sum
@ GWKAOM_Sum
Definition: gdalwarper.h:96
GDALCloneWarpOptions
GDALWarpOptions * GDALCloneWarpOptions(const GDALWarpOptions *)
Clone a warp options structure.
Definition: gdalwarper.cpp:1330
GDALWarpOptions::papSrcPerBandValidityMaskFuncArg
void ** papSrcPerBandValidityMaskFuncArg
Unused.
Definition: gdalwarper.h:222
GDALReprojectImage
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:98
GDALWarpKernel::pTransformerArg
void * pTransformerArg
User data provided to pfnTransformer.
Definition: gdalwarper.h:441
GRA_Min
@ GRA_Min
Definition: gdalwarper.h:68
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:310
GDALWarpOptions::padfDstNoDataReal
double * padfDstNoDataReal
Definition: gdalwarper.h:200
GDALWarpKernel::nBands
int nBands
Number of input and output bands (excluding alpha bands)
Definition: gdalwarper.h:370
GDALWarpOptions::panDstBands
int * panDstBands
Definition: gdalwarper.h:182
GRA_RMS
@ GRA_RMS
Definition: gdalwarper.h:81
GDALWarpKernel::panUnifiedSrcValid
GUInt32 * panUnifiedSrcValid
Unified validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8.
Definition: gdalwarper.h:391
GDALWarpOperationH
void * GDALWarpOperationH
Opaque type representing a GDALWarpOperation object.
Definition: gdalwarper.h:588
GDALWarpRegion
CPLErr GDALWarpRegion(GDALWarpOperationH, int, int, int, int, int, int, int, int)
Definition: gdalwarpoperation.cpp:1683
GWKAOM_Fmode
@ GWKAOM_Fmode
Definition: gdalwarper.h:91
GDALWarpOptions::papfnSrcPerBandValidityMaskFunc
GDALMaskFunc * papfnSrcPerBandValidityMaskFunc
Unused.
Definition: gdalwarper.h:220
GDALResampleAlg
GDALResampleAlg
Definition: gdalwarper.h:51
GRA_Bilinear
@ GRA_Bilinear
Definition: gdalwarper.h:55
GRA_Max
@ GRA_Max
Definition: gdalwarper.h:66
GDALWarpOptions::hDstDS
GDALDatasetH hDstDS
Definition: gdalwarper.h:173
gdal_alg.h
GDALWarpInitSrcNoDataImag
void GDALWarpInitSrcNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfSrcNoDataImag with specified value.
Definition: gdalwarper.cpp:1470
GDALWarpOptions::pDstValidityMaskFuncArg
void * pDstValidityMaskFuncArg
Unused.
Definition: gdalwarper.h:242
GDALWarpInitDefaultBandMapping
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:1596
GDALWarpKernel::padfDstNoDataReal
double * padfDstNoDataReal
Array of nBands value for destination nodata.
Definition: gdalwarper.h:454
GDALChunkAndWarpImage
CPLErr GDALChunkAndWarpImage(GDALWarpOperationH, int, int, int, int)
Definition: gdalwarpoperation.cpp:998
GDALWarpOptions::pfnSrcDensityMaskFunc
GDALMaskFunc pfnSrcDensityMaskFunc
Unused.
Definition: gdalwarper.h:230
GDALWarpOptions::pPreWarpProcessorArg
void * pPreWarpProcessorArg
Unused.
Definition: gdalwarper.h:247
GDALWarpKernel::papabyDstImage
GByte ** papabyDstImage
Array of nBands destination images of size nDstXSize * nDstYSize.
Definition: gdalwarper.h:401
GDALWarpOptions::dfCutlineBlendDist
double dfCutlineBlendDist
Definition: gdalwarper.h:259
GDALWarpOptions::hCutline
void * hCutline
Definition: gdalwarper.h:255
GDALWarpKernel::eWorkingDataType
GDALDataType eWorkingDataType
Working data type.
Definition: gdalwarper.h:368
GRA_Mode
@ GRA_Mode
Definition: gdalwarper.h:64
GDALWarpOptions::padfSrcNoDataReal
double * padfSrcNoDataReal
Definition: gdalwarper.h:192
GDALWarpOptions::eResampleAlg
GDALResampleAlg eResampleAlg
Definition: gdalwarper.h:162
GDALChunkAndWarpMulti
CPLErr GDALChunkAndWarpMulti(GDALWarpOperationH, int, int, int, int)
Definition: gdalwarpoperation.cpp:1240
CPLErr
CPLErr
Error category.
Definition: cpl_error.h:52
GDALWarpOptions::nDstAlphaBand
int nDstAlphaBand
Definition: gdalwarper.h:188
GDALWarpOptions::pfnTransformer
GDALTransformerFunc pfnTransformer
Definition: gdalwarper.h:214
GDALWarpKernel::nSrcXOff
int nSrcXOff
X offset of the source buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:426
GWKAOM_Quant
@ GWKAOM_Quant
Definition: gdalwarper.h:95
GDALWarpKernel::nDstXOff
int nDstXOff
X offset of the destination buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:433
GDALWarpKernel::nDstYSize
int nDstYSize
Height of the destination image.
Definition: gdalwarper.h:399
GDALWarpInitNoDataReal
void GDALWarpInitNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal and padfDstNoDataReal with specified value.
Definition: gdalwarper.cpp:1433
GDALWarpOptions::pfnDstValidityMaskFunc
GDALMaskFunc pfnDstValidityMaskFunc
Unused.
Definition: gdalwarper.h:240
GDALCreateWarpOperation
GDALWarpOperationH GDALCreateWarpOperation(const GDALWarpOptions *)
Definition: gdalwarpoperation.cpp:804
GRA_NearestNeighbour
@ GRA_NearestNeighbour
Definition: gdalwarper.h:53
GDALWarpKernel::nDstXSize
int nDstXSize
Width of the destination image.
Definition: gdalwarper.h:397
GWKAOM_Imode
@ GWKAOM_Imode
Definition: gdalwarper.h:92
GDALWarpResolveWorkingDataType
void GDALWarpResolveWorkingDataType(GDALWarpOptions *)
If the working data type is unknown, this method will determine a valid working data type to support ...
Definition: gdalwarper.cpp:1490
GDALWarpKernel::panDstValid
GUInt32 * panDstValid
Validify mask of size (nDstXSize * nDstYSize) / 8.
Definition: gdalwarper.h:403
GDALInitializeWarpedVRT
CPLErr GDALInitializeWarpedVRT(GDALDatasetH hDS, GDALWarpOptions *psWO)
Set warp info on virtual warped dataset.
Definition: vrtwarped.cpp:1268
GDALWarpOptions::pSrcValidityMaskFuncArg
void * pSrcValidityMaskFuncArg
Unused.
Definition: gdalwarper.h:227
GDALWarpOptions::dfWarpMemoryLimit
double dfWarpMemoryLimit
Definition: gdalwarper.h:159
GDALWarpKernel::nSrcXSize
int nSrcXSize
Width of the source image.
Definition: gdalwarper.h:373
CPL_DISALLOW_COPY_ASSIGN
#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:1042
GDALWarpKernel::pfnProgress
GDALProgressFunc pfnProgress
Progress function.
Definition: gdalwarper.h:444
GDALCreateWarpOptions
GDALWarpOptions * GDALCreateWarpOptions(void)
Create a warp options structure.
Definition: gdalwarper.cpp:1265
GDALDatasetH
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:291
GDALWarpOptions::eWorkingDataType
GDALDataType eWorkingDataType
Definition: gdalwarper.h:166
GRA_Q3
@ GRA_Q3
Definition: gdalwarper.h:75
GDALWarpKernel::papanBandSrcValid
GUInt32 ** papanBandSrcValid
Array of nBands validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8.
Definition: gdalwarper.h:388
GDALWarpKernel::dfProgressBase
double dfProgressBase
Base/offset value for progress computation.
Definition: gdalwarper.h:449
GDALDriverH
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition: gdal.h:297
GUInt32
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:188