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
46 CPL_C_START
47
48 /* Note: values are selected to be consistent with GDALRIOResampleAlg of gcore/gdal.h */
50 typedef enum { GRA_NearestNeighbour=0, GRA_Bilinear=1, GRA_Cubic=2, GRA_CubicSpline=3, GRA_Lanczos=4, GRA_Average=5, GRA_Mode=6,
58 /* GRA_Gauss=7 reserved. */ GRA_Max=8, GRA_Min=9, GRA_Med=10, GRA_Q1=11, GRA_Q3=12, GRA_Sum=13, GRA_RMS=14,
67 GRA_LAST_VALUE=GRA_RMS
69 } GDALResampleAlg;
70
72 typedef enum { GWKAOM_Average=1, GWKAOM_Fmode=2, GWKAOM_Imode=3, GWKAOM_Max=4, GWKAOM_Min=5, GWKAOM_Quant=6, GWKAOM_Sum=7, GWKAOM_RMS=8
81 } GWKAverageOrModeAlg;
82
84 typedef int
85 (*GDALMaskFunc)( void *pMaskFuncArg,
86 int nBandCount, GDALDataType eType,
87 int nXOff, int nYOff,
88 int nXSize, int nYSize,
89 GByte **papabyImageData,
90 int bMaskIsFloat, void *pMask );
91
92 CPLErr CPL_DLL
93 GDALWarpNoDataMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
94 int nXOff, int nYOff, int nXSize, int nYSize,
95 GByte **papabyImageData, int bMaskIsFloat,
96 void *pValidityMask, int* pbOutAllValid );
97
98 CPLErr CPL_DLL
99 GDALWarpDstAlphaMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
100 int nXOff, int nYOff, int nXSize, int nYSize,
101 GByte ** /*ppImageData */,
102 int bMaskIsFloat, void *pValidityMask );
103 CPLErr CPL_DLL
104 GDALWarpSrcAlphaMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
105 int nXOff, int nYOff, int nXSize, int nYSize,
106 GByte ** /*ppImageData */,
107 int bMaskIsFloat, void *pValidityMask, int* pbOutAllOpaque );
108
109 CPLErr CPL_DLL
110 GDALWarpSrcMaskMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
111 int nXOff, int nYOff, int nXSize, int nYSize,
112 GByte ** /*ppImageData */,
113 int bMaskIsFloat, void *pValidityMask );
114
115 CPLErr CPL_DLL
116 GDALWarpCutlineMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
117 int nXOff, int nYOff, int nXSize, int nYSize,
118 GByte ** /* ppImageData */,
119 int bMaskIsFloat, void *pValidityMask );
122 /************************************************************************/
123 /* GDALWarpOptions */
124 /************************************************************************/
125
127 typedef struct {
128
129 char **papszWarpOptions;
130
132 double dfWarpMemoryLimit;
133
135 GDALResampleAlg eResampleAlg;
136
139 GDALDataType eWorkingDataType;
140
142 GDALDatasetH hSrcDS;
143
145 GDALDatasetH hDstDS;
146
148 int nBandCount;
149
151 int *panSrcBands;
152
154 int *panDstBands;
155
157 int nSrcAlphaBand;
158
160 int nDstAlphaBand;
161
163 double *padfSrcNoDataReal;
167 double *padfSrcNoDataImag;
168
170 double *padfDstNoDataReal;
174 double *padfDstNoDataImag;
175
178 GDALProgressFunc pfnProgress;
179
181 void *pProgressArg;
182
184 GDALTransformerFunc pfnTransformer;
185
187 void *pTransformerArg;
188
190 GDALMaskFunc *papfnSrcPerBandValidityMaskFunc;
192 void **papSrcPerBandValidityMaskFuncArg;
193
195 GDALMaskFunc pfnSrcValidityMaskFunc;
197 void *pSrcValidityMaskFuncArg;
198
200 GDALMaskFunc pfnSrcDensityMaskFunc;
202 void *pSrcDensityMaskFuncArg;
203
205 GDALMaskFunc pfnDstDensityMaskFunc;
207 void *pDstDensityMaskFuncArg;
208
210 GDALMaskFunc pfnDstValidityMaskFunc;
212 void *pDstValidityMaskFuncArg;
213
215 CPLErr (*pfnPreWarpChunkProcessor)( void *pKern, void *pArg );
217 void *pPreWarpProcessorArg;
218
220 CPLErr (*pfnPostWarpChunkProcessor)( void *pKern, void *pArg);
222 void *pPostWarpProcessorArg;
223
225 void *hCutline;
226
228 double dfCutlineBlendDist;
229
230 } GDALWarpOptions;
231
232 GDALWarpOptions CPL_DLL * CPL_STDCALL GDALCreateWarpOptions(void);
233 void CPL_DLL CPL_STDCALL GDALDestroyWarpOptions( GDALWarpOptions * );
234 GDALWarpOptions CPL_DLL * CPL_STDCALL
235 GDALCloneWarpOptions( const GDALWarpOptions * );
236
237 void CPL_DLL CPL_STDCALL
238 GDALWarpInitDstNoDataReal( GDALWarpOptions *, double dNoDataReal );
239
240 void CPL_DLL CPL_STDCALL
241 GDALWarpInitSrcNoDataReal( GDALWarpOptions *, double dNoDataReal );
242
243 void CPL_DLL CPL_STDCALL
244 GDALWarpInitNoDataReal( GDALWarpOptions *, double dNoDataReal );
245
246 void CPL_DLL CPL_STDCALL
247 GDALWarpInitDstNoDataImag( GDALWarpOptions *, double dNoDataImag );
248
249 void CPL_DLL CPL_STDCALL
250 GDALWarpInitSrcNoDataImag( GDALWarpOptions *, double dNoDataImag );
251
252 void CPL_DLL CPL_STDCALL
253 GDALWarpResolveWorkingDataType( GDALWarpOptions * );
254
255 void CPL_DLL CPL_STDCALL
256 GDALWarpInitDefaultBandMapping( GDALWarpOptions *, int nBandCount );
257
259 CPLXMLNode CPL_DLL * CPL_STDCALL
260 GDALSerializeWarpOptions( const GDALWarpOptions * );
261 GDALWarpOptions CPL_DLL * CPL_STDCALL
262 GDALDeserializeWarpOptions( CPLXMLNode * );
265 /************************************************************************/
266 /* GDALReprojectImage() */
267 /************************************************************************/
268
269 CPLErr CPL_DLL CPL_STDCALL
270 GDALReprojectImage( GDALDatasetH hSrcDS, const char *pszSrcWKT,
271 GDALDatasetH hDstDS, const char *pszDstWKT,
272 GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit,
273 double dfMaxError,
274 GDALProgressFunc pfnProgress, void *pProgressArg,
275 GDALWarpOptions *psOptions );
276
277 CPLErr CPL_DLL CPL_STDCALL
278 GDALCreateAndReprojectImage( GDALDatasetH hSrcDS, const char *pszSrcWKT,
279 const char *pszDstFilename, const char *pszDstWKT,
280 GDALDriverH hDstDriver, char **papszCreateOptions,
281 GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit,
282 double dfMaxError,
283 GDALProgressFunc pfnProgress, void *pProgressArg,
284 GDALWarpOptions *psOptions );
285
286 /************************************************************************/
287 /* VRTWarpedDataset */
288 /************************************************************************/
289
290 GDALDatasetH CPL_DLL CPL_STDCALL
291 GDALAutoCreateWarpedVRT( GDALDatasetH hSrcDS,
292 const char *pszSrcWKT, const char *pszDstWKT,
293 GDALResampleAlg eResampleAlg,
294 double dfMaxError, const GDALWarpOptions *psOptions );
295
296 GDALDatasetH CPL_DLL CPL_STDCALL
297 GDALAutoCreateWarpedVRTEx( GDALDatasetH hSrcDS,
298 const char *pszSrcWKT, const char *pszDstWKT,
299 GDALResampleAlg eResampleAlg,
300 double dfMaxError, const GDALWarpOptions *psOptions,
301 CSLConstList papszTransformerOptions );
302
303 GDALDatasetH CPL_DLL CPL_STDCALL
304 GDALCreateWarpedVRT( GDALDatasetH hSrcDS,
305 int nPixels, int nLines, double *padfGeoTransform,
306 GDALWarpOptions *psOptions );
307
308 CPLErr CPL_DLL CPL_STDCALL
309 GDALInitializeWarpedVRT( GDALDatasetH hDS,
310 GDALWarpOptions *psWO );
311
312 CPL_C_END
313
314 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
315
316 /************************************************************************/
317 /* GDALWarpKernel */
318 /* */
319
325 #define WARP_EXTRA_ELTS 1
326
334 class CPL_DLL GDALWarpKernel
335 {
336 CPL_DISALLOW_COPY_ASSIGN(GDALWarpKernel)
337
338 public:
340 char **papszWarpOptions;
341
343 GDALResampleAlg eResample;
345 GDALDataType eWorkingDataType;
347 int nBands;
348
350 int nSrcXSize;
352 int nSrcYSize;
354 double dfSrcXExtraSize;
356 double dfSrcYExtraSize;
358 GByte **papabySrcImage;
359
361 GUInt32 **papanBandSrcValid;
363 GUInt32 *panUnifiedSrcValid;
365 float *pafUnifiedSrcDensity;
366
368 int nDstXSize;
370 int nDstYSize;
372 GByte **papabyDstImage;
374 GUInt32 *panDstValid;
376 float *pafDstDensity;
377
379 double dfXScale;
381 double dfYScale;
383 double dfXFilter;
385 double dfYFilter;
387 int nXRadius;
389 int nYRadius;
391 int nFiltInitX;
393 int nFiltInitY;
394
396 int nSrcXOff;
398 int nSrcYOff;
399
401 int nDstXOff;
403 int nDstYOff;
404
406 GDALTransformerFunc pfnTransformer;
408 void *pTransformerArg;
409
411 GDALProgressFunc pfnProgress;
413 void *pProgress;
414
416 double dfProgressBase;
418 double dfProgressScale;
419
421 double *padfDstNoDataReal;
422
425 void *psThreadData;
428 GDALWarpKernel();
429 virtual ~GDALWarpKernel();
430
431 CPLErr Validate();
432 CPLErr PerformWarp();
433 };
434
436 void* GWKThreadsCreate(char** papszWarpOptions,
437 GDALTransformerFunc pfnTransformer,
438 void* pTransformerArg);
439 void GWKThreadsEnd(void* psThreadDataIn);
442 /************************************************************************/
443 /* GDALWarpOperation() */
444 /* */
445 /* This object is application created, or created by a higher */
446 /* level convenience function. It is responsible for */
447 /* subdividing the operation into chunks, loading and saving */
448 /* imagery, and establishing the varios validity and density */
449 /* masks. Actual resampling is done by the GDALWarpKernel. */
450 /************************************************************************/
451
453 typedef struct _GDALWarpChunk GDALWarpChunk;
456 class CPL_DLL GDALWarpOperation {
457
458 CPL_DISALLOW_COPY_ASSIGN(GDALWarpOperation)
459
460 private:
461 GDALWarpOptions *psOptions;
462
463 void WipeOptions();
464 int ValidateOptions();
465
466 CPLErr ComputeSourceWindow( int nDstXOff, int nDstYOff,
467 int nDstXSize, int nDstYSize,
468 int *pnSrcXOff, int *pnSrcYOff,
469 int *pnSrcXSize, int *pnSrcYSize,
470 double *pdfSrcXExtraSize, double *pdfSrcYExtraSize,
471 double* pdfSrcFillRatio );
472
473 void ComputeSourceWindowStartingFromSource(
474 int nDstXOff, int nDstYOff,
475 int nDstXSize, int nDstYSize,
476 double* padfSrcMinX, double* padfSrcMinY,
477 double* padfSrcMaxX, double* padfSrcMaxY);
478
479 static CPLErr CreateKernelMask( GDALWarpKernel *, int iBand,
480 const char *pszType );
481
482 CPLMutex *hIOMutex;
483 CPLMutex *hWarpMutex;
484
485 int nChunkListCount;
486 int nChunkListMax;
487 GDALWarpChunk *pasChunkList;
488
489 int bReportTimings;
490 unsigned long nLastTimeReported;
491
492 void *psThreadData;
493
494 void WipeChunkList();
495 CPLErr CollectChunkListInternal( int nDstXOff, int nDstYOff,
496 int nDstXSize, int nDstYSize );
497 void CollectChunkList( int nDstXOff, int nDstYOff,
498 int nDstXSize, int nDstYSize );
499 void ReportTiming( const char * );
500
501 public:
502 GDALWarpOperation();
503 virtual ~GDALWarpOperation();
504
505 CPLErr Initialize( const GDALWarpOptions *psNewOptions );
506 void* CreateDestinationBuffer( int nDstXSize, int nDstYSize,
507 int *pbWasInitialized = nullptr );
508 static void DestroyDestinationBuffer(void* pDstBuffer);
509
510 const GDALWarpOptions *GetOptions();
511
512 CPLErr ChunkAndWarpImage( int nDstXOff, int nDstYOff,
513 int nDstXSize, int nDstYSize );
514 CPLErr ChunkAndWarpMulti( int nDstXOff, int nDstYOff,
515 int nDstXSize, int nDstYSize );
516 CPLErr WarpRegion( int nDstXOff, int nDstYOff,
517 int nDstXSize, int nDstYSize,
518 int nSrcXOff=0, int nSrcYOff=0,
519 int nSrcXSize=0, int nSrcYSize=0,
520 double dfProgressBase=0.0, double dfProgressScale=1.0);
521 CPLErr WarpRegion( int nDstXOff, int nDstYOff,
522 int nDstXSize, int nDstYSize,
523 int nSrcXOff, int nSrcYOff,
524 int nSrcXSize, int nSrcYSize,
525 double dfSrcXExtraSize, double dfSrcYExtraSize,
526 double dfProgressBase, double dfProgressScale);
527 CPLErr WarpRegionToBuffer( int nDstXOff, int nDstYOff,
528 int nDstXSize, int nDstYSize,
529 void *pDataBuf,
530 GDALDataType eBufDataType,
531 int nSrcXOff=0, int nSrcYOff=0,
532 int nSrcXSize=0, int nSrcYSize=0,
533 double dfProgressBase=0.0, double dfProgressScale=1.0);
534 CPLErr WarpRegionToBuffer( int nDstXOff, int nDstYOff,
535 int nDstXSize, int nDstYSize,
536 void *pDataBuf,
537 GDALDataType eBufDataType,
538 int nSrcXOff, int nSrcYOff,
539 int nSrcXSize, int nSrcYSize,
540 double dfSrcXExtraSize, double dfSrcYExtraSize,
541 double dfProgressBase, double dfProgressScale);
542 };
543
544 #endif /* def __cplusplus */
545
546 CPL_C_START
547
549 typedef void * GDALWarpOperationH;
550
551 GDALWarpOperationH CPL_DLL GDALCreateWarpOperation(const GDALWarpOptions* );
552 void CPL_DLL GDALDestroyWarpOperation( GDALWarpOperationH );
553 CPLErr CPL_DLL GDALChunkAndWarpImage( GDALWarpOperationH, int, int, int, int );
554 CPLErr CPL_DLL GDALChunkAndWarpMulti( GDALWarpOperationH, int, int, int, int );
555 CPLErr CPL_DLL GDALWarpRegion( GDALWarpOperationH,
556 int, int, int, int, int, int, int, int );
557 CPLErr CPL_DLL GDALWarpRegionToBuffer( GDALWarpOperationH, int, int, int, int,
558 void *, GDALDataType,
559 int, int, int, int );
560
561 /************************************************************************/
562 /* Warping kernel functions */
563 /************************************************************************/
564
566 int GWKGetFilterRadius(GDALResampleAlg eResampleAlg);
567
568 typedef double (*FilterFuncType)(double dfX);
569 FilterFuncType GWKGetFilterFunc(GDALResampleAlg eResampleAlg);
570
571 // TODO(schwehr): Can padfVals be a const pointer?
572 typedef double (*FilterFunc4ValuesType)(double* padfVals);
573 FilterFunc4ValuesType GWKGetFilterFunc4Values(GDALResampleAlg eResampleAlg);
576 CPL_C_END
577
578 #endif /* ndef GDAL_ALG_H_INCLUDED */
GDALWarpKernel
This class represents the lowest level of abstraction of warping.
Definition: gdalwarper.h:335
GDALWarpKernel::nXRadius
int nXRadius
X size of window to filter.
Definition: gdalwarper.h:387
GDALWarpKernel::nSrcYSize
int nSrcYSize
Height of the source image.
Definition: gdalwarper.h:352
GDALWarpKernel::papszWarpOptions
char ** papszWarpOptions
Warp options.
Definition: gdalwarper.h:340
GDALWarpKernel::nFiltInitX
int nFiltInitX
X filtering offset.
Definition: gdalwarper.h:391
GDALWarpKernel::dfXScale
double dfXScale
X resampling scale, i.e.
Definition: gdalwarper.h:379
GDALWarpKernel::dfYFilter
double dfYFilter
Y size of filter kernel.
Definition: gdalwarper.h:385
GDALWarpKernel::nDstXSize
int nDstXSize
Width of the destination image.
Definition: gdalwarper.h:368
GDALWarpKernel::dfSrcXExtraSize
double dfSrcXExtraSize
Extra pixels (included in nSrcXSize) reserved for filter window.
Definition: gdalwarper.h:354
GDALWarpKernel::padfDstNoDataReal
double * padfDstNoDataReal
Array of nBands value for destination nodata.
Definition: gdalwarper.h:421
GDALWarpKernel::nDstXOff
int nDstXOff
X offset of the destination buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:401
GDALWarpKernel::eResample
GDALResampleAlg eResample
Resample algorithm.
Definition: gdalwarper.h:343
GDALWarpKernel::pfnTransformer
GDALTransformerFunc pfnTransformer
Pixel transformation function.
Definition: gdalwarper.h:406
GDALWarpKernel::panUnifiedSrcValid
GUInt32 * panUnifiedSrcValid
Unified validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8.
Definition: gdalwarper.h:363
GDALWarpKernel::nDstYSize
int nDstYSize
Height of the destination image.
Definition: gdalwarper.h:370
GDALWarpKernel::nBands
int nBands
Number of input and output bands (excluding alpha bands)
Definition: gdalwarper.h:347
GDALWarpKernel::dfProgressBase
double dfProgressBase
Base/offset value for progress computation.
Definition: gdalwarper.h:416
GDALWarpKernel::eWorkingDataType
GDALDataType eWorkingDataType
Working data type.
Definition: gdalwarper.h:345
GDALWarpKernel::dfSrcYExtraSize
double dfSrcYExtraSize
Extra pixels (included in nSrcYSize) reserved for filter window.
Definition: gdalwarper.h:356
GDALWarpKernel::nSrcXOff
int nSrcXOff
X offset of the source buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:396
GDALWarpKernel::nSrcYOff
int nSrcYOff
Y offset of the source buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:398
GDALWarpKernel::nDstYOff
int nDstYOff
Y offset of the destination buffer regarding the top-left corner of the image.
Definition: gdalwarper.h:403
GDALWarpKernel::nFiltInitY
int nFiltInitY
Y filtering offset.
Definition: gdalwarper.h:393
GDALWarpKernel::pfnProgress
GDALProgressFunc pfnProgress
Progress function.
Definition: gdalwarper.h:411
GDALWarpKernel::papanBandSrcValid
GUInt32 ** papanBandSrcValid
Array of nBands validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8.
Definition: gdalwarper.h:361
GDALWarpKernel::pProgress
void * pProgress
User data provided to pfnProgress.
Definition: gdalwarper.h:413
GDALWarpKernel::pafUnifiedSrcDensity
float * pafUnifiedSrcDensity
Unified source density of size nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS.
Definition: gdalwarper.h:365
GDALWarpKernel::nYRadius
int nYRadius
Y size of window to filter.
Definition: gdalwarper.h:389
GDALWarpKernel::pafDstDensity
float * pafDstDensity
Destination density of size nDstXSize * nDstYSize.
Definition: gdalwarper.h:376
GDALWarpKernel::dfXFilter
double dfXFilter
X size of filter kernel.
Definition: gdalwarper.h:383
GDALWarpKernel::dfYScale
double dfYScale
Y resampling scale, i.e.
Definition: gdalwarper.h:381
GDALWarpKernel::papabyDstImage
GByte ** papabyDstImage
Array of nBands destination images of size nDstXSize * nDstYSize.
Definition: gdalwarper.h:372
GDALWarpKernel::dfProgressScale
double dfProgressScale
Scale value for progress computation.
Definition: gdalwarper.h:418
GDALWarpKernel::nSrcXSize
int nSrcXSize
Width of the source image.
Definition: gdalwarper.h:350
GDALWarpKernel::pTransformerArg
void * pTransformerArg
User data provided to pfnTransformer.
Definition: gdalwarper.h:408
GDALWarpKernel::papabySrcImage
GByte ** papabySrcImage
Array of nBands source images of size nSrcXSize * nSrcYSize.
Definition: gdalwarper.h:358
GDALWarpKernel::panDstValid
GUInt32 * panDstValid
Validify mask of size (nDstXSize * nDstYSize) / 8.
Definition: gdalwarper.h:374
GDALWarpOperation
High level image warping class.
Definition: gdalwarper.h:456
CPLErr
CPLErr
Error category.
Definition: cpl_error.h:53
cpl_minixml.h
Definitions for CPL mini XML Parser/Serializer.
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:339
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:337
GUInt32
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:207
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:1007
CSLConstList
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1216
GByte
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:215
GDALDataType
GDALDataType
Definition: gdal.h:62
GDALDatasetH
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:268
GDALDriverH
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition: gdal.h:274
gdal_alg.h
Public (C callable) GDAL algorithm entry points, and definitions.
GDALTransformerFunc
int(* GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Definition: gdal_alg.h:114
GDALWarpRegion
CPLErr GDALWarpRegion(GDALWarpOperationH, int, int, int, int, int, int, int, int)
Definition: gdalwarpoperation.cpp:1662
GDALDestroyWarpOperation
void GDALDestroyWarpOperation(GDALWarpOperationH)
Definition: gdalwarpoperation.cpp:800
GDALCreateWarpOperation
GDALWarpOperationH GDALCreateWarpOperation(const GDALWarpOptions *)
Definition: gdalwarpoperation.cpp:779
GWKAverageOrModeAlg
GWKAverageOrModeAlg
Definition: gdalwarper.h:72
GWKAOM_Fmode
@ GWKAOM_Fmode
Definition: gdalwarper.h:74
GWKAOM_Min
@ GWKAOM_Min
Definition: gdalwarper.h:77
GWKAOM_RMS
@ GWKAOM_RMS
Definition: gdalwarper.h:80
GWKAOM_Quant
@ GWKAOM_Quant
Definition: gdalwarper.h:78
GWKAOM_Sum
@ GWKAOM_Sum
Definition: gdalwarper.h:79
GWKAOM_Imode
@ GWKAOM_Imode
Definition: gdalwarper.h:75
GWKAOM_Average
@ GWKAOM_Average
Definition: gdalwarper.h:73
GWKAOM_Max
@ GWKAOM_Max
Definition: gdalwarper.h:76
GDALWarpInitDstNoDataImag
void GDALWarpInitDstNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfDstNoDataImag with specified value.
Definition: gdalwarper.cpp:1400
GDALResampleAlg
GDALResampleAlg
Definition: gdalwarper.h:50
GRA_CubicSpline
@ GRA_CubicSpline
Definition: gdalwarper.h:54
GRA_Q1
@ GRA_Q1
Definition: gdalwarper.h:62
GRA_Sum
@ GRA_Sum
Definition: gdalwarper.h:64
GRA_Max
@ GRA_Max
Definition: gdalwarper.h:59
GRA_Cubic
@ GRA_Cubic
Definition: gdalwarper.h:53
GRA_Min
@ GRA_Min
Definition: gdalwarper.h:60
GRA_RMS
@ GRA_RMS
Definition: gdalwarper.h:65
GRA_Lanczos
@ GRA_Lanczos
Definition: gdalwarper.h:55
GRA_Mode
@ GRA_Mode
Definition: gdalwarper.h:57
GRA_NearestNeighbour
@ GRA_NearestNeighbour
Definition: gdalwarper.h:51
GRA_Q3
@ GRA_Q3
Definition: gdalwarper.h:63
GRA_Med
@ GRA_Med
Definition: gdalwarper.h:61
GRA_Average
@ GRA_Average
Definition: gdalwarper.h:56
GRA_Bilinear
@ GRA_Bilinear
Definition: gdalwarper.h:52
GDALCreateWarpedVRT
GDALDatasetH GDALCreateWarpedVRT(GDALDatasetH hSrcDS, int nPixels, int nLines, double *padfGeoTransform, GDALWarpOptions *psOptions)
Create virtual warped dataset.
Definition: vrtwarped.cpp:307
GDALDestroyWarpOptions
void GDALDestroyWarpOptions(GDALWarpOptions *)
Destroy a warp options structure.
Definition: gdalwarper.cpp:1241
GDALWarpOperationH
void * GDALWarpOperationH
Opaque type representing a GDALWarpOperation object.
Definition: gdalwarper.h:549
GDALWarpRegionToBuffer
CPLErr GDALWarpRegionToBuffer(GDALWarpOperationH, int, int, int, int, void *, GDALDataType, int, int, int, int)
Definition: gdalwarpoperation.cpp:2285
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:240
GDALCloneWarpOptions
GDALWarpOptions * GDALCloneWarpOptions(const GDALWarpOptions *)
Clone a warp options structure.
Definition: gdalwarper.cpp:1282
GDALChunkAndWarpImage
CPLErr GDALChunkAndWarpImage(GDALWarpOperationH, int, int, int, int)
Definition: gdalwarpoperation.cpp:982
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:130
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:1530
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:104
GDALWarpInitSrcNoDataImag
void GDALWarpInitSrcNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfSrcNoDataImag with specified value.
Definition: gdalwarper.cpp:1419
GDALInitializeWarpedVRT
CPLErr GDALInitializeWarpedVRT(GDALDatasetH hDS, GDALWarpOptions *psWO)
Set warp info on virtual warped dataset.
Definition: vrtwarped.cpp:1212
GDALWarpInitSrcNoDataReal
void GDALWarpInitSrcNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal with specified value.
Definition: gdalwarper.cpp:1362
GDALWarpInitDstNoDataReal
void GDALWarpInitDstNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfDstNoDataReal with specified value.
Definition: gdalwarper.cpp:1342
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:97
GDALChunkAndWarpMulti
CPLErr GDALChunkAndWarpMulti(GDALWarpOperationH, int, int, int, int)
Definition: gdalwarpoperation.cpp:1217
GDALCreateWarpOptions
GDALWarpOptions * GDALCreateWarpOptions(void)
Create a warp options structure.
Definition: gdalwarper.cpp:1222
GDALWarpInitNoDataReal
void GDALWarpInitNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal and padfDstNoDataReal with specified value.
Definition: gdalwarper.cpp:1382
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:1439
CPLXMLNode
Document node structure.
Definition: cpl_minixml.h:70
GDALWarpOptions
Warp control options for use with GDALWarpOperation::Initialize()
Definition: gdalwarper.h:127
GDALWarpOptions::nSrcAlphaBand
int nSrcAlphaBand
Definition: gdalwarper.h:157
GDALWarpOptions::hDstDS
GDALDatasetH hDstDS
Definition: gdalwarper.h:145
GDALWarpOptions::papszWarpOptions
char ** papszWarpOptions
A string list of additional options controlling the warp operation in name=value format.
Definition: gdalwarper.h:129
GDALWarpOptions::padfDstNoDataImag
double * padfDstNoDataImag
Definition: gdalwarper.h:174
GDALWarpOptions::pfnDstValidityMaskFunc
GDALMaskFunc pfnDstValidityMaskFunc
Unused.
Definition: gdalwarper.h:210
GDALWarpOptions::padfSrcNoDataReal
double * padfSrcNoDataReal
Definition: gdalwarper.h:163
GDALWarpOptions::pTransformerArg
void * pTransformerArg
Definition: gdalwarper.h:187
GDALWarpOptions::eWorkingDataType
GDALDataType eWorkingDataType
Definition: gdalwarper.h:139
GDALWarpOptions::pSrcValidityMaskFuncArg
void * pSrcValidityMaskFuncArg
Unused.
Definition: gdalwarper.h:197
GDALWarpOptions::pDstDensityMaskFuncArg
void * pDstDensityMaskFuncArg
Unused.
Definition: gdalwarper.h:207
GDALWarpOptions::panDstBands
int * panDstBands
Definition: gdalwarper.h:154
GDALWarpOptions::dfCutlineBlendDist
double dfCutlineBlendDist
Definition: gdalwarper.h:228
GDALWarpOptions::pfnProgress
GDALProgressFunc pfnProgress
Definition: gdalwarper.h:178
GDALWarpOptions::pfnSrcDensityMaskFunc
GDALMaskFunc pfnSrcDensityMaskFunc
Unused.
Definition: gdalwarper.h:200
GDALWarpOptions::hSrcDS
GDALDatasetH hSrcDS
Definition: gdalwarper.h:142
GDALWarpOptions::pfnDstDensityMaskFunc
GDALMaskFunc pfnDstDensityMaskFunc
Unused.
Definition: gdalwarper.h:205
GDALWarpOptions::pPreWarpProcessorArg
void * pPreWarpProcessorArg
Unused.
Definition: gdalwarper.h:217
GDALWarpOptions::pProgressArg
void * pProgressArg
Definition: gdalwarper.h:181
GDALWarpOptions::nDstAlphaBand
int nDstAlphaBand
Definition: gdalwarper.h:160
GDALWarpOptions::panSrcBands
int * panSrcBands
Definition: gdalwarper.h:151
GDALWarpOptions::pfnTransformer
GDALTransformerFunc pfnTransformer
Definition: gdalwarper.h:184
GDALWarpOptions::nBandCount
int nBandCount
Definition: gdalwarper.h:148
GDALWarpOptions::dfWarpMemoryLimit
double dfWarpMemoryLimit
Definition: gdalwarper.h:132
GDALWarpOptions::pSrcDensityMaskFuncArg
void * pSrcDensityMaskFuncArg
Unused.
Definition: gdalwarper.h:202
GDALWarpOptions::papfnSrcPerBandValidityMaskFunc
GDALMaskFunc * papfnSrcPerBandValidityMaskFunc
Unused.
Definition: gdalwarper.h:190
GDALWarpOptions::eResampleAlg
GDALResampleAlg eResampleAlg
Definition: gdalwarper.h:135
GDALWarpOptions::pfnSrcValidityMaskFunc
GDALMaskFunc pfnSrcValidityMaskFunc
Unused.
Definition: gdalwarper.h:195
GDALWarpOptions::hCutline
void * hCutline
Definition: gdalwarper.h:225
GDALWarpOptions::pDstValidityMaskFuncArg
void * pDstValidityMaskFuncArg
Unused.
Definition: gdalwarper.h:212
GDALWarpOptions::papSrcPerBandValidityMaskFuncArg
void ** papSrcPerBandValidityMaskFuncArg
Unused.
Definition: gdalwarper.h:192
GDALWarpOptions::padfDstNoDataReal
double * padfDstNoDataReal
Definition: gdalwarper.h:170
GDALWarpOptions::padfSrcNoDataImag
double * padfSrcNoDataImag
Definition: gdalwarper.h:167
GDALWarpOptions::pPostWarpProcessorArg
void * pPostWarpProcessorArg
Unused.
Definition: gdalwarper.h:222