gdal_vrt.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /******************************************************************************
  2. * $Id: gdal_vrt.h 12156 2007-09-14 14:05:58Z dron $
  3. *
  4. * Project: Virtual GDAL Datasets
  5. * Purpose: C/Public declarations of virtual GDAL dataset objects.
  6. * Author: Andrey Kiselev, dron@ak4719.spb.edu
  7. *
  8. ******************************************************************************
  9. * Copyright (c) 2007, Andrey Kiselev <dron@ak4719.spb.edu>
  10. *
  11. * Permission is hereby granted, free of charge, to any person obtaining a
  12. * copy of this software and associated documentation files (the "Software"),
  13. * to deal in the Software without restriction, including without limitation
  14. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  15. * and/or sell copies of the Software, and to permit persons to whom the
  16. * Software is furnished to do so, subject to the following conditions:
  17. *
  18. * The above copyright notice and this permission notice shall be included
  19. * in all copies or substantial portions of the Software.
  20. *
  21. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  22. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  24. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  26. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  27. * DEALINGS IN THE SOFTWARE.
  28. ****************************************************************************/
  29. #ifndef GDAL_VRT_H_INCLUDED
  30. #define GDAL_VRT_H_INCLUDED
  31. /**
  32. * \file gdal_vrt.h
  33. *
  34. * Public (C callable) entry points for virtual GDAL dataset objects.
  35. */
  36. #include "gdal.h"
  37. #include "cpl_port.h"
  38. #include "cpl_error.h"
  39. #include "cpl_minixml.h"
  40. #define VRT_NODATA_UNSET -1234.56
  41. CPL_C_START
  42. void GDALRegister_VRT(void);
  43. typedef CPLErr
  44. (*VRTImageReadFunc)( void *hCBData,
  45. int nXOff, int nYOff, int nXSize, int nYSize,
  46. void *pData );
  47. /* -------------------------------------------------------------------- */
  48. /* Define handle types related to various VRT dataset classes. */
  49. /* -------------------------------------------------------------------- */
  50. typedef void *VRTDriverH;
  51. typedef void *VRTSourceH;
  52. typedef void *VRTSimpleSourceH;
  53. typedef void *VRTAveragedSourceH;
  54. typedef void *VRTComplexSourceH;
  55. typedef void *VRTFilteredSourceH;
  56. typedef void *VRTKernelFilteredSourceH;
  57. typedef void *VRTAverageFilteredSourceH;
  58. typedef void *VRTFuncSourceH;
  59. typedef void *VRTDatasetH;
  60. typedef void *VRTWarpedDatasetH;
  61. typedef void *VRTRasterBandH;
  62. typedef void *VRTSourcedRasterBandH;
  63. typedef void *VRTWarpedRasterBandH;
  64. typedef void *VRTDerivedRasterBandH;
  65. typedef void *VRTRawRasterBandH;
  66. /* ==================================================================== */
  67. /* VRTDataset class. */
  68. /* ==================================================================== */
  69. VRTDatasetH CPL_DLL CPL_STDCALL VRTCreate( int, int );
  70. void CPL_DLL CPL_STDCALL VRTFlushCache( VRTDatasetH );
  71. CPLXMLNode CPL_DLL * CPL_STDCALL VRTSerializeToXML( VRTDatasetH, const char * );
  72. int CPL_DLL CPL_STDCALL VRTAddBand( VRTDatasetH, GDALDataType, char ** );
  73. /* ==================================================================== */
  74. /* VRTSourcedRasterBand class. */
  75. /* ==================================================================== */
  76. CPLErr CPL_STDCALL VRTAddSource( VRTSourcedRasterBandH, VRTSourceH );
  77. CPLErr CPL_DLL CPL_STDCALL VRTAddSimpleSource( VRTSourcedRasterBandH,
  78. GDALRasterBandH,
  79. int, int, int, int,
  80. int, int, int, int,
  81. const char *, double );
  82. CPLErr CPL_DLL CPL_STDCALL VRTAddComplexSource( VRTSourcedRasterBandH,
  83. GDALRasterBandH,
  84. int, int, int, int,
  85. int, int, int, int,
  86. double, double, double );
  87. CPLErr CPL_DLL CPL_STDCALL VRTAddFuncSource( VRTSourcedRasterBandH,
  88. VRTImageReadFunc,
  89. void *, double );
  90. CPL_C_END
  91. #endif /* GDAL_VRT_H_INCLUDED */