14#ifndef GDAL_MDREADER_H_INCLUDED
15#define GDAL_MDREADER_H_INCLUDED
22#define MD_DOMAIN_IMD "IMD"
23#define MD_DOMAIN_RPC "RPC"
24#define MD_DOMAIN_IMAGERY "IMAGERY"
25#define MD_DOMAIN_DEFAULT ""
27#define MD_NAME_ACQDATETIME \
30#define MD_NAME_SATELLITE \
32#define MD_NAME_CLOUDCOVER \
35#define MD_NAME_MDTYPE \
39#define MD_DATETIMEFORMAT "%Y-%m-%d %H:%M:%S"
40#define MD_CLOUDCOVER_NA "999"
46#define RPC_ERR_BIAS "ERR_BIAS"
47#define RPC_ERR_RAND "ERR_RAND"
48#define RPC_LINE_OFF "LINE_OFF"
49#define RPC_SAMP_OFF "SAMP_OFF"
50#define RPC_LAT_OFF "LAT_OFF"
51#define RPC_LONG_OFF "LONG_OFF"
52#define RPC_HEIGHT_OFF "HEIGHT_OFF"
53#define RPC_LINE_SCALE "LINE_SCALE"
54#define RPC_SAMP_SCALE "SAMP_SCALE"
55#define RPC_LAT_SCALE "LAT_SCALE"
56#define RPC_LONG_SCALE "LONG_SCALE"
57#define RPC_HEIGHT_SCALE "HEIGHT_SCALE"
58#define RPC_LINE_NUM_COEFF "LINE_NUM_COEFF"
59#define RPC_LINE_DEN_COEFF "LINE_DEN_COEFF"
60#define RPC_SAMP_NUM_COEFF "SAMP_NUM_COEFF"
61#define RPC_SAMP_DEN_COEFF "SAMP_DEN_COEFF"
64#define RPC_MIN_LONG "MIN_LONG"
65#define RPC_MIN_LAT "MIN_LAT"
66#define RPC_MAX_LONG "MAX_LONG"
67#define RPC_MAX_LAT "MAX_LAT"
70#define RPC_LAT_NUM_COEFF "LAT_NUM_COEFF"
71#define RPC_LAT_DEN_COEFF "LAT_DEN_COEFF"
72#define RPC_LON_NUM_COEFF "LON_NUM_COEFF"
73#define RPC_LON_DEN_COEFF "LON_DEN_COEFF"
81 MDR_None = 0x00000000,
85 MDR_PLEIADES = 0x00000008,
86 MDR_SPOT = 0x00000010,
87 MDR_RDK1 = 0x00000020,
90 MDR_KOMPSAT = 0x00000100,
91 MDR_EROS = 0x00000200,
92 MDR_ALOS = 0x00000400,
93 MDR_ANY = MDR_DG | MDR_GE | MDR_OV | MDR_PLEIADES | MDR_SPOT | MDR_RDK1 |
94 MDR_LS | MDR_RE | MDR_KOMPSAT | MDR_EROS |
107 ReadXMLToListFirstPass(
const CPLXMLNode *psNode,
108 std::map<std::string, int> &oMapCountKeysFull,
109 const std::string &osPrefixFull,
int nDepth);
111 char **ReadXMLToList(
const CPLXMLNode *psNode,
char **papszList,
112 const std::map<std::string, int> &oMapCountKeysFullRef,
113 std::map<std::string, int> &oMapCountKeysFull,
114 std::map<std::string, int> &oMapCountKeys,
115 const std::string &osPrefix,
116 const std::string &osPrefixFull);
133 virtual bool FillMetadata(GDALMultiDomainMetadata *poMDMD);
168 virtual char **ReadXMLToList(
CPLXMLNode *psNode,
char **papszList,
169 const char *pszName =
"");
180 const char *pszValue);
184 char **m_papszIMDMD =
nullptr;
185 char **m_papszRPCMD =
nullptr;
186 char **m_papszIMAGERYMD =
nullptr;
187 char **m_papszDEFAULTMD =
nullptr;
188 bool m_bIsMetadataLoad =
false;
229char **GDALLoadRPBFile(
const CPLString &osFilePath);
230char CPL_DLL **GDALLoadRPCFile(
const CPLString &osFilePath);
231char **GDALLoadIMDFile(
const CPLString &osFilePath);
232bool GDALCheckFileHeader(
const CPLString &soFilePath,
const char *pszTestString,
233 int nBufferSize = 256);
235CPLErr GDALWriteRPBFile(
const char *pszFilename,
char **papszMD);
236CPLErr CPL_DLL GDALWriteRPCTXTFile(
const char *pszFilename,
char **papszMD);
237CPLErr GDALWriteIMDFile(
const char *pszFilename,
char **papszMD);
Convenient string class based on std::string.
Definition cpl_string.h:320
The base class for all metadata readers.
Definition gdal_mdreader.h:102
virtual GIntBig GetAcquisitionTimeFromString(const char *pszDateTime)
Convert string like 2012-02-25T00:25:59.9440000Z to time.
Definition gdal_mdreader.cpp:208
virtual char ** GetMetadataFiles() const =0
Get metadata file names.
virtual char ** GetMetadataDomain(const char *pszDomain)
Get specified metadata domain.
Definition gdal_mdreader.cpp:181
virtual void LoadMetadata()
Load metadata to the correspondent IMD, RPB, IMAGERY and DEFAULT domains.
Definition gdal_mdreader.cpp:198
virtual bool FillMetadata(GDALMultiDomainMetadata *poMDMD)
Fill provided metadata store class.
Definition gdal_mdreader.cpp:251
virtual bool HasRequiredFiles() const =0
Determine whether the input parameter correspond to the particular provider of remote sensing data co...
virtual char ** AddXMLNameValueToList(char **papszList, const char *pszName, const char *pszValue)
AddXMLNameValueToList Execute from ReadXMLToList to add name and value to list.
Definition gdal_mdreader.cpp:269
GDALMDReaderBase(const char *pszPath, CSLConstList papszSiblingFiles)
GDALMDReaderBase().
Definition gdal_mdreader.cpp:162
GDALMDReaderManager()
GDALMDReaderManager().
virtual GDALMDReaderBase * GetReader(const char *pszPath, CSLConstList papszSiblingFiles, GUInt32 nType=MDR_ANY)
Try to detect metadata reader correspondent to the provided datasource path.
Definition gdal_mdreader.cpp:92
CPLErr
Error category.
Definition cpl_error.h:37
Core portability definitions for CPL.
unsigned int GUInt32
Unsigned int32 type.
Definition cpl_port.h:167
#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
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:205
This file is legacy since GDAL 3.12, but will be kept at least in the whole GDAL 3....
Document node structure.
Definition cpl_minixml.h:54