📄 gdalwarper.h
字号:
GDALMaskFunc pfnDstValidityMaskFunc; void *pDstValidityMaskFuncArg; CPLErr (*pfnPreWarpChunkProcessor)( void *pKern, void *pArg ); void *pPreWarpProcessorArg; CPLErr (*pfnPostWarpChunkProcessor)( void *pKern, void *pArg); void *pPostWarpProcessorArg;} GDALWarpOptions;GDALWarpOptions CPL_DLL * CPL_STDCALL GDALCreateWarpOptions(void);void CPL_DLL CPL_STDCALL GDALDestroyWarpOptions( GDALWarpOptions * );GDALWarpOptions CPL_DLL * CPL_STDCALLGDALCloneWarpOptions( const GDALWarpOptions * );CPLXMLNode CPL_DLL * CPL_STDCALL GDALSerializeWarpOptions( const GDALWarpOptions * );GDALWarpOptions CPL_DLL * CPL_STDCALL GDALDeserializeWarpOptions( CPLXMLNode * );/************************************************************************//* GDALReprojectImage() *//************************************************************************/CPLErr CPL_DLL CPL_STDCALLGDALReprojectImage( GDALDatasetH hSrcDS, const char *pszSrcWKT, GDALDatasetH hDstDS, const char *pszDstWKT, GDALResampleAlg eResampleAlg, double dfWarpMemoryLimit, double dfMaxError, GDALProgressFunc pfnProgress, void *pProgressArg, GDALWarpOptions *psOptions );CPLErr CPL_DLL CPL_STDCALLGDALCreateAndReprojectImage( 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 );/************************************************************************//* VRTWarpedDataset *//************************************************************************/GDALDatasetH CPL_DLL CPL_STDCALLGDALAutoCreateWarpedVRT( GDALDatasetH hSrcDS, const char *pszSrcWKT, const char *pszDstWKT, GDALResampleAlg eResampleAlg, double dfMaxError, const GDALWarpOptions *psOptions );GDALDatasetH CPL_DLL CPL_STDCALL GDALCreateWarpedVRT( GDALDatasetH hSrcDS, int nPixels, int nLines, double *padfGeoTransform, GDALWarpOptions *psOptions );CPLErr CPL_DLL CPL_STDCALLGDALInitializeWarpedVRT( GDALDatasetH hDS, GDALWarpOptions *psWO );CPL_C_END#ifdef __cplusplus /************************************************************************//* GDALWarpKernel *//* *//* This class represents the lowest level of abstraction. It *//* is holds the imagery for one "chunk" of a warp, and the *//* pre-prepared masks. All IO is done before and after it's *//* operation. This class is not normally used by the *//* application. *//************************************************************************/class CPL_DLL GDALWarpKernel{public: GDALWarpKernel(); virtual ~GDALWarpKernel(); char **papszWarpOptions; GDALResampleAlg eResample; GDALDataType eWorkingDataType; int nBands; int nSrcXSize; int nSrcYSize; GByte **papabySrcImage; GUInt32 **papanBandSrcValid; GUInt32 *panUnifiedSrcValid; float *pafUnifiedSrcDensity; int nDstXSize; int nDstYSize; GByte **papabyDstImage; GUInt32 *panDstValid; float *pafDstDensity; int nSrcXOff; int nSrcYOff; int nDstXOff; int nDstYOff; GDALTransformerFunc pfnTransformer; void *pTransformerArg; GDALProgressFunc pfnProgress; void *pProgress; double dfProgressBase; double dfProgressScale; CPLErr Validate(); CPLErr PerformWarp();};/************************************************************************//* GDALWarpOperation() *//* *//* This object is application created, or created by a higher *//* level convenience function. It is responsible for *//* subdividing the operation into chunks, loading and saving *//* imagery, and establishing the varios validity and density *//* masks. Actual resampling is done by the GDALWarpKernel. *//************************************************************************/class CPL_DLL GDALWarpOperation {private: GDALWarpOptions *psOptions; double dfProgressBase; double dfProgressScale; void WipeOptions(); int ValidateOptions(); CPLErr ComputeSourceWindow( int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize, int *pnSrcXOff, int *pnSrcYOff, int *pnSrcXSize, int *pnSrcYSize ); CPLErr CreateKernelMask( GDALWarpKernel *, int iBand, const char *pszType ); void *hThread1Mutex; void *hThread2Mutex; void *hIOMutex; void *hWarpMutex; int nChunkListCount; int nChunkListMax; int *panChunkList; int bReportTimings; unsigned long nLastTimeReported; void WipeChunkList(); CPLErr CollectChunkList( int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize ); void ReportTiming( const char * ); public: GDALWarpOperation(); virtual ~GDALWarpOperation(); CPLErr Initialize( const GDALWarpOptions *psNewOptions ); const GDALWarpOptions *GetOptions(); CPLErr ChunkAndWarpImage( int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize ); CPLErr ChunkAndWarpMulti( int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize ); CPLErr WarpRegion( int nDstXOff, int nDstYOff, int nDstXSize, int nDstYSize, int nSrcXOff=0, int nSrcYOff=0, int nSrcXSize=0, int nSrcYSize=0 ); 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 );};#endif /* def __cplusplus */CPL_C_STARTtypedef void * GDALWarpOperationH;GDALWarpOperationH CPL_DLL GDALCreateWarpOperation(const GDALWarpOptions* );void CPL_DLL GDALDestroyWarpOperation( GDALWarpOperationH );CPLErr CPL_DLL GDALChunkAndWarpImage( GDALWarpOperationH, int, int, int, int );CPLErr CPL_DLL GDALChunkAndWarpMulti( GDALWarpOperationH, int, int, int, int );CPLErr CPL_DLL GDALWarpRegion( GDALWarpOperationH, int, int, int, int, int, int, int, int );CPLErr CPL_DLL GDALWarpRegionToBuffer( GDALWarpOperationH, int, int, int, int, void *, GDALDataType, int, int, int, int );CPL_C_END#endif /* ndef GDAL_ALG_H_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -