15#ifndef GDALDEFAULTOVERVIEWS_H_INCLUDED
16#define GDALDEFAULTOVERVIEWS_H_INCLUDED
19#include "cpl_progress.h"
31class CPL_DLL GDALDefaultOverviews
33 friend class GDALDataset;
38 CPLString osOvrFilename{};
44 GDALDataset *poMaskDS;
48 GDALDataset *poBaseDS;
51 bool bCheckedForOverviews;
55 char **papszInitSiblingFiles;
58 GDALDefaultOverviews();
59 ~GDALDefaultOverviews();
61 void Initialize(GDALDataset *poDSIn,
const char *pszName =
nullptr,
63 bool bNameIsOVR =
false);
65 void Initialize(GDALDataset *poDSIn, GDALOpenInfo *poOpenInfo,
66 const char *pszName =
nullptr,
67 bool bTransferSiblingFilesIfLoaded =
true);
69 void TransferSiblingFiles(
char **papszSiblingFiles);
73 int CloseDependentDatasets();
77 int GetOverviewCount(
int nBand);
78 GDALRasterBand *GetOverview(
int nBand,
int iOverview);
80 CPLErr BuildOverviews(
const char *pszBasename,
const char *pszResampling,
81 int nOverviews,
const int *panOverviewList,
82 int nBands,
const int *panBandList,
83 GDALProgressFunc pfnProgress,
void *pProgressData,
86 CPLErr BuildOverviewsSubDataset(
const char *pszPhysicalFile,
87 const char *pszResampling,
int nOverviews,
88 const int *panOverviewList,
int nBands,
89 const int *panBandList,
90 GDALProgressFunc pfnProgress,
94 CPLErr BuildOverviewsMask(
const char *pszResampling,
int nOverviews,
95 const int *panOverviewList,
96 GDALProgressFunc pfnProgress,
void *pProgressData,
99 static bool CheckSrcOverviewsConsistencyWithBase(
100 GDALDataset *poFullResDS,
101 const std::vector<GDALDataset *> &apoSrcOvrDS);
103 CPLErr AddOverviews(
const char *pszBasename,
104 const std::vector<GDALDataset *> &apoSrcOvrDS,
105 GDALProgressFunc pfnProgress,
void *pProgressData,
112 CPLErr CreateMaskBand(
int nFlags,
int nBand = -1);
113 GDALRasterBand *GetMaskBand(
int nBand);
114 int GetMaskFlags(
int nBand);
116 int HaveMaskFile(
char **papszSiblings =
nullptr,
117 const char *pszBasename =
nullptr);
121 return papszInitSiblingFiles;
127 CPLErr CreateOrOpenOverviewFile(
const char *pszBasename,
A set of associated raster bands, usually from one file.
Definition gdal_dataset.h:76
Class for dataset open functions.
Definition gdal_openinfo.h:28
A single raster band (or channel).
Definition gdal_rasterband.h:105
CPLErr
Error category.
Definition cpl_error.h:37
Core portability definitions for CPL.
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition cpl_port.h:936
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1087
Various convenience functions for working with strings and string lists.