30 #ifndef GDAL_PAM_H_INCLUDED 31 #define GDAL_PAM_H_INCLUDED 33 #include "gdal_priv.h" 39 #define GCIF_GEOTRANSFORM 0x01 40 #define GCIF_PROJECTION 0x02 41 #define GCIF_METADATA 0x04 42 #define GCIF_GCPS 0x08 44 #define GCIF_NODATA 0x001000 45 #define GCIF_CATEGORYNAMES 0x002000 46 #define GCIF_MINMAX 0x004000 47 #define GCIF_SCALEOFFSET 0x008000 48 #define GCIF_UNITTYPE 0x010000 49 #define GCIF_COLORTABLE 0x020000 50 #define GCIF_COLORINTERP 0x020000 51 #define GCIF_BAND_METADATA 0x040000 52 #define GCIF_RAT 0x080000 53 #define GCIF_MASK 0x100000 54 #define GCIF_BAND_DESCRIPTION 0x200000 56 #define GCIF_ONLY_IF_MISSING 0x10000000 57 #define GCIF_PROCESS_BANDS 0x20000000 59 #define GCIF_PAM_DEFAULT (GCIF_GEOTRANSFORM | GCIF_PROJECTION | \ 60 GCIF_METADATA | GCIF_GCPS | \ 61 GCIF_NODATA | GCIF_CATEGORYNAMES | \ 62 GCIF_MINMAX | GCIF_SCALEOFFSET | \ 63 GCIF_UNITTYPE | GCIF_COLORTABLE | \ 64 GCIF_COLORINTERP | GCIF_BAND_METADATA | \ 65 GCIF_RAT | GCIF_MASK | \ 66 GCIF_ONLY_IF_MISSING | GCIF_PROCESS_BANDS|\ 67 GCIF_BAND_DESCRIPTION) 71 #define GPF_DIRTY 0x01 // .pam file needs to be written on close 72 #define GPF_TRIED_READ_FAILED 0x02 // no need to keep trying to read .pam. 73 #define GPF_DISABLED 0x04 // do not try any PAM stuff. 74 #define GPF_AUXMODE 0x08 // store info in .aux (HFA) file. 75 #define GPF_NOSAVE 0x10 // do not try to save pam info. 92 int bHaveGeoTransform;
93 double adfGeoTransform[6];
97 char *pszGCPProjection;
115 int IsPamFilenameAPotentialSiblingFile();
123 virtual CPLXMLNode *SerializeToXML(
const char *);
124 virtual CPLErr XMLInit(
CPLXMLNode *,
const char * );
126 virtual CPLErr TryLoadXML(
char **papszSiblingFiles = NULL);
127 virtual CPLErr TrySaveXML();
129 CPLErr TryLoadAux(
char **papszSiblingFiles = NULL);
132 virtual const char *BuildPamFilename();
134 void PamInitialize();
137 void SetPhysicalFilename(
const char * );
138 const char *GetPhysicalFilename();
139 void SetSubdatasetName(
const char *);
140 const char *GetSubdatasetName();
147 virtual const char *GetProjectionRef(
void);
148 virtual CPLErr SetProjection(
const char * );
150 virtual CPLErr GetGeoTransform(
double * );
151 virtual CPLErr SetGeoTransform(
double * );
153 virtual int GetGCPCount();
154 virtual const char *GetGCPProjection();
156 virtual CPLErr SetGCPs(
int nGCPCount,
const GDAL_GCP *pasGCPList,
157 const char *pszGCPProjection );
160 const char * pszDomain =
"" );
162 const char * pszValue,
163 const char * pszDomain =
"" );
164 virtual char **
GetMetadata(
const char * pszDomain =
"" );
166 const char * pszDomain =
"" );
168 virtual char **GetFileList(
void);
170 virtual CPLErr CloneInfo(
GDALDataset *poSrcDS,
int nCloneInfoFlags );
172 virtual CPLErr IBuildOverviews(
const char *pszResampling,
173 int nOverviews,
int *panOverviewList,
174 int nListBands,
int *panBandList,
175 GDALProgressFunc pfnProgress,
176 void * pProgressData );
180 void MarkPamDirty() { nPamFlags |= GPF_DIRTY; }
182 int GetPamFlags() {
return nPamFlags; }
183 void SetPamFlags(
int nValue ) { nPamFlags = nValue; }
198 double dfNoDataValue;
205 char **papszCategoryNames;
233 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
234 virtual CPLErr XMLInit(
CPLXMLNode *,
const char * );
236 void PamInitialize();
247 virtual CPLErr SetNoDataValue(
double );
248 virtual double GetNoDataValue(
int *pbSuccess = NULL );
256 virtual const char *GetUnitType();
257 CPLErr SetUnitType(
const char * );
259 virtual char **GetCategoryNames();
260 virtual CPLErr SetCategoryNames(
char ** );
262 virtual double GetOffset(
int *pbSuccess = NULL );
263 CPLErr SetOffset(
double );
264 virtual double GetScale(
int *pbSuccess = NULL );
265 CPLErr SetScale(
double );
267 virtual CPLErr GetHistogram(
double dfMin,
double dfMax,
268 int nBuckets, GUIntBig * panHistogram,
269 int bIncludeOutOfRange,
int bApproxOK,
270 GDALProgressFunc,
void *pProgressData );
272 virtual CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
273 int *pnBuckets, GUIntBig ** ppanHistogram,
275 GDALProgressFunc,
void *pProgressData);
277 virtual CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
278 int nBuckets, GUIntBig *panHistogram );
281 const char * pszDomain =
"" );
283 const char * pszValue,
284 const char * pszDomain =
"" );
290 virtual CPLErr CloneInfo(
GDALRasterBand *poSrcBand,
int nCloneInfoFlags );
297 int CPL_DLL PamParseHistogram(
CPLXMLNode *psHistItem,
298 double *pdfMin,
double *pdfMax,
299 int *pnBuckets, GUIntBig **ppanHistogram,
300 int *pbIncludeOutOfRange,
int *pbApproxOK );
302 PamFindMatchingHistogram(
CPLXMLNode *psSavedHistograms,
303 double dfMin,
double dfMax,
int nBuckets,
304 int bIncludeOutOfRange,
int bApproxOK );
306 PamHistogramToXMLTree(
double dfMin,
double dfMax,
307 int nBuckets, GUIntBig * panHistogram,
308 int bIncludeOutOfRange,
int bApprox );
311 const char CPL_DLL * PamGetProxy(
const char * );
312 const char CPL_DLL * PamAllocateProxy(
const char * );
313 const char CPL_DLL * PamDeallocateProxy(
const char * );
314 void CPL_DLL PamCleanProxyDB(
void );
The GDALRasterAttributeTable (or RAT) class is used to encapsulate a table used to provide attribute ...
Definition: gdal_rat.h:46
Definition: gdal_pam.h:194
Document node structure.
Definition: cpl_minixml.h:65
virtual CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain="")
Set single metadata item.
Definition: gdalpamdataset.cpp:1237
virtual void SetDescription(const char *)
Set object description.
Definition: gdalmajorobject.cpp:116
virtual CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain="")
Set single metadata item.
Definition: gdalpamrasterband.cpp:654
Definition: gdal_pam.h:85
virtual char ** GetMetadata(const char *pszDomain="")
Fetch metadata.
Definition: gdalmajorobject.cpp:243
Convenient string class based on std::string.
Definition: cpl_string.h:236
virtual CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="")
Set metadata.
Definition: gdalpamrasterband.cpp:638
virtual CPLErr FlushCache()
Flush raster data cache.
Definition: gdalrasterband.cpp:913
virtual const char * GetMetadataItem(const char *pszName, const char *pszDomain="")
Fetch single metadata item.
Definition: gdalmajorobject.cpp:331
Definition: gdal_pam.h:227
virtual CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="")
Set metadata.
Definition: gdalpamdataset.cpp:1218
A subclass of GDALDataset which introduces the ability to save and restore auxiliary information (coo...
Definition: gdal_pam.h:110
A single raster band (or channel).
Definition: gdal_priv.h:611
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:276
GDALColorInterp
Definition: gdal.h:170
Definition: gdal_priv.h:582
Ground Control Point.
Definition: gdal.h:442