gooderp18绿色标准版
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

565 lines
23KB

  1. /******************************************************************************
  2. * $Id: gdalwarper.h d16ecc80707f9c7097a11bfe47c8403bb9df310f 2018-07-27 20:14:48 -0700 piyush.agram@jpl.nasa.gov $
  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 mines-paris dot org>
  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. #ifndef GDALWARPER_H_INCLUDED
  31. #define GDALWARPER_H_INCLUDED
  32. /**
  33. * \file gdalwarper.h
  34. *
  35. * GDAL warper related entry points and definitions. Eventually it is
  36. * expected that this file will be mostly private to the implementation,
  37. * and the public C entry points will be available in gdal_alg.h.
  38. */
  39. #include "gdal_alg.h"
  40. #include "cpl_minixml.h"
  41. #include "cpl_multiproc.h"
  42. CPL_C_START
  43. /* Note: values are selected to be consistent with GDALRIOResampleAlg of gcore/gdal.h */
  44. /*! Warp Resampling Algorithm */
  45. typedef enum {
  46. /*! Nearest neighbour (select on one input pixel) */ GRA_NearestNeighbour=0,
  47. /*! Bilinear (2x2 kernel) */ GRA_Bilinear=1,
  48. /*! Cubic Convolution Approximation (4x4 kernel) */ GRA_Cubic=2,
  49. /*! Cubic B-Spline Approximation (4x4 kernel) */ GRA_CubicSpline=3,
  50. /*! Lanczos windowed sinc interpolation (6x6 kernel) */ GRA_Lanczos=4,
  51. /*! Average (computes the average of all non-NODATA contributing pixels) */ GRA_Average=5,
  52. /*! Mode (selects the value which appears most often of all the sampled points) */ GRA_Mode=6,
  53. /* GRA_Gauss=7 reserved. */
  54. /*! Max (selects maximum of all non-NODATA contributing pixels) */ GRA_Max=8,
  55. /*! Min (selects minimum of all non-NODATA contributing pixels) */ GRA_Min=9,
  56. /*! Med (selects median of all non-NODATA contributing pixels) */ GRA_Med=10,
  57. /*! Q1 (selects first quartile of all non-NODATA contributing pixels) */ GRA_Q1=11,
  58. /*! Q3 (selects third quartile of all non-NODATA contributing pixels) */ GRA_Q3=12
  59. } GDALResampleAlg;
  60. /*! GWKAverageOrMode Algorithm */
  61. typedef enum {
  62. /*! Average */ GWKAOM_Average=1,
  63. /*! Mode */ GWKAOM_Fmode=2,
  64. /*! Mode of GDT_Byte, GDT_UInt16, or GDT_Int16 */ GWKAOM_Imode=3,
  65. /*! Maximum */ GWKAOM_Max=4,
  66. /*! Minimum */ GWKAOM_Min=5,
  67. /*! Quantile */ GWKAOM_Quant=6
  68. } GWKAverageOrModeAlg;
  69. /*! @cond Doxygen_Suppress */
  70. typedef int
  71. (*GDALMaskFunc)( void *pMaskFuncArg,
  72. int nBandCount, GDALDataType eType,
  73. int nXOff, int nYOff,
  74. int nXSize, int nYSize,
  75. GByte **papabyImageData,
  76. int bMaskIsFloat, void *pMask );
  77. CPLErr CPL_DLL
  78. GDALWarpNoDataMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
  79. int nXOff, int nYOff, int nXSize, int nYSize,
  80. GByte **papabyImageData, int bMaskIsFloat,
  81. void *pValidityMask, int* pbOutAllValid );
  82. CPLErr CPL_DLL
  83. GDALWarpDstAlphaMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
  84. int nXOff, int nYOff, int nXSize, int nYSize,
  85. GByte ** /*ppImageData */,
  86. int bMaskIsFloat, void *pValidityMask );
  87. CPLErr CPL_DLL
  88. GDALWarpSrcAlphaMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
  89. int nXOff, int nYOff, int nXSize, int nYSize,
  90. GByte ** /*ppImageData */,
  91. int bMaskIsFloat, void *pValidityMask, int* pbOutAllOpaque );
  92. CPLErr CPL_DLL
  93. GDALWarpSrcMaskMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
  94. int nXOff, int nYOff, int nXSize, int nYSize,
  95. GByte ** /*ppImageData */,
  96. int bMaskIsFloat, void *pValidityMask );
  97. CPLErr CPL_DLL
  98. GDALWarpCutlineMasker( void *pMaskFuncArg, int nBandCount, GDALDataType eType,
  99. int nXOff, int nYOff, int nXSize, int nYSize,
  100. GByte ** /* ppImageData */,
  101. int bMaskIsFloat, void *pValidityMask );
  102. /*! @endcond */
  103. /************************************************************************/
  104. /* GDALWarpOptions */
  105. /************************************************************************/
  106. /** Warp control options for use with GDALWarpOperation::Initialize() */
  107. typedef struct {
  108. char **papszWarpOptions;
  109. /*! In bytes, 0.0 for internal default */
  110. double dfWarpMemoryLimit;
  111. /*! Resampling algorithm to use */
  112. GDALResampleAlg eResampleAlg;
  113. /*! data type to use during warp operation, GDT_Unknown lets the algorithm
  114. select the type */
  115. GDALDataType eWorkingDataType;
  116. /*! Source image dataset. */
  117. GDALDatasetH hSrcDS;
  118. /*! Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer(). */
  119. GDALDatasetH hDstDS;
  120. /*! Number of bands to process, may be 0 to select all bands. */
  121. int nBandCount;
  122. /*! The band numbers for the source bands to process (1 based) */
  123. int *panSrcBands;
  124. /*! The band numbers for the destination bands to process (1 based) */
  125. int *panDstBands;
  126. /*! The source band so use as an alpha (transparency) value, 0=disabled */
  127. int nSrcAlphaBand;
  128. /*! The dest. band so use as an alpha (transparency) value, 0=disabled */
  129. int nDstAlphaBand;
  130. /*! The "nodata" value real component for each input band, if NULL there isn't one */
  131. double *padfSrcNoDataReal;
  132. /*! The "nodata" value imaginary component - may be NULL even if real
  133. component is provided. This value is not used to flag invalid values.
  134. Only the real component is used. */
  135. double *padfSrcNoDataImag;
  136. /*! The "nodata" value real component for each output band, if NULL there isn't one */
  137. double *padfDstNoDataReal;
  138. /*! The "nodata" value imaginary component - may be NULL even if real
  139. component is provided. Note that warp operations only use real component
  140. for flagging invalid data.*/
  141. double *padfDstNoDataImag;
  142. /*! GDALProgressFunc() compatible progress reporting function, or NULL
  143. if there isn't one. */
  144. GDALProgressFunc pfnProgress;
  145. /*! Callback argument to be passed to pfnProgress. */
  146. void *pProgressArg;
  147. /*! Type of spatial point transformer function */
  148. GDALTransformerFunc pfnTransformer;
  149. /*! Handle to image transformer setup structure */
  150. void *pTransformerArg;
  151. /** Unused. Must be NULL */
  152. GDALMaskFunc *papfnSrcPerBandValidityMaskFunc;
  153. /** Unused. Must be NULL */
  154. void **papSrcPerBandValidityMaskFuncArg;
  155. /** Unused. Must be NULL */
  156. GDALMaskFunc pfnSrcValidityMaskFunc;
  157. /** Unused. Must be NULL */
  158. void *pSrcValidityMaskFuncArg;
  159. /** Unused. Must be NULL */
  160. GDALMaskFunc pfnSrcDensityMaskFunc;
  161. /** Unused. Must be NULL */
  162. void *pSrcDensityMaskFuncArg;
  163. /** Unused. Must be NULL */
  164. GDALMaskFunc pfnDstDensityMaskFunc;
  165. /** Unused. Must be NULL */
  166. void *pDstDensityMaskFuncArg;
  167. /** Unused. Must be NULL */
  168. GDALMaskFunc pfnDstValidityMaskFunc;
  169. /** Unused. Must be NULL */
  170. void *pDstValidityMaskFuncArg;
  171. /** Unused. Must be NULL */
  172. CPLErr (*pfnPreWarpChunkProcessor)( void *pKern, void *pArg );
  173. /** Unused. Must be NULL */
  174. void *pPreWarpProcessorArg;
  175. /** Unused. Must be NULL */
  176. CPLErr (*pfnPostWarpChunkProcessor)( void *pKern, void *pArg);
  177. /** Unused. Must be NULL */
  178. void *pPostWarpProcessorArg;
  179. /*! Optional OGRPolygonH for a masking cutline. */
  180. void *hCutline;
  181. /*! Optional blending distance to apply across cutline in pixels, default is zero. */
  182. double dfCutlineBlendDist;
  183. } GDALWarpOptions;
  184. GDALWarpOptions CPL_DLL * CPL_STDCALL GDALCreateWarpOptions(void);
  185. void CPL_DLL CPL_STDCALL GDALDestroyWarpOptions( GDALWarpOptions * );
  186. GDALWarpOptions CPL_DLL * CPL_STDCALL
  187. GDALCloneWarpOptions( const GDALWarpOptions * );
  188. void CPL_DLL CPL_STDCALL
  189. GDALWarpInitDstNoDataReal( GDALWarpOptions *, double dNoDataReal );
  190. void CPL_DLL CPL_STDCALL
  191. GDALWarpInitSrcNoDataReal( GDALWarpOptions *, double dNoDataReal );
  192. void CPL_DLL CPL_STDCALL
  193. GDALWarpInitNoDataReal( GDALWarpOptions *, double dNoDataReal );
  194. void CPL_DLL CPL_STDCALL
  195. GDALWarpInitDstNoDataImag( GDALWarpOptions *, double dNoDataImag );
  196. void CPL_DLL CPL_STDCALL
  197. GDALWarpInitSrcNoDataImag( GDALWarpOptions *, double dNoDataImag );
  198. void CPL_DLL CPL_STDCALL
  199. GDALWarpResolveWorkingDataType( GDALWarpOptions * );
  200. void CPL_DLL CPL_STDCALL
  201. GDALWarpInitDefaultBandMapping( GDALWarpOptions *, int nBandCount );
  202. /*! @cond Doxygen_Suppress */
  203. CPLXMLNode CPL_DLL * CPL_STDCALL
  204. GDALSerializeWarpOptions( const GDALWarpOptions * );
  205. GDALWarpOptions CPL_DLL * CPL_STDCALL
  206. GDALDeserializeWarpOptions( CPLXMLNode * );
  207. /*! @endcond */
  208. /************************************************************************/
  209. /* GDALReprojectImage() */
  210. /************************************************************************/
  211. CPLErr CPL_DLL CPL_STDCALL
  212. GDALReprojectImage( GDALDatasetH hSrcDS, const char *pszSrcWKT,
  213. GDALDatasetH hDstDS, const char *pszDstWKT,
  214. GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit,
  215. double dfMaxError,
  216. GDALProgressFunc pfnProgress, void *pProgressArg,
  217. GDALWarpOptions *psOptions );
  218. CPLErr CPL_DLL CPL_STDCALL
  219. GDALCreateAndReprojectImage( GDALDatasetH hSrcDS, const char *pszSrcWKT,
  220. const char *pszDstFilename, const char *pszDstWKT,
  221. GDALDriverH hDstDriver, char **papszCreateOptions,
  222. GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit,
  223. double dfMaxError,
  224. GDALProgressFunc pfnProgress, void *pProgressArg,
  225. GDALWarpOptions *psOptions );
  226. /************************************************************************/
  227. /* VRTWarpedDataset */
  228. /************************************************************************/
  229. GDALDatasetH CPL_DLL CPL_STDCALL
  230. GDALAutoCreateWarpedVRT( GDALDatasetH hSrcDS,
  231. const char *pszSrcWKT, const char *pszDstWKT,
  232. GDALResampleAlg eResampleAlg,
  233. double dfMaxError, const GDALWarpOptions *psOptions );
  234. GDALDatasetH CPL_DLL CPL_STDCALL
  235. GDALCreateWarpedVRT( GDALDatasetH hSrcDS,
  236. int nPixels, int nLines, double *padfGeoTransform,
  237. GDALWarpOptions *psOptions );
  238. CPLErr CPL_DLL CPL_STDCALL
  239. GDALInitializeWarpedVRT( GDALDatasetH hDS,
  240. GDALWarpOptions *psWO );
  241. CPL_C_END
  242. #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
  243. /************************************************************************/
  244. /* GDALWarpKernel */
  245. /* */
  246. /** This is the number of dummy pixels that must be reserved in source arrays
  247. * in order to satisfy assumptions made in GWKResample(), and more specifically
  248. * by GWKGetPixelRow() that always read a even number of pixels. So if we are
  249. * in the situation to read the last pixel of the source array, we need 1 extra
  250. * dummy pixel to avoid reading out of bounds. */
  251. #define WARP_EXTRA_ELTS 1
  252. /** This class represents the lowest level of abstraction of warping.
  253. *
  254. * It holds the imagery for one "chunk" of a warp, and the
  255. * pre-prepared masks. All IO is done before and after its
  256. * operation. This class is not normally used by the
  257. * application.
  258. */
  259. class CPL_DLL GDALWarpKernel
  260. {
  261. CPL_DISALLOW_COPY_ASSIGN(GDALWarpKernel)
  262. public:
  263. /** Warp options */
  264. char **papszWarpOptions;
  265. /** Resample algorithm */
  266. GDALResampleAlg eResample;
  267. /** Working data type */
  268. GDALDataType eWorkingDataType;
  269. /** Number of input and output bands (excluding alpha bands) */
  270. int nBands;
  271. /** Width of the source image */
  272. int nSrcXSize;
  273. /** Height of the source image */
  274. int nSrcYSize;
  275. /** Extra pixels (included in nSrcXSize) reserved for filter window. Should be ignored in scale computation */
  276. double dfSrcXExtraSize;
  277. /** Extra pixels (included in nSrcYSize) reserved for filter window. Should be ignored in scale computation */
  278. double dfSrcYExtraSize;
  279. /** Array of nBands source images of size nSrcXSize * nSrcYSize. Each subarray must have WARP_EXTRA_ELTS at the end */
  280. GByte **papabySrcImage;
  281. /** Array of nBands validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8 */
  282. GUInt32 **papanBandSrcValid;
  283. /** Unified validity mask of size (nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS) / 8 */
  284. GUInt32 *panUnifiedSrcValid;
  285. /** Unified source density of size nSrcXSize * nSrcYSize + WARP_EXTRA_ELTS */
  286. float *pafUnifiedSrcDensity;
  287. /** Width of the destination image */
  288. int nDstXSize;
  289. /** Height of the destination image */
  290. int nDstYSize;
  291. /** Array of nBands destination images of size nDstXSize * nDstYSize */
  292. GByte **papabyDstImage;
  293. /** Validify mask of size (nDstXSize * nDstYSize) / 8 */
  294. GUInt32 *panDstValid;
  295. /** Destination density of size nDstXSize * nDstYSize */
  296. float *pafDstDensity;
  297. /** X resampling scale, i.e. nDstXSize / nSrcXSize */
  298. double dfXScale;
  299. /** Y resampling scale, i.e. nDstYSize / nSrcYSize */
  300. double dfYScale;
  301. /** X size of filter kernel */
  302. double dfXFilter;
  303. /** Y size of filter kernel */
  304. double dfYFilter;
  305. /** X size of window to filter */
  306. int nXRadius;
  307. /** Y size of window to filter */
  308. int nYRadius;
  309. /** X filtering offset */
  310. int nFiltInitX;
  311. /** Y filtering offset */
  312. int nFiltInitY;
  313. /** X offset of the source buffer regarding the top-left corner of the image */
  314. int nSrcXOff;
  315. /** Y offset of the source buffer regarding the top-left corner of the image */
  316. int nSrcYOff;
  317. /** X offset of the destination buffer regarding the top-left corner of the image */
  318. int nDstXOff;
  319. /** Y offset of the destination buffer regarding the top-left corner of the image */
  320. int nDstYOff;
  321. /** Pixel transformation function */
  322. GDALTransformerFunc pfnTransformer;
  323. /** User data provided to pfnTransformer */
  324. void *pTransformerArg;
  325. /** Progress function */
  326. GDALProgressFunc pfnProgress;
  327. /** User data provided to pfnProgress */
  328. void *pProgress;
  329. /** Base/offset value for progress computation */
  330. double dfProgressBase;
  331. /** Scale value for progress computation */
  332. double dfProgressScale;
  333. /** Array of nBands value for destination nodata */
  334. double *padfDstNoDataReal;
  335. /*! @cond Doxygen_Suppress */
  336. /** Per-thread data. Internally set */
  337. void *psThreadData;
  338. /*! @endcond */
  339. GDALWarpKernel();
  340. virtual ~GDALWarpKernel();
  341. CPLErr Validate();
  342. CPLErr PerformWarp();
  343. };
  344. /*! @cond Doxygen_Suppress */
  345. void* GWKThreadsCreate(char** papszWarpOptions,
  346. GDALTransformerFunc pfnTransformer,
  347. void* pTransformerArg);
  348. void GWKThreadsEnd(void* psThreadDataIn);
  349. /*! @endcond */
  350. /************************************************************************/
  351. /* GDALWarpOperation() */
  352. /* */
  353. /* This object is application created, or created by a higher */
  354. /* level convenience function. It is responsible for */
  355. /* subdividing the operation into chunks, loading and saving */
  356. /* imagery, and establishing the varios validity and density */
  357. /* masks. Actual resampling is done by the GDALWarpKernel. */
  358. /************************************************************************/
  359. /*! @cond Doxygen_Suppress */
  360. typedef struct _GDALWarpChunk GDALWarpChunk;
  361. /*! @endcond */
  362. class CPL_DLL GDALWarpOperation {
  363. CPL_DISALLOW_COPY_ASSIGN(GDALWarpOperation)
  364. private:
  365. GDALWarpOptions *psOptions;
  366. void WipeOptions();
  367. int ValidateOptions();
  368. CPLErr ComputeSourceWindow( int nDstXOff, int nDstYOff,
  369. int nDstXSize, int nDstYSize,
  370. int *pnSrcXOff, int *pnSrcYOff,
  371. int *pnSrcXSize, int *pnSrcYSize,
  372. double *pdfSrcXExtraSize, double *pdfSrcYExtraSize,
  373. double* pdfSrcFillRatio );
  374. void ComputeSourceWindowStartingFromSource(
  375. int nDstXOff, int nDstYOff,
  376. int nDstXSize, int nDstYSize,
  377. double* padfSrcMinX, double* padfSrcMinY,
  378. double* padfSrcMaxX, double* padfSrcMaxY);
  379. static CPLErr CreateKernelMask( GDALWarpKernel *, int iBand,
  380. const char *pszType );
  381. CPLMutex *hIOMutex;
  382. CPLMutex *hWarpMutex;
  383. int nChunkListCount;
  384. int nChunkListMax;
  385. GDALWarpChunk *pasChunkList;
  386. int bReportTimings;
  387. unsigned long nLastTimeReported;
  388. void *psThreadData;
  389. void WipeChunkList();
  390. CPLErr CollectChunkListInternal( int nDstXOff, int nDstYOff,
  391. int nDstXSize, int nDstYSize );
  392. void CollectChunkList( int nDstXOff, int nDstYOff,
  393. int nDstXSize, int nDstYSize );
  394. void ReportTiming( const char * );
  395. public:
  396. GDALWarpOperation();
  397. virtual ~GDALWarpOperation();
  398. CPLErr Initialize( const GDALWarpOptions *psNewOptions );
  399. void* CreateDestinationBuffer( int nDstXSize, int nDstYSize,
  400. int *pbWasInitialized = nullptr );
  401. static void DestroyDestinationBuffer(void* pDstBuffer);
  402. const GDALWarpOptions *GetOptions();
  403. CPLErr ChunkAndWarpImage( int nDstXOff, int nDstYOff,
  404. int nDstXSize, int nDstYSize );
  405. CPLErr ChunkAndWarpMulti( int nDstXOff, int nDstYOff,
  406. int nDstXSize, int nDstYSize );
  407. CPLErr WarpRegion( int nDstXOff, int nDstYOff,
  408. int nDstXSize, int nDstYSize,
  409. int nSrcXOff=0, int nSrcYOff=0,
  410. int nSrcXSize=0, int nSrcYSize=0,
  411. double dfProgressBase=0.0, double dfProgressScale=1.0);
  412. CPLErr WarpRegion( int nDstXOff, int nDstYOff,
  413. int nDstXSize, int nDstYSize,
  414. int nSrcXOff, int nSrcYOff,
  415. int nSrcXSize, int nSrcYSize,
  416. double dfSrcXExtraSize, double dfSrcYExtraSize,
  417. double dfProgressBase, double dfProgressScale);
  418. CPLErr WarpRegionToBuffer( int nDstXOff, int nDstYOff,
  419. int nDstXSize, int nDstYSize,
  420. void *pDataBuf,
  421. GDALDataType eBufDataType,
  422. int nSrcXOff=0, int nSrcYOff=0,
  423. int nSrcXSize=0, int nSrcYSize=0,
  424. double dfProgressBase=0.0, double dfProgressScale=1.0);
  425. CPLErr WarpRegionToBuffer( int nDstXOff, int nDstYOff,
  426. int nDstXSize, int nDstYSize,
  427. void *pDataBuf,
  428. GDALDataType eBufDataType,
  429. int nSrcXOff, int nSrcYOff,
  430. int nSrcXSize, int nSrcYSize,
  431. double dfSrcXExtraSize, double dfSrcYExtraSize,
  432. double dfProgressBase, double dfProgressScale);
  433. };
  434. #endif /* def __cplusplus */
  435. CPL_C_START
  436. /** Opaque type representing a GDALWarpOperation object */
  437. typedef void * GDALWarpOperationH;
  438. GDALWarpOperationH CPL_DLL GDALCreateWarpOperation(const GDALWarpOptions* );
  439. void CPL_DLL GDALDestroyWarpOperation( GDALWarpOperationH );
  440. CPLErr CPL_DLL GDALChunkAndWarpImage( GDALWarpOperationH, int, int, int, int );
  441. CPLErr CPL_DLL GDALChunkAndWarpMulti( GDALWarpOperationH, int, int, int, int );
  442. CPLErr CPL_DLL GDALWarpRegion( GDALWarpOperationH,
  443. int, int, int, int, int, int, int, int );
  444. CPLErr CPL_DLL GDALWarpRegionToBuffer( GDALWarpOperationH, int, int, int, int,
  445. void *, GDALDataType,
  446. int, int, int, int );
  447. /************************************************************************/
  448. /* Warping kernel functions */
  449. /************************************************************************/
  450. /*! @cond Doxygen_Suppress */
  451. int GWKGetFilterRadius(GDALResampleAlg eResampleAlg);
  452. typedef double (*FilterFuncType)(double dfX);
  453. FilterFuncType GWKGetFilterFunc(GDALResampleAlg eResampleAlg);
  454. // TODO(schwehr): Can padfVals be a const pointer?
  455. typedef double (*FilterFunc4ValuesType)(double* padfVals);
  456. FilterFunc4ValuesType GWKGetFilterFunc4Values(GDALResampleAlg eResampleAlg);
  457. /*! @endcond */
  458. CPL_C_END
  459. #endif /* ndef GDAL_ALG_H_INCLUDED */
上海开阖软件有限公司 沪ICP备12045867号-1