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 osDerivedDatasetName{};
107  CPLString osAuxFilename{};
108 
109  int bHasMetadata = false;
110 };
112 
113 /* ******************************************************************** */
114 /* GDALPamDataset */
115 /* ******************************************************************** */
116 
118 class CPL_DLL GDALPamDataset : public GDALDataset
119 {
120  friend class GDALPamRasterBand;
121 
122  private:
123  int IsPamFilenameAPotentialSiblingFile();
124 
125  protected:
126  GDALPamDataset(void);
128  int nPamFlags = 0;
129  GDALDatasetPamInfo *psPam = nullptr;
130 
131  virtual CPLXMLNode *SerializeToXML(const char *);
132  virtual CPLErr XMLInit(CPLXMLNode *, const char *);
133 
134  virtual CPLErr TryLoadXML(char **papszSiblingFiles = nullptr);
135  virtual CPLErr TrySaveXML();
136 
137  CPLErr TryLoadAux(char **papszSiblingFiles = nullptr);
138  CPLErr TrySaveAux();
139 
140  virtual const char *BuildPamFilename();
141 
142  void PamInitialize();
143  void PamClear();
144 
145  void SetPhysicalFilename(const char *);
146  const char *GetPhysicalFilename();
147  void SetSubdatasetName(const char *);
148  const char *GetSubdatasetName();
149  void SetDerivedDatasetName(const char *);
151 
152  public:
153  ~GDALPamDataset() override;
154 
155  CPLErr FlushCache(bool bAtClosing) override;
156 
157  const OGRSpatialReference *GetSpatialRef() const override;
158  CPLErr SetSpatialRef(const OGRSpatialReference *poSRS) override;
159 
160  CPLErr GetGeoTransform(double *) override;
161  CPLErr SetGeoTransform(double *) override;
162  void DeleteGeoTransform();
163 
164  int GetGCPCount() override;
165  const OGRSpatialReference *GetGCPSpatialRef() const override;
166  const GDAL_GCP *GetGCPs() override;
167  using GDALDataset::SetGCPs;
168  CPLErr SetGCPs(int nGCPCount, const GDAL_GCP *pasGCPList,
169  const OGRSpatialReference *poSRS) override;
170 
171  CPLErr SetMetadata(char **papszMetadata,
172  const char *pszDomain = "") override;
173  CPLErr SetMetadataItem(const char *pszName, const char *pszValue,
174  const char *pszDomain = "") override;
175  char **GetMetadata(const char *pszDomain = "") override;
176  const char *GetMetadataItem(const char *pszName,
177  const char *pszDomain = "") override;
178 
179  char **GetFileList(void) override;
180 
181  void ClearStatistics() override;
182 
184  virtual CPLErr CloneInfo(GDALDataset *poSrcDS, int nCloneInfoFlags);
185 
186  CPLErr IBuildOverviews(const char *pszResampling, int nOverviews,
187  const int *panOverviewList, int nListBands,
188  const int *panBandList, GDALProgressFunc pfnProgress,
189  void *pProgressData,
190  CSLConstList papszOptions) override;
191 
192  // "semi private" methods.
193  void MarkPamDirty();
194  GDALDatasetPamInfo *GetPamInfo()
195  {
196  return psPam;
197  }
198  int GetPamFlags()
199  {
200  return nPamFlags;
201  }
202  void SetPamFlags(int nValue)
203  {
204  nPamFlags = nValue;
205  }
207 
208  private:
210 };
211 
213 
214 constexpr double GDAL_PAM_DEFAULT_NODATA_VALUE = 0;
215 // Parenthesis for external code around std::numeric_limits<>::min/max,
216 // for external Windows code that might have includes <windows.h> before
217 // without defining NOMINMAX
218 constexpr int64_t GDAL_PAM_DEFAULT_NODATA_VALUE_INT64 =
219  (std::numeric_limits<int64_t>::min)();
220 constexpr uint64_t GDAL_PAM_DEFAULT_NODATA_VALUE_UINT64 =
221  (std::numeric_limits<uint64_t>::max)();
222 
223 /* ==================================================================== */
224 /* GDALRasterBandPamInfo */
225 /* */
226 /* We make these things a separate structure of information */
227 /* primarily so we can modify it without altering the size of */
228 /* the GDALPamDataset. It is an effort to reduce ABI churn for */
229 /* driver plugins. */
230 /* ==================================================================== */
231 struct GDALRasterBandPamInfo
232 {
233  GDALPamDataset *poParentDS = nullptr;
234 
235  bool bNoDataValueSet = false;
236  bool bNoDataValueSetAsInt64 = false;
237  bool bNoDataValueSetAsUInt64 = false;
238 
239  double dfNoDataValue = GDAL_PAM_DEFAULT_NODATA_VALUE;
240  int64_t nNoDataValueInt64 = GDAL_PAM_DEFAULT_NODATA_VALUE_INT64;
241  uint64_t nNoDataValueUInt64 = GDAL_PAM_DEFAULT_NODATA_VALUE_UINT64;
242 
243  GDALColorTable *poColorTable = nullptr;
244 
245  GDALColorInterp eColorInterp = GCI_Undefined;
246 
247  char *pszUnitType = nullptr;
248  char **papszCategoryNames = nullptr;
249 
250  double dfOffset = 0.0;
251  double dfScale = 1.0;
252 
253  int bHaveMinMax = FALSE;
254  double dfMin = 0;
255  double dfMax = 0;
256 
257  int bHaveStats = FALSE;
258  double dfMean = 0;
259  double dfStdDev = 0;
260 
261  CPLXMLNode *psSavedHistograms = nullptr;
262 
263  GDALRasterAttributeTable *poDefaultRAT = nullptr;
264 
265  bool bOffsetSet = false;
266  bool bScaleSet = false;
267 };
269 /* ******************************************************************** */
270 /* GDALPamRasterBand */
271 /* ******************************************************************** */
272 
274 class CPL_DLL GDALPamRasterBand : public GDALRasterBand
275 {
276  friend class GDALPamDataset;
277 
278  protected:
280  virtual CPLXMLNode *SerializeToXML(const char *pszVRTPath);
281  virtual CPLErr XMLInit(CPLXMLNode *, const char *);
282 
283  void PamInitialize();
284  void PamClear();
285  void PamInitializeNoParent();
286  void MarkPamDirty();
287 
288  GDALRasterBandPamInfo *psPam = nullptr;
290 
291  public:
294  explicit GDALPamRasterBand(int bForceCachedIO);
296  ~GDALPamRasterBand() override;
297 
298  void SetDescription(const char *) override;
299 
300  CPLErr SetNoDataValue(double) override;
301  CPLErr SetNoDataValueAsInt64(int64_t nNoData) override;
302  CPLErr SetNoDataValueAsUInt64(uint64_t nNoData) override;
303  double GetNoDataValue(int *pbSuccess = nullptr) override;
304  int64_t GetNoDataValueAsInt64(int *pbSuccess = nullptr) override;
305  uint64_t GetNoDataValueAsUInt64(int *pbSuccess = nullptr) override;
306  CPLErr DeleteNoDataValue() override;
307 
308  CPLErr SetColorTable(GDALColorTable *) override;
309  GDALColorTable *GetColorTable() override;
310 
313 
314  const char *GetUnitType() override;
315  CPLErr SetUnitType(const char *) override;
316 
317  char **GetCategoryNames() override;
318  CPLErr SetCategoryNames(char **) override;
319 
320  double GetOffset(int *pbSuccess = nullptr) override;
321  CPLErr SetOffset(double) override;
322  double GetScale(int *pbSuccess = nullptr) override;
323  CPLErr SetScale(double) override;
324 
325  CPLErr GetHistogram(double dfMin, double dfMax, int nBuckets,
326  GUIntBig *panHistogram, int bIncludeOutOfRange,
327  int bApproxOK, GDALProgressFunc,
328  void *pProgressData) override;
329 
330  CPLErr GetDefaultHistogram(double *pdfMin, double *pdfMax, int *pnBuckets,
331  GUIntBig **ppanHistogram, int bForce,
332  GDALProgressFunc, void *pProgressData) override;
333 
334  CPLErr SetDefaultHistogram(double dfMin, double dfMax, int nBuckets,
335  GUIntBig *panHistogram) override;
336 
337  CPLErr SetMetadata(char **papszMetadata,
338  const char *pszDomain = "") override;
339  CPLErr SetMetadataItem(const char *pszName, const char *pszValue,
340  const char *pszDomain = "") override;
341 
344 
346  // new in GDALPamRasterBand.
347  virtual CPLErr CloneInfo(GDALRasterBand *poSrcBand, int nCloneInfoFlags);
348 
349  // "semi private" methods.
350  GDALRasterBandPamInfo *GetPamInfo()
351  {
352  return psPam;
353  }
355  private:
357 
358  void ResetNoDataValues();
359 };
360 
362 
363 /* ******************************************************************** */
364 /* GDALPamMultiDim */
365 /* ******************************************************************** */
366 
370 class CPL_DLL GDALPamMultiDim
371 {
372  struct Private;
373  std::unique_ptr<Private> d;
374 
375  void Load();
376  void Save();
377 
378  public:
379  explicit GDALPamMultiDim(const std::string &osFilename);
380  virtual ~GDALPamMultiDim();
381 
382  std::shared_ptr<OGRSpatialReference>
383  GetSpatialRef(const std::string &osArrayFullName,
384  const std::string &osContext);
385 
386  void SetSpatialRef(const std::string &osArrayFullName,
387  const std::string &osContext,
388  const OGRSpatialReference *poSRS);
389 
390  CPLErr GetStatistics(const std::string &osArrayFullName,
391  const std::string &osContext, bool bApproxOK,
392  double *pdfMin, double *pdfMax, double *pdfMean,
393  double *pdfStdDev, GUInt64 *pnValidCount);
394 
395  void SetStatistics(const std::string &osArrayFullName,
396  const std::string &osContext, bool bApproxStats,
397  double dfMin, double dfMax, double dfMean,
398  double dfStdDev, GUInt64 nValidCount);
399 
400  void ClearStatistics();
401 
402  void ClearStatistics(const std::string &osArrayFullName,
403  const std::string &osContext);
404 
405  static std::shared_ptr<GDALPamMultiDim>
406  GetPAM(const std::shared_ptr<GDALMDArray> &poParent);
407 };
408 
409 /* ******************************************************************** */
410 /* GDALPamMDArray */
411 /* ******************************************************************** */
412 
414 class CPL_DLL GDALPamMDArray : public GDALMDArray
415 {
416  std::shared_ptr<GDALPamMultiDim> m_poPam;
417 
418  protected:
419  GDALPamMDArray(const std::string &osParentName, const std::string &osName,
420  const std::shared_ptr<GDALPamMultiDim> &poPam,
421  const std::string &osContext = std::string());
422 
423  bool SetStatistics(bool bApproxStats, double dfMin, double dfMax,
424  double dfMean, double dfStdDev, GUInt64 nValidCount,
425  CSLConstList papszOptions) override;
426 
427  public:
428  const std::shared_ptr<GDALPamMultiDim> &GetPAM() const
429  {
430  return m_poPam;
431  }
432 
433  CPLErr GetStatistics(bool bApproxOK, bool bForce, double *pdfMin,
434  double *pdfMax, double *pdfMean, double *padfStdDev,
435  GUInt64 *pnValidCount, GDALProgressFunc pfnProgress,
436  void *pProgressData) override;
437 
438  void ClearStatistics() override;
439 
440  bool SetSpatialRef(const OGRSpatialReference *poSRS) override;
441 
442  std::shared_ptr<OGRSpatialReference> GetSpatialRef() const override;
443 };
444 
445 // These are mainly helper functions for internal use.
446 int CPL_DLL PamParseHistogram(CPLXMLNode *psHistItem, double *pdfMin,
447  double *pdfMax, int *pnBuckets,
448  GUIntBig **ppanHistogram,
449  int *pbIncludeOutOfRange, int *pbApproxOK);
450 CPLXMLNode CPL_DLL *PamFindMatchingHistogram(CPLXMLNode *psSavedHistograms,
451  double dfMin, double dfMax,
452  int nBuckets,
453  int bIncludeOutOfRange,
454  int bApproxOK);
455 CPLXMLNode CPL_DLL *PamHistogramToXMLTree(double dfMin, double dfMax,
456  int nBuckets, GUIntBig *panHistogram,
457  int bIncludeOutOfRange, int bApprox);
458 
459 // For managing the proxy file database.
460 const char CPL_DLL *PamGetProxy(const char *);
461 const char CPL_DLL *PamAllocateProxy(const char *);
462 const char CPL_DLL *PamDeallocateProxy(const char *);
463 void CPL_DLL PamCleanProxyDB(void);
464 
466 
467 #endif /* ndef GDAL_PAM_H_INCLUDED */
GDALRasterBand::SetNoDataValue
virtual CPLErr SetNoDataValue(double dfNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:1911
GDALMDArray::GetSpatialRef
virtual std::shared_ptr< OGRSpatialReference > GetSpatialRef() const
Return the spatial reference system object associated with the array.
Definition: gdalmultidim.cpp:2574
GDALRasterBand::GetColorTable
virtual GDALColorTable * GetColorTable()
Fetch the color table associated with band.
Definition: gdalrasterband.cpp:2460
GUInt64
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition: cpl_port.h:249
GDALRasterBand::GetUnitType
virtual const char * GetUnitType()
Return raster unit type.
Definition: gdalrasterband.cpp:3041
GDALRasterBand::DeleteNoDataValue
virtual CPLErr DeleteNoDataValue()
Remove the no data value for this band.
Definition: gdalrasterband.cpp:2113
GDALRasterBand::GetOffset
virtual double GetOffset(int *pbSuccess=nullptr)
Fetch the raster value offset.
Definition: gdalrasterband.cpp:2840
GDALRasterBand::SetColorTable
virtual CPLErr SetColorTable(GDALColorTable *poCT)
Set the raster color table.
Definition: gdalrasterband.cpp:2509
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:4005
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:9422
GDALPamDataset
PAM dataset.
Definition: gdal_pam.h:118
cpl_minixml.h
GDALPamRasterBand
PAM raster band.
Definition: gdal_pam.h:274
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:6825
GDALRasterBand::SetUnitType
virtual CPLErr SetUnitType(const char *pszNewValue)
Set unit type.
Definition: gdalrasterband.cpp:3089
GDALRasterBand::GetColorInterpretation
virtual GDALColorInterp GetColorInterpretation()
How should this band be interpreted as color?
Definition: gdalrasterband.cpp:2371
GDALRasterBand::GetCategoryNames
virtual char ** GetCategoryNames()
Fetch the list of category names for this raster.
Definition: gdalrasterband.cpp:1622
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:1270
GDALDataset::GetMetadata
void static void char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
Definition: gdaldataset.cpp:4362
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:1914
GDALDataset::GetGCPs
virtual const GDAL_GCP * GetGCPs()
Fetch GCPs.
Definition: gdaldataset.cpp:1807
GDALDataset
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:348
GDALRasterBand::SetNoDataValueAsInt64
virtual CPLErr SetNoDataValueAsInt64(int64_t nNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:1983
GDALMDArray
Class modeling a multi-dimensional array.
Definition: gdal_priv.h:2836
GDALRasterBand::SetDefaultRAT
virtual CPLErr SetDefaultRAT(const GDALRasterAttributeTable *poRAT)
Set default Raster Attribute Table.
Definition: gdalrasterband.cpp:6972
GDALMDArray::SetSpatialRef
virtual bool SetSpatialRef(const OGRSpatialReference *poSRS)
Assign a spatial reference system object to the array.
Definition: gdalmultidim.cpp:2560
GDALDataset::ClearStatistics
virtual void ClearStatistics()
Clear statistics.
Definition: gdaldataset.cpp:8550
CSLConstList
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1178
GUIntBig
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:229
GDALDataset::GetGCPSpatialRef
virtual const OGRSpatialReference * GetGCPSpatialRef() const
Get output spatial reference system for GCPs.
Definition: gdaldataset.cpp:1750
GDALDataset::SetSpatialRef
virtual CPLErr SetSpatialRef(const OGRSpatialReference *poSRS)
Set the spatial reference system for this dataset.
Definition: gdaldataset.cpp:1202
GDAL_GCP
Ground Control Point.
Definition: gdal.h:1051
GDALDataset::GetGCPCount
virtual int GetGCPCount()
Get number of GCPs.
Definition: gdaldataset.cpp:1665
GCI_Undefined
@ GCI_Undefined
Definition: gdal.h:228
GDALRasterBand::SetScale
virtual CPLErr SetScale(double dfNewScale)
Set scaling ratio.
Definition: gdalrasterband.cpp:2995
GDALRasterBand::GetNoDataValue
virtual double GetNoDataValue(int *pbSuccess=nullptr)
Fetch the no data value for this band.
Definition: gdalrasterband.cpp:1726
GDALRasterBand::GetNoDataValueAsInt64
virtual int64_t GetNoDataValueAsInt64(int *pbSuccess=nullptr)
Fetch the no data value for this band.
Definition: gdalrasterband.cpp:1782
gdal_priv.h
GDALRasterBand::SetNoDataValueAsUInt64
virtual CPLErr SetNoDataValueAsUInt64(uint64_t nNoData)
Set the no data value for this band.
Definition: gdalrasterband.cpp:2055
GDALDataset::GetSpatialRef
virtual const OGRSpatialReference * GetSpatialRef() const
Fetch the spatial reference for this dataset.
Definition: gdaldataset.cpp:1097
GDALDataset::SetGeoTransform
virtual CPLErr SetGeoTransform(double *padfTransform)
Set the affine transformation coefficients.
Definition: gdaldataset.cpp:1335
GDALDataset::GetFileList
virtual char ** GetFileList(void)
Fetch files forming dataset.
Definition: gdaldataset.cpp:3117
GDALRasterBand::GetDefaultRAT
virtual GDALRasterAttributeTable * GetDefaultRAT()
Fetch default Raster Attribute Table.
Definition: gdalrasterband.cpp:6923
GDALRasterBand::GetScale
virtual double GetScale(int *pbSuccess=nullptr)
Fetch the raster value scale.
Definition: gdalrasterband.cpp:2946
GDALRasterBand::SetColorInterpretation
virtual CPLErr SetColorInterpretation(GDALColorInterp eColorInterp)
Set color interpretation of a band.
Definition: gdalrasterband.cpp:2415
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:1670
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:3342
GDALDataset::GetGeoTransform
virtual CPLErr GetGeoTransform(double *padfTransform)
Fetch the affine transformation coefficients.
Definition: gdaldataset.cpp:1281
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:2889
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:1042
GDALRasterBand::GetNoDataValueAsUInt64
virtual uint64_t GetNoDataValueAsUInt64(int *pbSuccess=nullptr)
Fetch the no data value for this band.
Definition: gdalrasterband.cpp:1843
GDALColorTable
A color table / palette.
Definition: gdal_priv.h:1121
GDALDataset::FlushCache
virtual CPLErr FlushCache(bool bAtClosing=false)
Flush all write cached data to disk.
Definition: gdaldataset.cpp:556
GDALMDArray::ClearStatistics
virtual void ClearStatistics()
Clear statistics.
Definition: gdalmultidim.cpp:9673