LCOV - code coverage report
Current view: top level - gcore - gdalproxydataset.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 71 135 52.6 %
Date: 2024-05-04 12:52:34 Functions: 30 73 41.1 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL Core
       4             :  * Purpose:  A dataset and raster band classes that act as proxy for underlying
       5             :  *           GDALDataset* and GDALRasterBand*
       6             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       7             :  *
       8             :  ******************************************************************************
       9             :  * Copyright (c) 2008-2014, Even Rouault <even dot rouault at spatialys.com>
      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             : 
      30             : #include "cpl_port.h"
      31             : #include "gdal_proxy.h"
      32             : 
      33             : #include <cstddef>
      34             : 
      35             : #include "cpl_error.h"
      36             : #include "cpl_progress.h"
      37             : #include "cpl_virtualmem.h"
      38             : #include "gdal.h"
      39             : #include "gdal_priv.h"
      40             : 
      41             : /*! @cond Doxygen_Suppress */
      42             : /* ******************************************************************** */
      43             : /*                        GDALProxyDataset                              */
      44             : /* ******************************************************************** */
      45             : 
      46             : #define D_PROXY_METHOD_WITH_RET(retType, retErrValue, methodName, argList,     \
      47             :                                 argParams)                                     \
      48             :     retType GDALProxyDataset::methodName argList                               \
      49             :     {                                                                          \
      50             :         retType ret;                                                           \
      51             :         GDALDataset *poUnderlyingDataset = RefUnderlyingDataset();             \
      52             :         if (poUnderlyingDataset)                                               \
      53             :         {                                                                      \
      54             :             ret = poUnderlyingDataset->methodName argParams;                   \
      55             :             UnrefUnderlyingDataset(poUnderlyingDataset);                       \
      56             :         }                                                                      \
      57             :         else                                                                   \
      58             :         {                                                                      \
      59             :             ret = retErrValue;                                                 \
      60             :         }                                                                      \
      61             :         return ret;                                                            \
      62             :     }
      63             : 
      64         466 : CPLErr GDALProxyDataset::IRasterIO(GDALRWFlag eRWFlag, int nXOff, int nYOff,
      65             :                                    int nXSize, int nYSize, void *pData,
      66             :                                    int nBufXSize, int nBufYSize,
      67             :                                    GDALDataType eBufType, int nBandCount,
      68             :                                    int *panBandMap, GSpacing nPixelSpace,
      69             :                                    GSpacing nLineSpace, GSpacing nBandSpace,
      70             :                                    GDALRasterIOExtraArg *psExtraArg)
      71             : {
      72             :     CPLErr ret;
      73         466 :     GDALDataset *poUnderlyingDataset = RefUnderlyingDataset();
      74         466 :     if (poUnderlyingDataset)
      75             :     {
      76             :         /* --------------------------------------------------------------------
      77             :          */
      78             :         /*      Do some validation of parameters. */
      79             :         /* --------------------------------------------------------------------
      80             :          */
      81         932 :         if (nXOff + nXSize > poUnderlyingDataset->GetRasterXSize() ||
      82         466 :             nYOff + nYSize > poUnderlyingDataset->GetRasterYSize())
      83             :         {
      84           0 :             ReportError(CE_Failure, CPLE_IllegalArg,
      85             :                         "Access window out of range in RasterIO().  Requested\n"
      86             :                         "(%d,%d) of size %dx%d on raster of %dx%d.",
      87             :                         nXOff, nYOff, nXSize, nYSize,
      88             :                         poUnderlyingDataset->GetRasterXSize(),
      89             :                         poUnderlyingDataset->GetRasterYSize());
      90           0 :             ret = CE_Failure;
      91             :         }
      92         466 :         else if (panBandMap == nullptr &&
      93           0 :                  nBandCount > poUnderlyingDataset->GetRasterCount())
      94             :         {
      95           0 :             ReportError(CE_Failure, CPLE_IllegalArg,
      96             :                         "%s: nBandCount cannot be greater than %d", "IRasterIO",
      97             :                         poUnderlyingDataset->GetRasterCount());
      98           0 :             ret = CE_Failure;
      99             :         }
     100             :         else
     101             :         {
     102         466 :             ret = CE_None;
     103        1159 :             for (int i = 0; i < nBandCount && ret == CE_None; ++i)
     104             :             {
     105         693 :                 int iBand = (panBandMap != nullptr) ? panBandMap[i] : i + 1;
     106         693 :                 if (iBand < 1 || iBand > poUnderlyingDataset->GetRasterCount())
     107             :                 {
     108           0 :                     ReportError(CE_Failure, CPLE_IllegalArg,
     109             :                                 "%s: panBandMap[%d] = %d, this band does not "
     110             :                                 "exist on dataset.",
     111             :                                 "IRasterIO", i, iBand);
     112           0 :                     ret = CE_Failure;
     113             :                 }
     114             : 
     115        1386 :                 if (ret == CE_None &&
     116         693 :                     poUnderlyingDataset->GetRasterBand(iBand) == nullptr)
     117             :                 {
     118           0 :                     ReportError(CE_Failure, CPLE_IllegalArg,
     119             :                                 "%s: panBandMap[%d]=%d, this band should exist "
     120             :                                 "but is NULL!",
     121             :                                 "IRasterIO", i, iBand);
     122           0 :                     ret = CE_Failure;
     123             :                 }
     124             :             }
     125         466 :             if (ret != CE_Failure)
     126             :             {
     127         466 :                 ret = poUnderlyingDataset->IRasterIO(
     128             :                     eRWFlag, nXOff, nYOff, nXSize, nYSize, pData, nBufXSize,
     129             :                     nBufYSize, eBufType, nBandCount, panBandMap, nPixelSpace,
     130         466 :                     nLineSpace, nBandSpace, psExtraArg);
     131             :             }
     132             :         }
     133         466 :         UnrefUnderlyingDataset(poUnderlyingDataset);
     134             :     }
     135             :     else
     136             :     {
     137           0 :         ret = CE_Failure;
     138             :     }
     139         466 :     return ret;
     140             : }
     141             : 
     142           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, IBuildOverviews,
     143             :                         (const char *pszResampling, int nOverviews,
     144             :                          const int *panOverviewList, int nListBands,
     145             :                          const int *panBandList, GDALProgressFunc pfnProgress,
     146             :                          void *pProgressData, CSLConstList papszOptions),
     147             :                         (pszResampling, nOverviews, panOverviewList, nListBands,
     148             :                          panBandList, pfnProgress, pProgressData, papszOptions))
     149             : 
     150           0 : D_PROXY_METHOD_WITH_RET(CPLStringList, CPLStringList(), GetCompressionFormats,
     151             :                         (int nXOff, int nYOff, int nXSize, int nYSize,
     152             :                          int nBandCount, const int *panBandList),
     153             :                         (nXOff, nYOff, nXSize, nYSize, nBandCount, panBandList))
     154             : 
     155           1 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, ReadCompressedData,
     156             :                         (const char *pszFormat, int nXOff, int nYOff,
     157             :                          int nXSize, int nYSize, int nBandCount,
     158             :                          const int *panBandList, void **ppBuffer,
     159             :                          size_t *pnBufferSize, char **ppszDetailedFormat),
     160             :                         (pszFormat, nXOff, nYOff, nXSize, nYSize, nBandCount,
     161             :                          panBandList, ppBuffer, pnBufferSize,
     162             :                          ppszDetailedFormat))
     163             : 
     164           0 : CPLErr GDALProxyDataset::FlushCache(bool bAtClosing)
     165             : {
     166           0 :     CPLErr eErr = CE_None;
     167           0 :     GDALDataset *poUnderlyingDataset = RefUnderlyingDataset();
     168           0 :     if (poUnderlyingDataset)
     169             :     {
     170           0 :         eErr = poUnderlyingDataset->FlushCache(bAtClosing);
     171           0 :         UnrefUnderlyingDataset(poUnderlyingDataset);
     172             :     }
     173           0 :     return eErr;
     174             : }
     175             : 
     176           0 : D_PROXY_METHOD_WITH_RET(char **, nullptr, GetMetadataDomainList, (), ())
     177           0 : D_PROXY_METHOD_WITH_RET(char **, nullptr, GetMetadata, (const char *pszDomain),
     178             :                         (pszDomain))
     179           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetMetadata,
     180             :                         (char **papszMetadata, const char *pszDomain),
     181             :                         (papszMetadata, pszDomain))
     182           0 : D_PROXY_METHOD_WITH_RET(const char *, nullptr, GetMetadataItem,
     183             :                         (const char *pszName, const char *pszDomain),
     184             :                         (pszName, pszDomain))
     185           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetMetadataItem,
     186             :                         (const char *pszName, const char *pszValue,
     187             :                          const char *pszDomain),
     188             :                         (pszName, pszValue, pszDomain))
     189             : 
     190           2 : D_PROXY_METHOD_WITH_RET(const OGRSpatialReference *, nullptr, GetSpatialRef,
     191             :                         () const, ())
     192           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetSpatialRef,
     193             :                         (const OGRSpatialReference *poSRS), (poSRS))
     194           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, GetGeoTransform,
     195             :                         (double *padfGeoTransform), (padfGeoTransform))
     196           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetGeoTransform,
     197             :                         (double *padfGeoTransform), (padfGeoTransform))
     198             : 
     199           0 : D_PROXY_METHOD_WITH_RET(void *, nullptr, GetInternalHandle, (const char *arg1),
     200             :                         (arg1))
     201          50 : D_PROXY_METHOD_WITH_RET(GDALDriver *, nullptr, GetDriver, (), ())
     202           0 : D_PROXY_METHOD_WITH_RET(char **, nullptr, GetFileList, (), ())
     203           2 : D_PROXY_METHOD_WITH_RET(int, 0, GetGCPCount, (), ())
     204           0 : D_PROXY_METHOD_WITH_RET(const OGRSpatialReference *, nullptr, GetGCPSpatialRef,
     205             :                         () const, ())
     206           0 : D_PROXY_METHOD_WITH_RET(const GDAL_GCP *, nullptr, GetGCPs, (), ())
     207           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetGCPs,
     208             :                         (int nGCPCount, const GDAL_GCP *pasGCPList,
     209             :                          const OGRSpatialReference *poGCP_SRS),
     210             :                         (nGCPCount, pasGCPList, poGCP_SRS))
     211          94 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, AdviseRead,
     212             :                         (int nXOff, int nYOff, int nXSize, int nYSize,
     213             :                          int nBufXSize, int nBufYSize, GDALDataType eDT,
     214             :                          int nBandCount, int *panBandList, char **papszOptions),
     215             :                         (nXOff, nYOff, nXSize, nYSize, nBufXSize, nBufYSize,
     216             :                          eDT, nBandCount, panBandList, papszOptions))
     217           0 : D_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, CreateMaskBand, (int nFlagsIn),
     218             :                         (nFlagsIn))
     219             : 
     220             : /************************************************************************/
     221             : /*                    UnrefUnderlyingDataset()                        */
     222             : /************************************************************************/
     223             : 
     224           0 : void GDALProxyDataset::UnrefUnderlyingDataset(
     225             :     GDALDataset * /* poUnderlyingDataset */) const
     226             : {
     227           0 : }
     228             : 
     229             : /* ******************************************************************** */
     230             : /*                        GDALProxyRasterBand                           */
     231             : /* ******************************************************************** */
     232             : 
     233             : #define RB_PROXY_METHOD_WITH_RET(retType, retErrValue, methodName, argList,    \
     234             :                                  argParams)                                    \
     235             :     retType GDALProxyRasterBand::methodName argList                            \
     236             :     {                                                                          \
     237             :         retType ret;                                                           \
     238             :         GDALRasterBand *poSrcBand = RefUnderlyingRasterBand();                 \
     239             :         if (poSrcBand)                                                         \
     240             :         {                                                                      \
     241             :             ret = poSrcBand->methodName argParams;                             \
     242             :             UnrefUnderlyingRasterBand(poSrcBand);                              \
     243             :         }                                                                      \
     244             :         else                                                                   \
     245             :         {                                                                      \
     246             :             ret = retErrValue;                                                 \
     247             :         }                                                                      \
     248             :         return ret;                                                            \
     249             :     }
     250             : 
     251             : #define RB_PROXY_METHOD_WITH_RET_WITH_INIT_BLOCK(                              \
     252             :     retType, retErrValue, methodName, argList, argParams)                      \
     253             :     retType GDALProxyRasterBand::methodName argList                            \
     254             :     {                                                                          \
     255             :         retType ret;                                                           \
     256             :         GDALRasterBand *poSrcBand = RefUnderlyingRasterBand();                 \
     257             :         if (poSrcBand)                                                         \
     258             :         {                                                                      \
     259             :             if (!poSrcBand->InitBlockInfo())                                   \
     260             :                 ret = CE_Failure;                                              \
     261             :             else                                                               \
     262             :             {                                                                  \
     263             :                 int nSrcBlockXSize, nSrcBlockYSize;                            \
     264             :                 poSrcBand->GetBlockSize(&nSrcBlockXSize, &nSrcBlockYSize);     \
     265             :                 if (poSrcBand->GetRasterDataType() != GetRasterDataType())     \
     266             :                 {                                                              \
     267             :                     CPLError(                                                  \
     268             :                         CE_Failure, CPLE_AppDefined,                           \
     269             :                         "Inconsistent datatype between proxy and source");     \
     270             :                     ret = CE_Failure;                                          \
     271             :                 }                                                              \
     272             :                 else if (nSrcBlockXSize != nBlockXSize ||                      \
     273             :                          nSrcBlockYSize != nBlockYSize)                        \
     274             :                 {                                                              \
     275             :                     CPLError(CE_Failure, CPLE_AppDefined,                      \
     276             :                              "Inconsistent block dimensions between proxy "    \
     277             :                              "and source");                                    \
     278             :                     ret = CE_Failure;                                          \
     279             :                 }                                                              \
     280             :                 else                                                           \
     281             :                 {                                                              \
     282             :                     ret = poSrcBand->methodName argParams;                     \
     283             :                 }                                                              \
     284             :             }                                                                  \
     285             :             UnrefUnderlyingRasterBand(poSrcBand);                              \
     286             :         }                                                                      \
     287             :         else                                                                   \
     288             :         {                                                                      \
     289             :             ret = retErrValue;                                                 \
     290             :         }                                                                      \
     291             :         return ret;                                                            \
     292             :     }
     293             : 
     294           0 : RB_PROXY_METHOD_WITH_RET_WITH_INIT_BLOCK(CPLErr, CE_Failure, IReadBlock,
     295             :                                          (int nXBlockOff, int nYBlockOff,
     296             :                                           void *pImage),
     297             :                                          (nXBlockOff, nYBlockOff, pImage))
     298           8 : RB_PROXY_METHOD_WITH_RET_WITH_INIT_BLOCK(CPLErr, CE_Failure, IWriteBlock,
     299             :                                          (int nXBlockOff, int nYBlockOff,
     300             :                                           void *pImage),
     301             :                                          (nXBlockOff, nYBlockOff, pImage))
     302             : 
     303       15195 : CPLErr GDALProxyRasterBand::IRasterIO(GDALRWFlag eRWFlag, int nXOff, int nYOff,
     304             :                                       int nXSize, int nYSize, void *pData,
     305             :                                       int nBufXSize, int nBufYSize,
     306             :                                       GDALDataType eBufType,
     307             :                                       GSpacing nPixelSpace, GSpacing nLineSpace,
     308             :                                       GDALRasterIOExtraArg *psExtraArg)
     309             : {
     310             :     CPLErr ret;
     311       15195 :     GDALRasterBand *poSrcBand = RefUnderlyingRasterBand();
     312       15195 :     if (poSrcBand)
     313             :     {
     314             :         /* --------------------------------------------------------------------
     315             :          */
     316             :         /*      Do some validation of parameters. */
     317             :         /* --------------------------------------------------------------------
     318             :          */
     319       30390 :         if (nXOff + nXSize > poSrcBand->GetXSize() ||
     320       15195 :             nYOff + nYSize > poSrcBand->GetYSize())
     321             :         {
     322           0 :             ReportError(CE_Failure, CPLE_IllegalArg,
     323             :                         "Access window out of range in RasterIO().  Requested\n"
     324             :                         "(%d,%d) of size %dx%d on raster of %dx%d.",
     325             :                         nXOff, nYOff, nXSize, nYSize, poSrcBand->GetXSize(),
     326             :                         poSrcBand->GetYSize());
     327           0 :             ret = CE_Failure;
     328             :         }
     329             :         else
     330             :         {
     331       15195 :             ret = poSrcBand->IRasterIO(eRWFlag, nXOff, nYOff, nXSize, nYSize,
     332             :                                        pData, nBufXSize, nBufYSize, eBufType,
     333       15195 :                                        nPixelSpace, nLineSpace, psExtraArg);
     334             :         }
     335       15195 :         UnrefUnderlyingRasterBand(poSrcBand);
     336             :     }
     337             :     else
     338             :     {
     339           0 :         ret = CE_Failure;
     340             :     }
     341       15195 :     return ret;
     342             : }
     343             : 
     344           0 : RB_PROXY_METHOD_WITH_RET(char **, nullptr, GetMetadataDomainList, (), ())
     345          46 : RB_PROXY_METHOD_WITH_RET(char **, nullptr, GetMetadata, (const char *pszDomain),
     346             :                          (pszDomain))
     347           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetMetadata,
     348             :                          (char **papszMetadata, const char *pszDomain),
     349             :                          (papszMetadata, pszDomain))
     350             : 
     351          98 : const char *GDALProxyRasterBand::GetMetadataItem(const char *pszKey,
     352             :                                                  const char *pszDomain)
     353             : {
     354          98 :     const char *pszRet = nullptr;
     355          98 :     GDALRasterBand *poSrcBand = RefUnderlyingRasterBand();
     356          98 :     if (poSrcBand)
     357             :     {
     358          98 :         if (!m_bEnablePixelTypeSignedByteWarning)
     359          38 :             poSrcBand->EnablePixelTypeSignedByteWarning(false);
     360          98 :         pszRet = poSrcBand->GetMetadataItem(pszKey, pszDomain);
     361          98 :         poSrcBand->EnablePixelTypeSignedByteWarning(true);
     362          98 :         UnrefUnderlyingRasterBand(poSrcBand);
     363             :     }
     364          98 :     return pszRet;
     365             : }
     366             : 
     367           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetMetadataItem,
     368             :                          (const char *pszName, const char *pszValue,
     369             :                           const char *pszDomain),
     370             :                          (pszName, pszValue, pszDomain))
     371             : 
     372         105 : CPLErr GDALProxyRasterBand::FlushCache(bool bAtClosing)
     373             : {
     374             :     // We need to make sure that all cached bocks at the proxy level are
     375             :     // first flushed
     376         105 :     CPLErr ret = GDALRasterBand::FlushCache(bAtClosing);
     377         105 :     if (ret == CE_None)
     378             :     {
     379         105 :         GDALRasterBand *poSrcBand = RefUnderlyingRasterBand();
     380         105 :         if (poSrcBand)
     381             :         {
     382         105 :             ret = poSrcBand->FlushCache(bAtClosing);
     383         105 :             UnrefUnderlyingRasterBand(poSrcBand);
     384             :         }
     385             :         else
     386             :         {
     387           0 :             ret = CE_Failure;
     388             :         }
     389             :     }
     390         105 :     return ret;
     391             : }
     392             : 
     393          40 : RB_PROXY_METHOD_WITH_RET(char **, nullptr, GetCategoryNames, (), ())
     394         330 : RB_PROXY_METHOD_WITH_RET(double, 0, GetNoDataValue, (int *pbSuccess),
     395             :                          (pbSuccess))
     396          15 : RB_PROXY_METHOD_WITH_RET(double, 0, GetMinimum, (int *pbSuccess), (pbSuccess))
     397          14 : RB_PROXY_METHOD_WITH_RET(double, 0, GetMaximum, (int *pbSuccess), (pbSuccess))
     398          49 : RB_PROXY_METHOD_WITH_RET(double, 0, GetOffset, (int *pbSuccess), (pbSuccess))
     399          49 : RB_PROXY_METHOD_WITH_RET(double, 0, GetScale, (int *pbSuccess), (pbSuccess))
     400          38 : RB_PROXY_METHOD_WITH_RET(const char *, nullptr, GetUnitType, (), ())
     401         353 : RB_PROXY_METHOD_WITH_RET(GDALColorInterp, GCI_Undefined, GetColorInterpretation,
     402             :                          (), ())
     403          46 : RB_PROXY_METHOD_WITH_RET(GDALColorTable *, nullptr, GetColorTable, (), ())
     404           6 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, Fill,
     405             :                          (double dfRealValue, double dfImaginaryValue),
     406             :                          (dfRealValue, dfImaginaryValue))
     407             : 
     408           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetCategoryNames, (char **arg),
     409             :                          (arg))
     410           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetNoDataValue, (double arg),
     411             :                          (arg))
     412           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, DeleteNoDataValue, (), ())
     413           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetColorTable,
     414             :                          (GDALColorTable * arg), (arg))
     415           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetColorInterpretation,
     416             :                          (GDALColorInterp arg), (arg))
     417           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetOffset, (double arg), (arg))
     418           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetScale, (double arg), (arg))
     419           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetUnitType, (const char *arg),
     420             :                          (arg))
     421             : 
     422           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, GetStatistics,
     423             :                          (int bApproxOK, int bForce, double *pdfMin,
     424             :                           double *pdfMax, double *pdfMean, double *padfStdDev),
     425             :                          (bApproxOK, bForce, pdfMin, pdfMax, pdfMean,
     426             :                           padfStdDev))
     427           1 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, ComputeStatistics,
     428             :                          (int bApproxOK, double *pdfMin, double *pdfMax,
     429             :                           double *pdfMean, double *pdfStdDev,
     430             :                           GDALProgressFunc pfn, void *pProgressData),
     431             :                          (bApproxOK, pdfMin, pdfMax, pdfMean, pdfStdDev, pfn,
     432             :                           pProgressData))
     433           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetStatistics,
     434             :                          (double dfMin, double dfMax, double dfMean,
     435             :                           double dfStdDev),
     436             :                          (dfMin, dfMax, dfMean, dfStdDev))
     437          20 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, ComputeRasterMinMax,
     438             :                          (int arg1, double *arg2), (arg1, arg2))
     439             : 
     440           0 : RB_PROXY_METHOD_WITH_RET(int, 0, HasArbitraryOverviews, (), ())
     441         964 : RB_PROXY_METHOD_WITH_RET(int, 0, GetOverviewCount, (), ())
     442           0 : RB_PROXY_METHOD_WITH_RET(GDALRasterBand *, nullptr, GetOverview, (int arg1),
     443             :                          (arg1))
     444           0 : RB_PROXY_METHOD_WITH_RET(GDALRasterBand *, nullptr, GetRasterSampleOverview,
     445             :                          (GUIntBig arg1), (arg1))
     446             : 
     447           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, BuildOverviews,
     448             :                          (const char *arg1, int arg2, const int *arg3,
     449             :                           GDALProgressFunc arg4, void *arg5,
     450             :                           CSLConstList papszOptions),
     451             :                          (arg1, arg2, arg3, arg4, arg5, papszOptions))
     452             : 
     453          39 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, AdviseRead,
     454             :                          (int nXOff, int nYOff, int nXSize, int nYSize,
     455             :                           int nBufXSize, int nBufYSize, GDALDataType eDT,
     456             :                           char **papszOptions),
     457             :                          (nXOff, nYOff, nXSize, nYSize, nBufXSize, nBufYSize,
     458             :                           eDT, papszOptions))
     459             : 
     460           2 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, GetHistogram,
     461             :                          (double dfMin, double dfMax, int nBuckets,
     462             :                           GUIntBig *panHistogram, int bIncludeOutOfRange,
     463             :                           int bApproxOK, GDALProgressFunc pfn,
     464             :                           void *pProgressData),
     465             :                          (dfMin, dfMax, nBuckets, panHistogram,
     466             :                           bIncludeOutOfRange, bApproxOK, pfn, pProgressData))
     467             : 
     468           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, GetDefaultHistogram,
     469             :                          (double *pdfMin, double *pdfMax, int *pnBuckets,
     470             :                           GUIntBig **ppanHistogram, int bForce,
     471             :                           GDALProgressFunc pfn, void *pProgressData),
     472             :                          (pdfMin, pdfMax, pnBuckets, ppanHistogram, bForce, pfn,
     473             :                           pProgressData))
     474             : 
     475           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetDefaultHistogram,
     476             :                          (double dfMin, double dfMax, int nBuckets,
     477             :                           GUIntBig *panHistogram),
     478             :                          (dfMin, dfMax, nBuckets, panHistogram))
     479             : 
     480          47 : RB_PROXY_METHOD_WITH_RET(GDALRasterAttributeTable *, nullptr, GetDefaultRAT, (),
     481             :                          ())
     482           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, SetDefaultRAT,
     483             :                          (const GDALRasterAttributeTable *arg1), (arg1))
     484             : 
     485           3 : RB_PROXY_METHOD_WITH_RET(GDALRasterBand *, nullptr, GetMaskBand, (), ())
     486         429 : RB_PROXY_METHOD_WITH_RET(int, 0, GetMaskFlags, (), ())
     487           0 : RB_PROXY_METHOD_WITH_RET(CPLErr, CE_Failure, CreateMaskBand, (int nFlagsIn),
     488             :                          (nFlagsIn))
     489           0 : RB_PROXY_METHOD_WITH_RET(bool, false, IsMaskBand, () const, ())
     490           0 : RB_PROXY_METHOD_WITH_RET(GDALMaskValueRange, GMVR_UNKNOWN, GetMaskValueRange,
     491             :                          () const, ())
     492             : 
     493           0 : RB_PROXY_METHOD_WITH_RET(CPLVirtualMem *, nullptr, GetVirtualMemAuto,
     494             :                          (GDALRWFlag eRWFlag, int *pnPixelSpace,
     495             :                           GIntBig *pnLineSpace, char **papszOptions),
     496             :                          (eRWFlag, pnPixelSpace, pnLineSpace, papszOptions))
     497             : 
     498             : /************************************************************************/
     499             : /*                 UnrefUnderlyingRasterBand()                        */
     500             : /************************************************************************/
     501             : 
     502        1011 : void GDALProxyRasterBand::UnrefUnderlyingRasterBand(
     503             :     GDALRasterBand * /* poUnderlyingRasterBand */) const
     504             : {
     505        1011 : }
     506             : 
     507             : /*! @endcond */

Generated by: LCOV version 1.14