gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

224 lines
10KB

  1. /******************************************************************************
  2. * $Id: gdal_utils.h dc3819d387764593c0fb5a5c4d02c21a848a4c9d 2018-04-12 18:07:28 +0200 Even Rouault $
  3. *
  4. * Project: GDAL Utilities
  5. * Purpose: GDAL Utilities Public Declarations.
  6. * Author: Faza Mahamood, fazamhd at gmail dot com
  7. *
  8. * ****************************************************************************
  9. * Copyright (c) 1998, Frank Warmerdam
  10. * Copyright (c) 2007-2015, Even Rouault <even.rouault at spatialys.com>
  11. * Copyright (c) 2015, Faza Mahamood
  12. *
  13. * Permission is hereby granted, free of charge, to any person obtaining a
  14. * copy of this software and associated documentation files (the "Software"),
  15. * to deal in the Software without restriction, including without limitation
  16. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  17. * and/or sell copies of the Software, and to permit persons to whom the
  18. * Software is furnished to do so, subject to the following conditions:
  19. *
  20. * The above copyright notice and this permission notice shall be included
  21. * in all copies or substantial portions of the Software.
  22. *
  23. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  24. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  25. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  26. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  27. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  28. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  29. * DEALINGS IN THE SOFTWARE.
  30. ****************************************************************************/
  31. #ifndef GDAL_UTILS_H_INCLUDED
  32. #define GDAL_UTILS_H_INCLUDED
  33. /**
  34. * \file gdal_utils.h
  35. *
  36. * Public (C callable) GDAL Utilities entry points.
  37. *
  38. * @since GDAL 2.1
  39. */
  40. #include "cpl_port.h"
  41. #include "gdal.h"
  42. CPL_C_START
  43. /*! Options for GDALInfo(). Opaque type */
  44. typedef struct GDALInfoOptions GDALInfoOptions;
  45. /** Opaque type */
  46. typedef struct GDALInfoOptionsForBinary GDALInfoOptionsForBinary;
  47. GDALInfoOptions CPL_DLL *GDALInfoOptionsNew(char** papszArgv, GDALInfoOptionsForBinary* psOptionsForBinary);
  48. void CPL_DLL GDALInfoOptionsFree( GDALInfoOptions *psOptions );
  49. char CPL_DLL *GDALInfo( GDALDatasetH hDataset, const GDALInfoOptions *psOptions );
  50. /*! Options for GDALTranslate(). Opaque type */
  51. typedef struct GDALTranslateOptions GDALTranslateOptions;
  52. /** Opaque type */
  53. typedef struct GDALTranslateOptionsForBinary GDALTranslateOptionsForBinary;
  54. GDALTranslateOptions CPL_DLL *GDALTranslateOptionsNew(char** papszArgv,
  55. GDALTranslateOptionsForBinary* psOptionsForBinary);
  56. void CPL_DLL GDALTranslateOptionsFree( GDALTranslateOptions *psOptions );
  57. void CPL_DLL GDALTranslateOptionsSetProgress( GDALTranslateOptions *psOptions,
  58. GDALProgressFunc pfnProgress,
  59. void *pProgressData );
  60. GDALDatasetH CPL_DLL GDALTranslate(const char *pszDestFilename,
  61. GDALDatasetH hSrcDataset,
  62. const GDALTranslateOptions *psOptions,
  63. int *pbUsageError);
  64. /*! Options for GDALWarp(). Opaque type */
  65. typedef struct GDALWarpAppOptions GDALWarpAppOptions;
  66. /** Opaque type */
  67. typedef struct GDALWarpAppOptionsForBinary GDALWarpAppOptionsForBinary;
  68. GDALWarpAppOptions CPL_DLL *GDALWarpAppOptionsNew(char** papszArgv,
  69. GDALWarpAppOptionsForBinary* psOptionsForBinary);
  70. void CPL_DLL GDALWarpAppOptionsFree( GDALWarpAppOptions *psOptions );
  71. void CPL_DLL GDALWarpAppOptionsSetProgress( GDALWarpAppOptions *psOptions,
  72. GDALProgressFunc pfnProgress,
  73. void *pProgressData );
  74. void CPL_DLL GDALWarpAppOptionsSetQuiet( GDALWarpAppOptions *psOptions,
  75. int bQuiet );
  76. void CPL_DLL GDALWarpAppOptionsSetWarpOption( GDALWarpAppOptions *psOptions,
  77. const char* pszKey,
  78. const char* pszValue );
  79. GDALDatasetH CPL_DLL GDALWarp( const char *pszDest, GDALDatasetH hDstDS,
  80. int nSrcCount, GDALDatasetH *pahSrcDS,
  81. const GDALWarpAppOptions *psOptions, int *pbUsageError );
  82. /*! Options for GDALVectorTranslate(). Opaque type */
  83. typedef struct GDALVectorTranslateOptions GDALVectorTranslateOptions;
  84. /** Opaque type */
  85. typedef struct GDALVectorTranslateOptionsForBinary GDALVectorTranslateOptionsForBinary;
  86. GDALVectorTranslateOptions CPL_DLL *GDALVectorTranslateOptionsNew(char** papszArgv,
  87. GDALVectorTranslateOptionsForBinary* psOptionsForBinary);
  88. void CPL_DLL GDALVectorTranslateOptionsFree( GDALVectorTranslateOptions *psOptions );
  89. void CPL_DLL GDALVectorTranslateOptionsSetProgress( GDALVectorTranslateOptions *psOptions,
  90. GDALProgressFunc pfnProgress,
  91. void *pProgressData );
  92. GDALDatasetH CPL_DLL GDALVectorTranslate( const char *pszDest, GDALDatasetH hDstDS, int nSrcCount,
  93. GDALDatasetH *pahSrcDS,
  94. const GDALVectorTranslateOptions *psOptions, int *pbUsageError );
  95. /*! Options for GDALDEMProcessing(). Opaque type */
  96. typedef struct GDALDEMProcessingOptions GDALDEMProcessingOptions;
  97. /** Opaque type */
  98. typedef struct GDALDEMProcessingOptionsForBinary GDALDEMProcessingOptionsForBinary;
  99. GDALDEMProcessingOptions CPL_DLL *GDALDEMProcessingOptionsNew(char** papszArgv,
  100. GDALDEMProcessingOptionsForBinary* psOptionsForBinary);
  101. void CPL_DLL GDALDEMProcessingOptionsFree( GDALDEMProcessingOptions *psOptions );
  102. void CPL_DLL GDALDEMProcessingOptionsSetProgress( GDALDEMProcessingOptions *psOptions,
  103. GDALProgressFunc pfnProgress,
  104. void *pProgressData );
  105. GDALDatasetH CPL_DLL GDALDEMProcessing(const char *pszDestFilename,
  106. GDALDatasetH hSrcDataset,
  107. const char* pszProcessing,
  108. const char* pszColorFilename,
  109. const GDALDEMProcessingOptions *psOptions,
  110. int *pbUsageError);
  111. /*! Options for GDALNearblack(). Opaque type */
  112. typedef struct GDALNearblackOptions GDALNearblackOptions;
  113. /** Opaque type */
  114. typedef struct GDALNearblackOptionsForBinary GDALNearblackOptionsForBinary;
  115. GDALNearblackOptions CPL_DLL *GDALNearblackOptionsNew(char** papszArgv,
  116. GDALNearblackOptionsForBinary* psOptionsForBinary);
  117. void CPL_DLL GDALNearblackOptionsFree( GDALNearblackOptions *psOptions );
  118. void CPL_DLL GDALNearblackOptionsSetProgress( GDALNearblackOptions *psOptions,
  119. GDALProgressFunc pfnProgress,
  120. void *pProgressData );
  121. GDALDatasetH CPL_DLL GDALNearblack( const char *pszDest, GDALDatasetH hDstDS,
  122. GDALDatasetH hSrcDS,
  123. const GDALNearblackOptions *psOptions, int *pbUsageError );
  124. /*! Options for GDALGrid(). Opaque type */
  125. typedef struct GDALGridOptions GDALGridOptions;
  126. /** Opaque type */
  127. typedef struct GDALGridOptionsForBinary GDALGridOptionsForBinary;
  128. GDALGridOptions CPL_DLL *GDALGridOptionsNew(char** papszArgv,
  129. GDALGridOptionsForBinary* psOptionsForBinary);
  130. void CPL_DLL GDALGridOptionsFree( GDALGridOptions *psOptions );
  131. void CPL_DLL GDALGridOptionsSetProgress( GDALGridOptions *psOptions,
  132. GDALProgressFunc pfnProgress,
  133. void *pProgressData );
  134. GDALDatasetH CPL_DLL GDALGrid( const char *pszDest,
  135. GDALDatasetH hSrcDS,
  136. const GDALGridOptions *psOptions, int *pbUsageError );
  137. /*! Options for GDALRasterize(). Opaque type */
  138. typedef struct GDALRasterizeOptions GDALRasterizeOptions;
  139. /** Opaque type */
  140. typedef struct GDALRasterizeOptionsForBinary GDALRasterizeOptionsForBinary;
  141. GDALRasterizeOptions CPL_DLL *GDALRasterizeOptionsNew(char** papszArgv,
  142. GDALRasterizeOptionsForBinary* psOptionsForBinary);
  143. void CPL_DLL GDALRasterizeOptionsFree( GDALRasterizeOptions *psOptions );
  144. void CPL_DLL GDALRasterizeOptionsSetProgress( GDALRasterizeOptions *psOptions,
  145. GDALProgressFunc pfnProgress,
  146. void *pProgressData );
  147. GDALDatasetH CPL_DLL GDALRasterize( const char *pszDest, GDALDatasetH hDstDS,
  148. GDALDatasetH hSrcDS,
  149. const GDALRasterizeOptions *psOptions, int *pbUsageError );
  150. /*! Options for GDALBuildVRT(). Opaque type */
  151. typedef struct GDALBuildVRTOptions GDALBuildVRTOptions;
  152. /** Opaque type */
  153. typedef struct GDALBuildVRTOptionsForBinary GDALBuildVRTOptionsForBinary;
  154. GDALBuildVRTOptions CPL_DLL *GDALBuildVRTOptionsNew(char** papszArgv,
  155. GDALBuildVRTOptionsForBinary* psOptionsForBinary);
  156. void CPL_DLL GDALBuildVRTOptionsFree( GDALBuildVRTOptions *psOptions );
  157. void CPL_DLL GDALBuildVRTOptionsSetProgress( GDALBuildVRTOptions *psOptions,
  158. GDALProgressFunc pfnProgress,
  159. void *pProgressData );
  160. GDALDatasetH CPL_DLL GDALBuildVRT( const char *pszDest,
  161. int nSrcCount, GDALDatasetH *pahSrcDS, const char* const* papszSrcDSNames,
  162. const GDALBuildVRTOptions *psOptions, int *pbUsageError );
  163. CPL_C_END
  164. #endif /* GDAL_UTILS_H_INCLUDED */
上海开阖软件有限公司 沪ICP备12045867号-1