GDAL
gdal_pam.h
1 /******************************************************************************
2  * $Id$
3  *
4  * Project: GDAL Core
5  * Purpose: Declaration for Peristable Auxiliary Metadata classes.
6  * Author: Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 2005, Frank Warmerdam <warmerdam@pobox.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 #ifndef GDAL_PAM_H_INCLUDED
31 #define GDAL_PAM_H_INCLUDED
32 
34 
35 #include "cpl_minixml.h"
36 #include "gdal_priv.h"
37 #include <limits>
38 #include <map>
39 #include <vector>
40 
41 class GDALPamRasterBand;
42 
43 /* Clone Info Flags */
44 
45 #define GCIF_GEOTRANSFORM 0x01
46 #define GCIF_PROJECTION 0x02
47 #define GCIF_METADATA 0x04
48 #define GCIF_GCPS 0x08
49 
50 #define GCIF_NODATA 0x001000
51 #define GCIF_CATEGORYNAMES 0x002000
52 #define GCIF_MINMAX 0x004000
53 #define GCIF_SCALEOFFSET 0x008000
54 #define GCIF_UNITTYPE 0x010000
55 #define GCIF_COLORTABLE 0x020000
56 #define GCIF_COLORINTERP 0x020000
57 #define GCIF_BAND_METADATA 0x040000
58 #define GCIF_RAT 0x080000
59 #define GCIF_MASK 0x100000
60 #define GCIF_BAND_DESCRIPTION 0x200000
61 
62 #define GCIF_ONLY_IF_MISSING 0x10000000
63 #define GCIF_PROCESS_BANDS 0x20000000
64 
65 #define GCIF_PAM_DEFAULT \
66  (GCIF_GEOTRANSFORM | GCIF_PROJECTION | GCIF_METADATA | GCIF_GCPS | \
67  GCIF_NODATA | GCIF_CATEGORYNAMES | GCIF_MINMAX | GCIF_SCALEOFFSET | \
68  GCIF_UNITTYPE | GCIF_COLORTABLE | GCIF_COLORINTERP | GCIF_BAND_METADATA | \
69  GCIF_RAT | GCIF_MASK | GCIF_ONLY_IF_MISSING | GCIF_PROCESS_BANDS | \
70  GCIF_BAND_DESCRIPTION)
71 
72 /* GDAL PAM Flags */
73 /* ERO 2011/04/13 : GPF_AUXMODE seems to be unimplemented */
74 #define GPF_DIRTY 0x01 // .pam file needs to be written on close
75 #define GPF_TRIED_READ_FAILED 0x02 // no need to keep trying to read .pam.
76 #define GPF_DISABLED 0x04 // do not try any PAM stuff.
77 #define GPF_AUXMODE 0x08 // store info in .aux (HFA) file.
78 #define GPF_NOSAVE 0x10 // do not try to save pam info.
79 
80 /* ==================================================================== */
81 /* GDALDatasetPamInfo */
82 /* */
83 /* We make these things a separate structure of information */
84 /* primarily so we can modify it without altering the size of */
85 /* the GDALPamDataset. It is an effort to reduce ABI churn for */
86 /* driver plugins. */
87 /* ==================================================================== */
88 class GDALDatasetPamInfo
89 {
90  public:
91  char *pszPamFilename = nullptr;
92 
93  std::vector<CPLXMLTreeCloser> m_apoOtherNodes{};
94 
95  OGRSpatialReference *poSRS = nullptr;
96 
97  int bHaveGeoTransform = false;
98  double adfGeoTransform[6]{0, 0, 0, 0, 0, 0};
99 
100  int nGCPCount = 0;
101  GDAL_GCP *pasGCPList = nullptr;
102  OGRSpatialReference *poGCP_SRS = nullptr;
103 
104  CPLString osPhysicalFilename{};
105  CPLString osSubdatasetName{};
106  CPLString osAuxFilename{};
107 
108  int bHasMetadata = false;
109 };
111 
112 /* ******************************************************************** */
113 /* GDALPamDataset */
114 /* ******************************************************************** */
115 
117 class CPL_DLL GDALPamDataset : public GDALDataset
118 {
119  friend class GDALPamRasterBand;
120 
121  private:
122  int IsPamFilenameAPotentialSiblingFile();
123 
124  protected:
125  GDALPamDataset(void);
127  int nPamFlags = 0;
128  GDALDatasetPamInfo *psPam = nullptr;
129 
130  virtual CPLXMLNode *SerializeToXML(const char *);
131  virtual CPLErr XMLInit(CPLXMLNode *, const char *);
132 
133  virtual CPLErr TryLoadXML(char **papszSiblingFiles = nullptr);
134  virtual CPLErr TrySaveXML();
135 
136  CPLErr TryLoadAux(char **papszSiblingFiles = nullptr);
137  CPLErr TrySaveAux();
138 
139  virtual const char *BuildPamFilename();
140 
141  void PamInitialize();
142  void PamClear();
143 
144  void SetPhysicalFilename(const char *);
145  const char *GetPhysicalFilename();
146  void SetSubdatasetName(const char *);
147  const char *GetSubdatasetName();
149 
150  public:
151  ~GDALPamDataset() override;
152 
153  CPLErr FlushCache(bool bAtClosing) override;
154 
155  const OGRSpatialReference *GetSpatialRef() const override;
156  CPLErr SetSpatialRef(const OGRSpatialReference *poSRS) override;
157 
158  CPLErr GetGeoTransform(double *) override;
159  CPLErr SetGeoTransform(double *) override;
160  void DeleteGeoTransform();
161 
162  int GetGCPCount() override;
163  const OGRSpatialReference *GetGCPSpatialRef() const override;
164  const GDAL_GCP *GetGCPs() override;
165  using GDALDataset::SetGCPs;
166  CPLErr SetGCPs(int nGCPCount, const GDAL_GCP *pasGCPList,
167  const OGRSpatialReference *poSRS) override;
168 
169  CPLErr SetMetadata(char **papszMetadata,
170  const char *pszDomain = "") override;
171  CPLErr SetMetadataItem(const char *pszName, const char *pszValue,
172  const char *pszDomain = "") override;
173  char **GetMetadata(const char *pszDomain = "") override;
174  const char *GetMetadataItem(const char *pszName,
175  const char *pszDomain = "") override;
176 
177  char **GetFileList(void) override;
178 
179  void ClearStatistics() override;
180 
182  virtual CPLErr CloneInfo(GDALDataset *poSrcDS, int nCloneInfoFlags);
183 
184  CPLErr IBuildOverviews(const char *pszResampling, int nOverviews,
185  const int *panOverviewList, int nListBands,
186  const int *panBandList, GDALProgressFunc pfnProgress,
187  void *pProgressData,
188  CSLConstList papszOptions) override;
189 
190  // "semi private" methods.
191  void MarkPamDirty()
192  {
193  nPamFlags |= GPF_DIRTY;
194  }
195  GDALDatasetPamInfo *GetPamInfo()
196  {
197  return psPam;
198  }
199  int GetPamFlags()
200  {
201  return nPamFlags;
202  }
203  void SetPamFlags(int nValue)
204  {
205  nPamFlags = nValue;
206  }
208 
209  private:
211 };
212 
214 
215 constexpr double GDAL_PAM_DEFAULT_NODATA_VALUE = 0;
216 // Parenthesis for external code around std::numeric_limits<>::min/max,
217 // for external Windows code that might have includes <windows.h> before
218 // without defining NOMINMAX
219 constexpr int64_t GDAL_PAM_DEFAULT_NODATA_VALUE_INT64 =
220  (std::numeric_limits<int64_t>::min)();
221 constexpr uint64_t GDAL_PAM_DEFAULT_NODATA_VALUE_UINT64 =
222  (std::numeric_limits<uint64_t>::max)();
223 
224 /* ==================================================================== */
225 /* GDALRasterBandPamInfo */
226 /* */
227 /* We make these things a separate structure of information */
228 /* primarily so we can modify it without altering the size of */
229 /* the GDALPamDataset. It is an effort to reduce ABI churn for */
230 /* driver plugins. */
231 /* ==================================================================== */
232 struct GDALRasterBandPamInfo
233 {
234  GDALPamDataset *poParentDS = nullptr;
235 
236  bool bNoDataValueSet = false;
237  bool bNoDataValueSetAsInt64 = false;
238  bool bNoDataValueSetAsUInt64 = false;
239 
240  double dfNoDataValue = GDAL_PAM_DEFAULT_NODATA_VALUE;
241  int64_t nNoDataValueInt64 = GDAL_PAM_DEFAULT_NODATA_VALUE_INT64;
242  uint64_t nNoDataValueUInt64 = GDAL_PAM_DEFAULT_NODATA_VALUE_UINT64;
243 
244  GDALColorTable *poColorTable = nullptr;
245 
246  GDALColorInterp eColorInterp = GCI_Undefined;
247 
248  char *pszUnitType = nullptr;
249  char **papszCategoryNames = nullptr;
250 
251  double dfOffset = 0.0;
252  double dfScale = 1.0;
253 
254  int bHaveMinMax = FALSE;
255  double dfMin = 0;
256  double dfMax = 0;
257 
258  int bHaveStats = FALSE;
259  double dfMean = 0;
260  double dfStdDev = 0;
261 
262  CPLXMLNode *psSavedHistograms = nullptr;
263 
264  GDALRasterAttributeTable *poDefaultRAT = nullptr;
265 
266  bool bOffsetSet = false;
267  bool bScaleSet = false;
268 };
270 /* ******************************************************************** */
271 /* GDALPamRasterBand */
272 /* ******************************************************************** */
273 
275 class CPL_DLL GDALPamRasterBand : public GDALRasterBand
276 {
277  friend class GDALPamDataset;
278 
279  protected:
281  virtual CPLXMLNode *SerializeToXML(const char *pszVRTPath);
282  virtual CPLErr XMLInit(CPLXMLNode *, const char *);
283 
284  void PamInitialize();
285  void PamClear();
286  void PamInitializeNoParent();
287  void MarkPamDirty();
288 
289  GDALRasterBandPamInfo *psPam = nullptr;
291 
292  public:
295  explicit GDALPamRasterBand(int bForceCachedIO);
297  ~GDALPamRasterBand() override;
298 
299  void SetDescription(const char *) override;
300 
301  CPLErr SetNoDataValue(double) override;
302  CPLErr SetNoDataValueAsInt64(int64_t nNoData) override;
303  CPLErr SetNoDataValueAsUInt64(uint64_t nNoData) override;
304  double GetNoDataValue(int *pbSuccess = nullptr) override;
305  int64_t GetNoDataValueAsInt64(int *pbSuccess = nullptr) override;
306  uint64_t GetNoDataValueAsUInt64(int *pbSuccess = nullptr) override;
307  CPLErr DeleteNoDataValue() override;
308 
309  CPLErr SetColorTable(GDALColorTable *) override;
310  GDALColorTable *GetColorTable() override;
311 
314 
315  const char *GetUnitType() override;
316  CPLErr SetUnitType(const char *) override;
317 
318  char **GetCategoryNames() override;
319  CPLErr SetCategoryNames(char **) override;
320 
321  double GetOffset(int *pbSuccess = nullptr) override;
322  CPLErr SetOffset(double) override;
323  double GetScale(int *pbSuccess = nullptr) override;
324  CPLErr SetScale(double) override;
325 
326  CPLErr GetHistogram(double dfMin, double dfMax, int nBuckets,
327  GUIntBig *panHistogram, int bIncludeOutOfRange,
328  int bApproxOK, GDALProgressFunc,
329  void *pProgressData) override;
330 
331  CPLErr GetDefaultHistogram(double *pdfMin, double *pdfMax, int *pnBuckets,
332  GUIntBig **ppanHistogram, int bForce,
333  GDALProgressFunc, void *pProgressData) override;
334 
335  CPLErr SetDefaultHistogram(double dfMin, double dfMax, int nBuckets,
336  GUIntBig *panHistogram) override;
337 
338  CPLErr SetMetadata(char **papszMetadata,
339  const char *pszDomain = "") override;
340  CPLErr SetMetadataItem(const char *pszName, const char *pszValue,
341  const char *pszDomain = "") override;
342 
345 
347  // new in GDALPamRasterBand.
348  virtual CPLErr CloneInfo(GDALRasterBand *poSrcBand, int nCloneInfoFlags);
349 
350  // "semi private" methods.
351  GDALRasterBandPamInfo *GetPamInfo()
352  {
353  return psPam;
354  }
356  private:
358 
359  void ResetNoDataValues();
360 };
361 
363 
364 /* ******************************************************************** */
365 /* GDALPamMultiDim */
366 /* ******************************************************************** */
367 
371 class CPL_DLL GDALPamMultiDim
372 {
373  struct Private;
374  std::unique_ptr<Private> d;
375 
376  void Load();
377  void Save();
378 
379  public:
380  explicit GDALPamMultiDim(const std::string &osFilename);
381  virtual ~GDALPamMultiDim();
382 
383  std::shared_ptr<OGRSpatialReference>
384  GetSpatialRef(const std::string &osArrayFullName);
385 
386  void SetSpatialRef(const std::string &osArrayFullName,
387  const OGRSpatialReference *poSRS);
388 
389  CPLErr GetStatistics(const std::string &osArrayFullName, bool bApproxOK,
390  double *pdfMin, double *pdfMax, double *pdfMean,
391  double *pdfStdDev, GUInt64 *pnValidCount);
392 
393  void SetStatistics(const std::string &osArrayFullName, bool bApproxStats,
394  double dfMin, double dfMax, double dfMean,
395  double dfStdDev, GUInt64 nValidCount);
396 
397  void ClearStatistics();
398 
399  void ClearStatistics(const std::string &osArrayFullName);
400 };
401 
402 /* ******************************************************************** */
403 /* GDALPamMDArray */
404 /* ******************************************************************** */
405 
407 class CPL_DLL GDALPamMDArray : public GDALMDArray
408 {
409  std::shared_ptr<GDALPamMultiDim> m_poPam;
410 
411  protected:
412  GDALPamMDArray(const std::string &osParentName, const std::string &osName,
413  const std::shared_ptr<GDALPamMultiDim> &poPam);
414 
415  bool SetStatistics(bool bApproxStats, double dfMin, double dfMax,
416  double dfMean, double dfStdDev,
417  GUInt64 nValidCount) override;
418 
419  public:
420  const std::shared_ptr<GDALPamMultiDim> &GetPAM() const
421  {
422  return m_poPam;
423  }
424 
425  CPLErr GetStatistics(bool bApproxOK, bool bForce, double *pdfMin,
426  double *pdfMax, double *pdfMean, double *padfStdDev,
427  GUInt64 *pnValidCount, GDALProgressFunc pfnProgress,
428  void *pProgressData) override;
429 
430  void ClearStatistics() override;
431 
432  bool SetSpatialRef(const OGRSpatialReference *poSRS) override;
433 
434  std::shared_ptr<OGRSpatialReference> GetSpatialRef() const override;
435 };
436 
437 // These are mainly helper functions for internal use.
438 int CPL_DLL PamParseHistogram(CPLXMLNode *psHistItem, double *pdfMin,
439  double *pdfMax, int *pnBuckets,
440  GUIntBig **ppanHistogram,
441  int *pbIncludeOutOfRange, int *pbApproxOK);
442 CPLXMLNode CPL_DLL *PamFindMatchingHistogram(CPLXMLNode *psSavedHistograms,
443  double dfMin, double dfMax,
444  int nBuckets,
445  int bIncludeOutOfRange,
446  int bApproxOK);
447 CPLXMLNode CPL_DLL *PamHistogramToXMLTree(double dfMin, double dfMax,
448  int nBuckets, GUIntBig *panHistogram,
449  int bIncludeOutOfRange, int bApprox);
450 
451 // For managing the proxy file database.
452 const char CPL_DLL *PamGetProxy(const char *);
453 const char CPL_DLL *PamAllocateProxy(const char *);
454 const char CPL_DLL *PamDeallocateProxy(const char *);
455 void CPL_DLL PamCleanProxyDB(void);
456 
458 
459 #endif /* ndef GDAL_PAM_H_INCLUDED */
GDALRasterBand::SetNoDataValue
virtual CPLErr SetNoDataValue(double dfNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:1875
GDALMDArray::GetSpatialRef
virtual std::shared_ptr< OGRSpatialReference > GetSpatialRef() const
Return the spatial reference system object associated with the array.
Definition: gdalmultidim.cpp:2262
GDALRasterBand::GetColorTable
virtual GDALColorTable * GetColorTable()
Fetch the color table associated with band.
Definition: gdalrasterband.cpp:2424
GUInt64
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition: cpl_port.h:258
GDALRasterBand::GetUnitType
virtual const char * GetUnitType()
Return raster unit type.
Definition: gdalrasterband.cpp:3005
GDALRasterBand::DeleteNoDataValue
virtual CPLErr DeleteNoDataValue()
Remove the no data value for this band.
Definition: gdalrasterband.cpp:2077
GDALRasterBand::GetOffset
virtual double GetOffset(int *pbSuccess=nullptr)
Fetch the raster value offset.
Definition: gdalrasterband.cpp:2804
GDALRasterBand::SetColorTable
virtual CPLErr SetColorTable(GDALColorTable *poCT)
Set the raster color table.
Definition: gdalrasterband.cpp:2473
GDALRasterBand::GetDefaultHistogram
virtual CPLErr GetDefaultHistogram(double *pdfMin, double *pdfMax, int *pnBuckets, GUIntBig **ppanHistogram, int bForce, GDALProgressFunc, void *pProgressData)
Fetch default raster histogram.
Definition: gdalrasterband.cpp:3969
GDALMDArray::GetStatistics
virtual CPLErr GetStatistics(bool bApproxOK, bool bForce, double *pdfMin, double *pdfMax, double *pdfMean, double *padfStdDev, GUInt64 *pnValidCount, GDALProgressFunc pfnProgress, void *pProgressData)
Fetch statistics.
Definition: gdalmultidim.cpp:8132
GDALPamDataset
PAM dataset.
Definition: gdal_pam.h:117
cpl_minixml.h
GDALPamRasterBand
PAM raster band.
Definition: gdal_pam.h:275
OGRSpatialReference
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:166
GDALRasterBand::SetDefaultHistogram
virtual CPLErr SetDefaultHistogram(double dfMin, double dfMax, int nBuckets, GUIntBig *panHistogram)
Set default histogram.
Definition: gdalrasterband.cpp:6791
GDALRasterBand::SetUnitType
virtual CPLErr SetUnitType(const char *pszNewValue)
Set unit type.
Definition: gdalrasterband.cpp:3053
GDALRasterBand::GetColorInterpretation
virtual GDALColorInterp GetColorInterpretation()
How should this band be interpreted as color?
Definition: gdalrasterband.cpp:2335
GDALRasterBand::GetCategoryNames
virtual char ** GetCategoryNames()
Fetch the list of category names for this raster.
Definition: gdalrasterband.cpp:1586
GDALColorInterp
GDALColorInterp
Definition: gdal.h:226
GDALMajorObject::SetDescription
virtual void SetDescription(const char *)
Set object description.
Definition: gdalmajorobject.cpp:118
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:311
GDALRasterBand
A single raster band (or channel).
Definition: gdal_priv.h:1269
GDALDataset::GetMetadata
void static void char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
Definition: gdaldataset.cpp:4280
CPLXMLNode
Document node structure.
Definition: cpl_minixml.h:69
GDALMajorObject::GetMetadataItem
virtual const char * GetMetadataItem(const char *pszName, const char *pszDomain="")
Fetch single metadata item.
Definition: gdalmajorobject.cpp:341
GDALDataset::SetGCPs
virtual CPLErr SetGCPs(int nGCPCount, const GDAL_GCP *pasGCPList, const OGRSpatialReference *poGCP_SRS)
Assign GCPs.
Definition: gdaldataset.cpp:1874
GDALDataset::GetGCPs
virtual const GDAL_GCP * GetGCPs()
Fetch GCPs.
Definition: gdaldataset.cpp:1767
GDALDataset
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:347
GDALRasterBand::SetNoDataValueAsInt64
virtual CPLErr SetNoDataValueAsInt64(int64_t nNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:1947
GDALMDArray
Class modeling a multi-dimensional array.
Definition: gdal_priv.h:2697
GDALRasterBand::SetDefaultRAT
virtual CPLErr SetDefaultRAT(const GDALRasterAttributeTable *poRAT)
Set default Raster Attribute Table.
Definition: gdalrasterband.cpp:6938
GDALMDArray::SetSpatialRef
virtual bool SetSpatialRef(const OGRSpatialReference *poSRS)
Assign a spatial reference system object to the array.
Definition: gdalmultidim.cpp:2248
GDALDataset::ClearStatistics
virtual void ClearStatistics()
Clear statistics.
Definition: gdaldataset.cpp:8500
CSLConstList
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1195
GUIntBig
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:238
GDALDataset::GetGCPSpatialRef
virtual const OGRSpatialReference * GetGCPSpatialRef() const
Get output spatial reference system for GCPs.
Definition: gdaldataset.cpp:1710
GDALDataset::SetSpatialRef
virtual CPLErr SetSpatialRef(const OGRSpatialReference *poSRS)
Set the spatial reference system for this dataset.
Definition: gdaldataset.cpp:1165
GDAL_GCP
Ground Control Point.
Definition: gdal.h:1036
GDALDataset::GetGCPCount
virtual int GetGCPCount()
Get number of GCPs.
Definition: gdaldataset.cpp:1625
GCI_Undefined
@ GCI_Undefined
Definition: gdal.h:228
GDALRasterBand::SetScale
virtual CPLErr SetScale(double dfNewScale)
Set scaling ratio.
Definition: gdalrasterband.cpp:2959
GDALRasterBand::GetNoDataValue
virtual double GetNoDataValue(int *pbSuccess=nullptr)
Fetch the no data value for this band.
Definition: gdalrasterband.cpp:1690
GDALRasterBand::GetNoDataValueAsInt64
virtual int64_t GetNoDataValueAsInt64(int *pbSuccess=nullptr)
Fetch the no data value for this band.
Definition: gdalrasterband.cpp:1746
gdal_priv.h
GDALRasterBand::SetNoDataValueAsUInt64
virtual CPLErr SetNoDataValueAsUInt64(uint64_t nNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:2019
GDALDataset::GetSpatialRef
virtual const OGRSpatialReference * GetSpatialRef() const
Fetch the spatial reference for this dataset.
Definition: gdaldataset.cpp:1060
GDALDataset::SetGeoTransform
virtual CPLErr SetGeoTransform(double *padfTransform)
Set the affine transformation coefficients.
Definition: gdaldataset.cpp:1298
GDALDataset::GetFileList
virtual char ** GetFileList(void)
Fetch files forming dataset.
Definition: gdaldataset.cpp:3058
GDALRasterBand::GetDefaultRAT
virtual GDALRasterAttributeTable * GetDefaultRAT()
Fetch default Raster Attribute Table.
Definition: gdalrasterband.cpp:6889
GDALRasterBand::GetScale
virtual double GetScale(int *pbSuccess=nullptr)
Fetch the raster value scale.
Definition: gdalrasterband.cpp:2910
GDALRasterBand::SetColorInterpretation
virtual CPLErr SetColorInterpretation(GDALColorInterp eColorInterp)
Set color interpretation of a band.
Definition: gdalrasterband.cpp:2379
GDALDataset::SetMetadataItem
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain) override
Set single metadata item.
CPLErr
CPLErr
Error category.
Definition: cpl_error.h:52
GDALDataset::SetMetadata
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain) override
Set metadata.
GDALRasterBand::SetCategoryNames
virtual CPLErr SetCategoryNames(char **papszNames)
Set the category names for this band.
Definition: gdalrasterband.cpp:1634
GDALRasterBand::GetHistogram
virtual CPLErr GetHistogram(double dfMin, double dfMax, int nBuckets, GUIntBig *panHistogram, int bIncludeOutOfRange, int bApproxOK, GDALProgressFunc, void *pProgressData)
Compute raster histogram.
Definition: gdalrasterband.cpp:3306
GDALDataset::GetGeoTransform
virtual CPLErr GetGeoTransform(double *padfTransform)
Fetch the affine transformation coefficients.
Definition: gdaldataset.cpp:1244
GDALRasterBand::SetMetadata
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain) override
GDALRasterAttributeTable
Definition: gdal_rat.h:47
GDALRasterBand::SetMetadataItem
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain) override
GDALRasterBand::SetOffset
virtual CPLErr SetOffset(double dfNewOffset)
Set scaling offset.
Definition: gdalrasterband.cpp:2853
CPL_DISALLOW_COPY_ASSIGN
#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:1051
GDALRasterBand::GetNoDataValueAsUInt64
virtual uint64_t GetNoDataValueAsUInt64(int *pbSuccess=nullptr)
Fetch the no data value for this band.
Definition: gdalrasterband.cpp:1807
GDALColorTable
A color table / palette.
Definition: gdal_priv.h:1120
GDALDataset::FlushCache
virtual CPLErr FlushCache(bool bAtClosing=false)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:519
GDALMDArray::ClearStatistics
virtual void ClearStatistics()
Clear statistics.
Definition: gdalmultidim.cpp:8372