GDAL
gdalwarper.h
Go to the documentation of this file.
1/******************************************************************************
2 * $Id: gdalwarper.h db9ea60631eda5ef881ae75dc3355f42734fb38c 2022-02-22 16:16:41 +0100 Even Rouault $
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
41
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 gcore/gdal.h */
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
70
82
84typedef 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
92CPLErr CPL_DLL
93GDALWarpNoDataMasker( 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
98CPLErr CPL_DLL
99GDALWarpDstAlphaMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
100 int nXOff, int nYOff, int nXSize, int nYSize,
101 GByte ** /*ppImageData */,
102 int bMaskIsFloat, void *pValidityMask );
103CPLErr CPL_DLL
104GDALWarpSrcAlphaMasker( 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
109CPLErr CPL_DLL
110GDALWarpSrcMaskMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
111 int nXOff, int nYOff, int nXSize, int nYSize,
112 GByte ** /*ppImageData */,
113 int bMaskIsFloat, void *pValidityMask );
114
115CPLErr CPL_DLL
116GDALWarpCutlineMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
117 int nXOff, int nYOff, int nXSize, int nYSize,
118 GByte ** /* ppImageData */,
119 int bMaskIsFloat, void *pValidityMask );
121
122/************************************************************************/
123/* GDALWarpOptions */
124/************************************************************************/
125
231
232GDALWarpOptions CPL_DLL * CPL_STDCALL GDALCreateWarpOptions(void);
233void CPL_DLL CPL_STDCALL GDALDestroyWarpOptions( GDALWarpOptions * );
234GDALWarpOptions CPL_DLL * CPL_STDCALL
236
237void CPL_DLL CPL_STDCALL
238GDALWarpInitDstNoDataReal( GDALWarpOptions *, double dNoDataReal );
239
240void CPL_DLL CPL_STDCALL
241GDALWarpInitSrcNoDataReal( GDALWarpOptions *, double dNoDataReal );
242
243void CPL_DLL CPL_STDCALL
244GDALWarpInitNoDataReal( GDALWarpOptions *, double dNoDataReal );
245
246void CPL_DLL CPL_STDCALL
247GDALWarpInitDstNoDataImag( GDALWarpOptions *, double dNoDataImag );
248
249void CPL_DLL CPL_STDCALL
250GDALWarpInitSrcNoDataImag( GDALWarpOptions *, double dNoDataImag );
251
252void CPL_DLL CPL_STDCALL
254
255void CPL_DLL CPL_STDCALL
257
259CPLXMLNode CPL_DLL * CPL_STDCALL
260 GDALSerializeWarpOptions( const GDALWarpOptions * );
261GDALWarpOptions CPL_DLL * CPL_STDCALL
262 GDALDeserializeWarpOptions( CPLXMLNode * );
264
265/************************************************************************/
266/* GDALReprojectImage() */
267/************************************************************************/
268
269CPLErr CPL_DLL CPL_STDCALL
270GDALReprojectImage( 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
277CPLErr CPL_DLL CPL_STDCALL
278GDALCreateAndReprojectImage( 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
290GDALDatasetH CPL_DLL CPL_STDCALL
292 const char *pszSrcWKT, const char *pszDstWKT,
293 GDALResampleAlg eResampleAlg,
294 double dfMaxError, const GDALWarpOptions *psOptions );
295
296GDALDatasetH CPL_DLL CPL_STDCALL
298 const char *pszSrcWKT, const char *pszDstWKT,
299 GDALResampleAlg eResampleAlg,
300 double dfMaxError, const GDALWarpOptions *psOptions,
301 CSLConstList papszTransformerOptions );
302
303GDALDatasetH CPL_DLL CPL_STDCALL
305 int nPixels, int nLines, double *padfGeoTransform,
306 GDALWarpOptions *psOptions );
307
308CPLErr CPL_DLL CPL_STDCALL
310 GDALWarpOptions *psWO );
311
313
314#if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
315
316#include <vector>
317#include <utility>
318
319/************************************************************************/
320/* GDALWarpKernel */
321/* */
322
328#define WARP_EXTRA_ELTS 1
329
337class CPL_DLL GDALWarpKernel
338{
339 CPL_DISALLOW_COPY_ASSIGN(GDALWarpKernel)
340
341public:
344
351
362
369
380
382 double dfXScale;
384 double dfYScale;
386 double dfXFilter;
388 double dfYFilter;
397
402
407
412
414 GDALProgressFunc pfnProgress;
417
422
425
428 void *psThreadData;
429
430 bool bApplyVerticalShift = false;
431
432 double dfMultFactorVerticalShit = 1.0;
434
435 GDALWarpKernel();
436 virtual ~GDALWarpKernel();
437
440};
441
443void* GWKThreadsCreate(char** papszWarpOptions,
444 GDALTransformerFunc pfnTransformer,
445 void* pTransformerArg);
446void GWKThreadsEnd(void* psThreadDataIn);
448
449/************************************************************************/
450/* GDALWarpOperation() */
451/* */
452/* This object is application created, or created by a higher */
453/* level convenience function. It is responsible for */
454/* subdividing the operation into chunks, loading and saving */
455/* imagery, and establishing the varios validity and density */
456/* masks. Actual resampling is done by the GDALWarpKernel. */
457/************************************************************************/
458
460typedef struct _GDALWarpChunk GDALWarpChunk;
462
463class CPL_DLL GDALWarpOperation {
464
465 CPL_DISALLOW_COPY_ASSIGN(GDALWarpOperation)
466
467private:
468 GDALWarpOptions *psOptions;
469
470 void WipeOptions();
471 int ValidateOptions();
472
473 CPLErr ComputeSourceWindow( int nDstXOff, int nDstYOff,
474 int nDstXSize, int nDstYSize,
475 int *pnSrcXOff, int *pnSrcYOff,
476 int *pnSrcXSize, int *pnSrcYSize,
477 double *pdfSrcXExtraSize, double *pdfSrcYExtraSize,
478 double* pdfSrcFillRatio );
479
480 void ComputeSourceWindowStartingFromSource(
481 int nDstXOff, int nDstYOff,
482 int nDstXSize, int nDstYSize,
483 double* padfSrcMinX, double* padfSrcMinY,
484 double* padfSrcMaxX, double* padfSrcMaxY);
485
486 static CPLErr CreateKernelMask( GDALWarpKernel *, int iBand,
487 const char *pszType );
488
489 CPLMutex *hIOMutex;
490 CPLMutex *hWarpMutex;
491
492 int nChunkListCount;
493 int nChunkListMax;
494 GDALWarpChunk *pasChunkList;
495
496 int bReportTimings;
497 unsigned long nLastTimeReported;
498
499 void *psThreadData;
500
501 // Coordinates a few special points in target image space, to determine
502 // if ComputeSourceWindow() must use a grid based sampling.
503 std::vector<std::pair<double, double>> aDstXYSpecialPoints{};
504
505 bool m_bIsTranslationOnPixelBoundaries = false;
506
507 void WipeChunkList();
508 CPLErr CollectChunkListInternal( int nDstXOff, int nDstYOff,
509 int nDstXSize, int nDstYSize );
510 void CollectChunkList( int nDstXOff, int nDstYOff,
511 int nDstXSize, int nDstYSize );
512 void ReportTiming( const char * );
513
514public:
515 GDALWarpOperation();
516 virtual ~GDALWarpOperation();
517
518 CPLErr Initialize( const GDALWarpOptions *psNewOptions );
519 void* CreateDestinationBuffer( int nDstXSize, int nDstYSize,
520 int *pbWasInitialized = nullptr );
521 static void DestroyDestinationBuffer(void* pDstBuffer);
522
524
525 CPLErr ChunkAndWarpImage( int nDstXOff, int nDstYOff,
526 int nDstXSize, int nDstYSize );
527 CPLErr ChunkAndWarpMulti( int nDstXOff, int nDstYOff,
528 int nDstXSize, int nDstYSize );
529 CPLErr WarpRegion( int nDstXOff, int nDstYOff,
530 int nDstXSize, int nDstYSize,
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 WarpRegion( int nDstXOff, int nDstYOff,
535 int nDstXSize, int nDstYSize,
536 int nSrcXOff, int nSrcYOff,
537 int nSrcXSize, int nSrcYSize,
538 double dfSrcXExtraSize, double dfSrcYExtraSize,
539 double dfProgressBase, double dfProgressScale);
540 CPLErr WarpRegionToBuffer( int nDstXOff, int nDstYOff,
541 int nDstXSize, int nDstYSize,
542 void *pDataBuf,
543 GDALDataType eBufDataType,
544 int nSrcXOff=0, int nSrcYOff=0,
545 int nSrcXSize=0, int nSrcYSize=0,
546 double dfProgressBase=0.0, double dfProgressScale=1.0);
547 CPLErr WarpRegionToBuffer( int nDstXOff, int nDstYOff,
548 int nDstXSize, int nDstYSize,
549 void *pDataBuf,
550 GDALDataType eBufDataType,
551 int nSrcXOff, int nSrcYOff,
552 int nSrcXSize, int nSrcYSize,
553 double dfSrcXExtraSize, double dfSrcYExtraSize,
554 double dfProgressBase, double dfProgressScale);
555};
556
557#endif /* def __cplusplus */
558
560
562typedef void * GDALWarpOperationH;
563
566CPLErr CPL_DLL GDALChunkAndWarpImage( GDALWarpOperationH, int, int, int, int );
567CPLErr CPL_DLL GDALChunkAndWarpMulti( GDALWarpOperationH, int, int, int, int );
569 int, int, int, int, int, int, int, int );
570CPLErr CPL_DLL GDALWarpRegionToBuffer( GDALWarpOperationH, int, int, int, int,
571 void *, GDALDataType,
572 int, int, int, int );
573
574/************************************************************************/
575/* Warping kernel functions */
576/************************************************************************/
577
579int GWKGetFilterRadius(GDALResampleAlg eResampleAlg);
580
581typedef double (*FilterFuncType)(double dfX);
582FilterFuncType GWKGetFilterFunc(GDALResampleAlg eResampleAlg);
583
584// TODO(schwehr): Can padfVals be a const pointer?
585typedef double (*FilterFunc4ValuesType)(double* padfVals);
586FilterFunc4ValuesType GWKGetFilterFunc4Values(GDALResampleAlg eResampleAlg);
588
590
591#endif /* ndef GDAL_ALG_H_INCLUDED */
This class represents the lowest level of abstraction of warping.
Definition gdalwarper.h:338
int nXRadius
X size of window to filter.
Definition gdalwarper.h:390
int nSrcYSize
Height of the source image.
Definition gdalwarper.h:355
char ** papszWarpOptions
Warp options.
Definition gdalwarper.h:343
GByte ** papabySrcImage
Array of nBands source images of size nSrcXSize * nSrcYSize.
Definition gdalwarper.h:361
int nFiltInitX
X filtering offset.
Definition gdalwarper.h:394
double dfXScale
X resampling scale, i.e.
Definition gdalwarper.h:382
void * pTransformerArg
User data provided to pfnTransformer.
Definition gdalwarper.h:411
double dfYFilter
Y size of filter kernel.
Definition gdalwarper.h:388
int nDstXSize
Width of the destination image.
Definition gdalwarper.h:371
double dfSrcXExtraSize
Extra pixels (included in nSrcXSize) reserved for filter window.
Definition gdalwarper.h:357
double * padfDstNoDataReal
Array of nBands value for destination nodata.
Definition gdalwarper.h:424
int nDstXOff
X offset of the destination buffer regarding the top-left corner of the image.
Definition gdalwarper.h:404
GDALResampleAlg eResample
Resample algorithm.
Definition gdalwarper.h:346
GDALTransformerFunc pfnTransformer
Pixel transformation function.
Definition gdalwarper.h:409
int nDstYSize
Height of the destination image.
Definition gdalwarper.h:373
int nBands
Number of input and output bands (excluding alpha bands)
Definition gdalwarper.h:350
double dfProgressBase
Base/offset value for progress computation.
Definition gdalwarper.h:419
CPLErr PerformWarp()
This method performs the warp described in the GDALWarpKernel.
Definition gdalwarpkernel.cpp:998
GDALDataType eWorkingDataType
Working data type.
Definition gdalwarper.h:348
double dfSrcYExtraSize
Extra pixels (included in nSrcYSize) reserved for filter window.
Definition gdalwarper.h:359
int nSrcXOff
X offset of the source buffer regarding the top-left corner of the image.
Definition gdalwarper.h:399
float * pafDstDensity
Destination density of size nDstXSize * nDstYSize.
Definition gdalwarper.h:379
CPLErr Validate()
Check the settings in the GDALWarpKernel, and issue a CPLError() (and return CE_Failure) if the confi...
Definition gdalwarpkernel.cpp:1361
void * pProgress
User data provided to pfnProgress.
Definition gdalwarper.h:416
GUInt32 ** papanBandSrcValid
Array of nBands validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8.
Definition gdalwarper.h:364
int nSrcYOff
Y offset of the source buffer regarding the top-left corner of the image.
Definition gdalwarper.h:401
float * pafUnifiedSrcDensity
Unified source density of size nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS.
Definition gdalwarper.h:368
int nDstYOff
Y offset of the destination buffer regarding the top-left corner of the image.
Definition gdalwarper.h:406
int nFiltInitY
Y filtering offset.
Definition gdalwarper.h:396
GDALProgressFunc pfnProgress
Progress function.
Definition gdalwarper.h:414
GUInt32 * panDstValid
Validify mask of size (nDstXSize * nDstYSize) / 8.
Definition gdalwarper.h:377
GUInt32 * panUnifiedSrcValid
Unified validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8.
Definition gdalwarper.h:366
int nYRadius
Y size of window to filter.
Definition gdalwarper.h:392
GByte ** papabyDstImage
Array of nBands destination images of size nDstXSize * nDstYSize.
Definition gdalwarper.h:375
double dfXFilter
X size of filter kernel.
Definition gdalwarper.h:386
double dfYScale
Y resampling scale, i.e.
Definition gdalwarper.h:384
double dfProgressScale
Scale value for progress computation.
Definition gdalwarper.h:421
int nSrcXSize
Width of the source image.
Definition gdalwarper.h:353
CPLErr WarpRegionToBuffer(int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize, void *pDataBuf, GDALDataType eBufDataType, int nSrcXOff=0, int nSrcYOff=0, int nSrcXSize=0, int nSrcYSize=0, double dfProgressBase=0.0, double dfProgressScale=1.0)
This method requests that a particular window of the output dataset be warped and the result put into...
Definition gdalwarpoperation.cpp:1738
CPLErr Initialize(const GDALWarpOptions *psNewOptions)
This method initializes the GDALWarpOperation's concept of the warp options in effect.
Definition gdalwarpoperation.cpp:523
CPLErr ChunkAndWarpImage(int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize)
This method does a complete warp of the source image to the destination image for the indicated regio...
Definition gdalwarpoperation.cpp:941
static void DestroyDestinationBuffer(void *pDstBuffer)
This method destroys a buffer previously retrieved from CreateDestinationBuffer.
Definition gdalwarpoperation.cpp:796
const GDALWarpOptions * GetOptions()
Return warp options.
Definition gdalwarpoperation.cpp:216
CPLErr WarpRegion(int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize, int nSrcXOff=0, int nSrcYOff=0, int nSrcXSize=0, int nSrcYSize=0, double dfProgressBase=0.0, double dfProgressScale=1.0)
This method requests the indicated region of the output file be generated.
Definition gdalwarpoperation.cpp:1517
CPLErr ChunkAndWarpMulti(int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize)
This method does a complete warp of the source image to the destination image for the indicated regio...
Definition gdalwarpoperation.cpp:1108
void * CreateDestinationBuffer(int nDstXSize, int nDstYSize, int *pbWasInitialized=nullptr)
This method creates a destination buffer for use with WarpRegionToBuffer.
Definition gdalwarpoperation.cpp:686
CPLErr
Error category.
Definition cpl_error.h:53
Definitions for CPL mini XML Parser/Serializer.
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:331
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:329
unsigned int GUInt32
Unsigned int32 type.
Definition cpl_port.h:207
#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:955
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1169
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:215
GDALDataType
Definition gdal.h:62
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition gdal.h:268
void * GDALDriverH
Opaque type used for the C bindings of the C++ GDALDriver class.
Definition gdal.h:274
Public (C callable) GDAL algorithm entry points, and definitions.
int(* GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Definition gdal_alg.h:114
CPLErr GDALWarpRegion(GDALWarpOperationH, int, int, int, int, int, int, int, int)
Definition gdalwarpoperation.cpp:1692
void GDALDestroyWarpOperation(GDALWarpOperationH)
Definition gdalwarpoperation.cpp:830
GDALWarpOperationH GDALCreateWarpOperation(const GDALWarpOptions *)
Definition gdalwarpoperation.cpp:809
GWKAverageOrModeAlg
Definition gdalwarper.h:72
@ GWKAOM_Fmode
Definition gdalwarper.h:74
@ GWKAOM_Min
Definition gdalwarper.h:77
@ GWKAOM_RMS
Definition gdalwarper.h:80
@ GWKAOM_Quant
Definition gdalwarper.h:78
@ GWKAOM_Sum
Definition gdalwarper.h:79
@ GWKAOM_Imode
Definition gdalwarper.h:75
@ GWKAOM_Average
Definition gdalwarper.h:73
@ GWKAOM_Max
Definition gdalwarper.h:76
void GDALWarpInitDstNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfDstNoDataImag with specified value.
Definition gdalwarper.cpp:1438
GDALResampleAlg
Definition gdalwarper.h:50
@ GRA_CubicSpline
Definition gdalwarper.h:54
@ GRA_Q1
Definition gdalwarper.h:62
@ GRA_Sum
Definition gdalwarper.h:64
@ GRA_Max
Definition gdalwarper.h:59
@ GRA_Cubic
Definition gdalwarper.h:53
@ GRA_Min
Definition gdalwarper.h:60
@ GRA_RMS
Definition gdalwarper.h:65
@ GRA_Lanczos
Definition gdalwarper.h:55
@ GRA_Mode
Definition gdalwarper.h:57
@ GRA_NearestNeighbour
Definition gdalwarper.h:51
@ GRA_Q3
Definition gdalwarper.h:63
@ GRA_Med
Definition gdalwarper.h:61
@ GRA_Average
Definition gdalwarper.h:56
@ GRA_Bilinear
Definition gdalwarper.h:52
GDALDatasetH GDALCreateWarpedVRT(GDALDatasetH hSrcDS, int nPixels, int nLines, double *padfGeoTransform, GDALWarpOptions *psOptions)
Create virtual warped dataset.
Definition vrtwarped.cpp:322
void GDALDestroyWarpOptions(GDALWarpOptions *)
Destroy a warp options structure.
Definition gdalwarper.cpp:1279
void * GDALWarpOperationH
Opaque type representing a GDALWarpOperation object.
Definition gdalwarper.h:562
CPLErr GDALWarpRegionToBuffer(GDALWarpOperationH, int, int, int, int, void *, GDALDataType, int, int, int, int)
Definition gdalwarpoperation.cpp:2342
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
CPLErr GDALChunkAndWarpImage(GDALWarpOperationH, int, int, int, int)
Definition gdalwarpoperation.cpp:1012
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:134
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:1582
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:108
void GDALWarpInitSrcNoDataImag(GDALWarpOptions *, double dNoDataImag)
Initialize padfSrcNoDataImag with specified value.
Definition gdalwarper.cpp:1457
CPLErr GDALInitializeWarpedVRT(GDALDatasetH hDS, GDALWarpOptions *psWO)
Set warp info on virtual warped dataset.
Definition vrtwarped.cpp:1212
void GDALWarpInitSrcNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal with specified value.
Definition gdalwarper.cpp:1400
void GDALWarpInitDstNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfDstNoDataReal with specified value.
Definition gdalwarper.cpp:1380
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
CPLErr GDALChunkAndWarpMulti(GDALWarpOperationH, int, int, int, int)
Definition gdalwarpoperation.cpp:1247
GDALWarpOptions * GDALCreateWarpOptions(void)
Create a warp options structure.
Definition gdalwarper.cpp:1260
void GDALWarpInitNoDataReal(GDALWarpOptions *, double dNoDataReal)
Initialize padfSrcNoDataReal and padfDstNoDataReal with specified value.
Definition gdalwarper.cpp:1420
GDALWarpOptions * GDALCloneWarpOptions(const GDALWarpOptions *)
Clone a warp options structure.
Definition gdalwarper.cpp:1320
void GDALWarpResolveWorkingDataType(GDALWarpOptions *)
If the working data type is unknown, this method will determine a valid working data type to support ...
Definition gdalwarper.cpp:1477
Document node structure.
Definition cpl_minixml.h:70
Warp control options for use with GDALWarpOperation::Initialize()
Definition gdalwarper.h:127
int nSrcAlphaBand
Definition gdalwarper.h:157
GDALDatasetH hDstDS
Definition gdalwarper.h:145
double * padfDstNoDataImag
Definition gdalwarper.h:174
GDALMaskFunc pfnDstValidityMaskFunc
Unused.
Definition gdalwarper.h:210
double * padfSrcNoDataReal
Definition gdalwarper.h:163
void * pTransformerArg
Definition gdalwarper.h:187
GDALDataType eWorkingDataType
Definition gdalwarper.h:139
void * pSrcValidityMaskFuncArg
Unused.
Definition gdalwarper.h:197
void * pDstDensityMaskFuncArg
Unused.
Definition gdalwarper.h:207
int * panDstBands
Definition gdalwarper.h:154
double dfCutlineBlendDist
Definition gdalwarper.h:228
GDALProgressFunc pfnProgress
Definition gdalwarper.h:178
GDALMaskFunc pfnSrcDensityMaskFunc
Unused.
Definition gdalwarper.h:200
GDALDatasetH hSrcDS
Definition gdalwarper.h:142
GDALMaskFunc pfnDstDensityMaskFunc
Unused.
Definition gdalwarper.h:205
void * pPreWarpProcessorArg
Unused.
Definition gdalwarper.h:217
void * pProgressArg
Definition gdalwarper.h:181
int nDstAlphaBand
Definition gdalwarper.h:160
int * panSrcBands
Definition gdalwarper.h:151
GDALTransformerFunc pfnTransformer
Definition gdalwarper.h:184
int nBandCount
Definition gdalwarper.h:148
double dfWarpMemoryLimit
Definition gdalwarper.h:132
void * pSrcDensityMaskFuncArg
Unused.
Definition gdalwarper.h:202
GDALMaskFunc * papfnSrcPerBandValidityMaskFunc
Unused.
Definition gdalwarper.h:190
GDALResampleAlg eResampleAlg
Definition gdalwarper.h:135
CPLErr(* pfnPostWarpChunkProcessor)(void *pKern, void *pArg)
Unused.
Definition gdalwarper.h:220
GDALMaskFunc pfnSrcValidityMaskFunc
Unused.
Definition gdalwarper.h:195
char ** papszWarpOptions
A string list of additional options controlling the warp operation in name=value format.
Definition gdalwarper.h:129
void * hCutline
Definition gdalwarper.h:225
void * pDstValidityMaskFuncArg
Unused.
Definition gdalwarper.h:212
void ** papSrcPerBandValidityMaskFuncArg
Unused.
Definition gdalwarper.h:192
CPLErr(* pfnPreWarpChunkProcessor)(void *pKern, void *pArg)
Unused.
Definition gdalwarper.h:215
double * padfDstNoDataReal
Definition gdalwarper.h:170
double * padfSrcNoDataImag
Definition gdalwarper.h:167
void * pPostWarpProcessorArg
Unused.
Definition gdalwarper.h:222