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;
113 int IsPamFilenameAPotentialSiblingFile();
121 virtual CPLXMLNode *SerializeToXML(
const char *);
122 virtual CPLErr XMLInit(
CPLXMLNode *,
const char * );
124 virtual CPLErr TryLoadXML(
char **papszSiblingFiles = NULL);
125 virtual CPLErr TrySaveXML();
127 CPLErr TryLoadAux(
char **papszSiblingFiles = NULL);
130 virtual const char *BuildPamFilename();
132 void PamInitialize();
135 void SetPhysicalFilename(
const char * );
136 const char *GetPhysicalFilename();
137 void SetSubdatasetName(
const char *);
138 const char *GetSubdatasetName();
145 virtual const char *GetProjectionRef(
void);
146 virtual CPLErr SetProjection(
const char * );
148 virtual CPLErr GetGeoTransform(
double * );
149 virtual CPLErr SetGeoTransform(
double * );
151 virtual int GetGCPCount();
152 virtual const char *GetGCPProjection();
154 virtual CPLErr SetGCPs(
int nGCPCount,
const GDAL_GCP *pasGCPList,
155 const char *pszGCPProjection );
158 const char * pszDomain =
"" );
160 const char * pszValue,
161 const char * pszDomain =
"" );
162 virtual char **
GetMetadata(
const char * pszDomain =
"" );
164 const char * pszDomain =
"" );
166 virtual char **GetFileList(
void);
168 virtual CPLErr CloneInfo(
GDALDataset *poSrcDS,
int nCloneInfoFlags );
170 virtual CPLErr IBuildOverviews(
const char *pszResampling,
171 int nOverviews,
int *panOverviewList,
172 int nListBands,
int *panBandList,
173 GDALProgressFunc pfnProgress,
174 void * pProgressData );
178 void MarkPamDirty() { nPamFlags |= GPF_DIRTY; }
180 int GetPamFlags() {
return nPamFlags; }
181 void SetPamFlags(
int nValue ) { nPamFlags = nValue; }
196 double dfNoDataValue;
203 char **papszCategoryNames;
231 virtual CPLXMLNode *SerializeToXML(
const char *pszVRTPath );
232 virtual CPLErr XMLInit(
CPLXMLNode *,
const char * );
234 void PamInitialize();
245 virtual CPLErr SetNoDataValue(
double );
246 virtual double GetNoDataValue(
int *pbSuccess = NULL );
254 virtual const char *GetUnitType();
255 CPLErr SetUnitType(
const char * );
257 virtual char **GetCategoryNames();
258 virtual CPLErr SetCategoryNames(
char ** );
260 virtual double GetOffset(
int *pbSuccess = NULL );
261 CPLErr SetOffset(
double );
262 virtual double GetScale(
int *pbSuccess = NULL );
263 CPLErr SetScale(
double );
265 virtual CPLErr GetHistogram(
double dfMin,
double dfMax,
266 int nBuckets,
int * panHistogram,
267 int bIncludeOutOfRange,
int bApproxOK,
268 GDALProgressFunc,
void *pProgressData );
270 virtual CPLErr GetDefaultHistogram(
double *pdfMin,
double *pdfMax,
271 int *pnBuckets,
int ** ppanHistogram,
273 GDALProgressFunc,
void *pProgressData);
275 virtual CPLErr SetDefaultHistogram(
double dfMin,
double dfMax,
276 int nBuckets,
int *panHistogram );
279 const char * pszDomain =
"" );
281 const char * pszValue,
282 const char * pszDomain =
"" );
288 virtual CPLErr CloneInfo(
GDALRasterBand *poSrcBand,
int nCloneInfoFlags );
295 int CPL_DLL PamParseHistogram(
CPLXMLNode *psHistItem,
296 double *pdfMin,
double *pdfMax,
297 int *pnBuckets,
int **ppanHistogram,
298 int *pbIncludeOutOfRange,
int *pbApproxOK );
300 PamFindMatchingHistogram(
CPLXMLNode *psSavedHistograms,
301 double dfMin,
double dfMax,
int nBuckets,
302 int bIncludeOutOfRange,
int bApproxOK );
304 PamHistogramToXMLTree(
double dfMin,
double dfMax,
305 int nBuckets,
int * panHistogram,
306 int bIncludeOutOfRange,
int bApprox );
309 const char CPL_DLL * PamGetProxy(
const char * );
310 const char CPL_DLL * PamAllocateProxy(
const char * );
311 const char CPL_DLL * PamDeallocateProxy(
const char * );
312 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:192
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:1230
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:659
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:226
virtual CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="")
Set metadata.
Definition: gdalpamrasterband.cpp:643
virtual CPLErr FlushCache()
Flush raster data cache.
Definition: gdalrasterband.cpp:850
virtual const char * GetMetadataItem(const char *pszName, const char *pszDomain="")
Fetch single metadata item.
Definition: gdalmajorobject.cpp:331
Definition: gdal_pam.h:225
virtual CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="")
Set metadata.
Definition: gdalpamdataset.cpp:1214
A subclass of GDALDataset which introduces the ability to save and restore auxilary information (coor...
Definition: gdal_pam.h:108
A single raster band (or channel).
Definition: gdal_priv.h:475
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:254
GDALColorInterp
Definition: gdal.h:105
Definition: gdal_priv.h:447
Ground Control Point.
Definition: gdal.h:255