31 #ifndef GDAL_MDREADER_H_INCLUDED
32 #define GDAL_MDREADER_H_INCLUDED
39 #define MD_DOMAIN_IMD "IMD"
40 #define MD_DOMAIN_RPC "RPC"
41 #define MD_DOMAIN_IMAGERY "IMAGERY"
42 #define MD_DOMAIN_DEFAULT ""
44 #define MD_NAME_ACQDATETIME \
47 #define MD_NAME_SATELLITE \
49 #define MD_NAME_CLOUDCOVER \
52 #define MD_NAME_MDTYPE \
56 #define MD_DATETIMEFORMAT "%Y-%m-%d %H:%M:%S"
57 #define MD_CLOUDCOVER_NA "999"
63 #define RPC_ERR_BIAS "ERR_BIAS"
64 #define RPC_ERR_RAND "ERR_RAND"
65 #define RPC_LINE_OFF "LINE_OFF"
66 #define RPC_SAMP_OFF "SAMP_OFF"
67 #define RPC_LAT_OFF "LAT_OFF"
68 #define RPC_LONG_OFF "LONG_OFF"
69 #define RPC_HEIGHT_OFF "HEIGHT_OFF"
70 #define RPC_LINE_SCALE "LINE_SCALE"
71 #define RPC_SAMP_SCALE "SAMP_SCALE"
72 #define RPC_LAT_SCALE "LAT_SCALE"
73 #define RPC_LONG_SCALE "LONG_SCALE"
74 #define RPC_HEIGHT_SCALE "HEIGHT_SCALE"
75 #define RPC_LINE_NUM_COEFF "LINE_NUM_COEFF"
76 #define RPC_LINE_DEN_COEFF "LINE_DEN_COEFF"
77 #define RPC_SAMP_NUM_COEFF "SAMP_NUM_COEFF"
78 #define RPC_SAMP_DEN_COEFF "SAMP_DEN_COEFF"
81 #define RPC_MIN_LONG "MIN_LONG"
82 #define RPC_MIN_LAT "MIN_LAT"
83 #define RPC_MAX_LONG "MAX_LONG"
84 #define RPC_MAX_LAT "MAX_LAT"
87 #define RPC_LAT_NUM_COEFF "LAT_NUM_COEFF"
88 #define RPC_LAT_DEN_COEFF "LAT_DEN_COEFF"
89 #define RPC_LON_NUM_COEFF "LON_NUM_COEFF"
90 #define RPC_LON_DEN_COEFF "LON_DEN_COEFF"
98 MDR_None = 0x00000000,
102 MDR_PLEIADES = 0x00000008,
103 MDR_SPOT = 0x00000010,
104 MDR_RDK1 = 0x00000020,
107 MDR_KOMPSAT = 0x00000100,
108 MDR_EROS = 0x00000200,
109 MDR_ALOS = 0x00000400,
110 MDR_ANY = MDR_DG | MDR_GE | MDR_OV | MDR_PLEIADES | MDR_SPOT | MDR_RDK1 |
111 MDR_LS | MDR_RE | MDR_KOMPSAT | MDR_EROS |
124 ReadXMLToListFirstPass(
const CPLXMLNode *psNode,
125 std::map<std::string, int> &oMapCountKeysFull,
126 const std::string &osPrefixFull,
int nDepth);
128 char **ReadXMLToList(
const CPLXMLNode *psNode,
char **papszList,
129 const std::map<std::string, int> &oMapCountKeysFullRef,
130 std::map<std::string, int> &oMapCountKeysFull,
131 std::map<std::string, int> &oMapCountKeys,
132 const std::string &osPrefix,
133 const std::string &osPrefixFull);
144 virtual char **GetMetadataDomain(
const char *pszDomain);
150 virtual bool FillMetadata(GDALMultiDomainMetadata *poMDMD);
169 virtual void LoadMetadata();
175 virtual GIntBig GetAcquisitionTimeFromString(
const char *pszDateTime);
185 virtual char **ReadXMLToList(
CPLXMLNode *psNode,
char **papszList,
186 const char *pszName =
"");
196 virtual char **AddXMLNameValueToList(
char **papszList,
const char *pszName,
197 const char *pszValue);
201 char **m_papszIMDMD =
nullptr;
202 char **m_papszRPCMD =
nullptr;
203 char **m_papszIMAGERYMD =
nullptr;
204 char **m_papszDEFAULTMD =
nullptr;
205 bool m_bIsMetadataLoad =
false;
234 char **papszSiblingFiles,
246 char **GDALLoadRPBFile(
const CPLString &osFilePath);
247 char CPL_DLL **GDALLoadRPCFile(
const CPLString &osFilePath);
248 char **GDALLoadIMDFile(
const CPLString &osFilePath);
249 bool GDALCheckFileHeader(
const CPLString &soFilePath,
const char *pszTestString,
250 int nBufferSize = 256);
252 CPLErr GDALWriteRPBFile(
const char *pszFilename,
char **papszMD);
253 CPLErr CPL_DLL GDALWriteRPCTXTFile(
const char *pszFilename,
char **papszMD);
254 CPLErr 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:119
virtual bool HasRequiredFiles() const =0
Determine whether the input parameter correspond to the particular provider of remote sensing data co...
virtual char ** GetMetadataFiles() const =0
Get metadata file names.
The metadata reader main class.
Definition: gdal_mdreader.h:215
GDALMDReaderManager()
GDALMDReaderManager()
CPLErr
Error category.
Definition: cpl_error.h:53
Core portability definitions for CPL.
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:177
#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
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:215
Document node structure.
Definition: cpl_minixml.h:71