GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- File List
- File Members

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