GDAL

Public Member Functions | Protected Member Functions | List of all members
GDALMDReaderBase Class Referenceabstract

The base class for all metadata readers. More...

`#include <gdal_mdreader.h>`

## Public Member Functions
| GDALMDReaderBase (const char *pszPath, char **papszSiblingFiles)
| GDALMDReaderBase()
virtual | ~GDALMDReaderBase ()
| ~GDALMDReaderBase()
virtual char ** | GetMetadataDomain (const char *pszDomain)
| Get specified metadata domain. More...
virtual bool | FillMetadata (GDALMultiDomainMetadata *poMDMD)
| Fill provided metadata store class. More...
virtual bool | HasRequiredFiles () const =0
| Determine whether the input parameter correspond to the particular provider of remote sensing data completely. More...
virtual char ** | GetMetadataFiles () const =0
| Get metadata file names. More...

## Protected Member Functions
virtual void | LoadMetadata ()
| Load metadata to the correspondent IMD, RPB, IMAGERY and DEFAULT domains. More...
virtual GIntBig | GetAcquisitionTimeFromString (const char *pszDateTime)
| Convert string like 2012-02-25T00:25:59.9440000Z to time. More...
virtual char ** | ReadXMLToList (CPLXMLNode *psNode, char **papszList, const char *pszName="")
| ReadXMLToList Transform xml to list of NULL terminated name=value strings. More...
virtual char ** | AddXMLNameValueToList (char **papszList, const char *pszName, const char *pszValue)
| AddXMLNameValueToList Execute from ReadXMLToList to add name and value to list. More...

## Detailed Description

The base class for all metadata readers.

## Member Function Documentation

## ◆ AddXMLNameValueToList()

char ** GDALMDReaderBase::AddXMLNameValueToList | ( | char ** | papszList,
|  | const char * | pszName,
|  | const char * | pszValue
| ) |  |
| protected virtual

AddXMLNameValueToList Execute from ReadXMLToList to add name and value to list.

AddXMLNameValueToList()

One can override this function for special processing input values before add to list.

Parameters

  papszList | A list to fill with name=value strings
  pszName | A name to add
  pszValue | A value to add

Returns
  An input list filled with values

## ◆ FillMetadata()

bool GDALMDReaderBase::FillMetadata | ( | GDALMultiDomainMetadata * | poMDMD | ) |
| virtual

Fill provided metadata store class.

Parameters

  poMDMD | Metadata store class

Returns
  true on success or false

## ◆ GetAcquisitionTimeFromString()

GIntBig GDALMDReaderBase::GetAcquisitionTimeFromString | ( | const char * | pszDateTime | ) |
| protected virtual

Convert string like 2012-02-25T00:25:59.9440000Z to time.

GetAcqisitionTimeFromString()

Parameters

  pszDateTime | String to convert

Returns
  value in second sinc epoch 1970-01-01 00:00:00

## ◆ GetMetadataDomain()

char ** GDALMDReaderBase::GetMetadataDomain | ( | const char * | pszDomain | ) |
| virtual

Get specified metadata domain.

GetMetadataItem()

Parameters

  pszDomain | The metadata domain to return

Returns
  List of metadata items

## ◆ GetMetadataFiles()

virtual char ** GDALMDReaderBase::GetMetadataFiles | ( |  | ) | const
| pure virtual

Get metadata file names.

The caller become owner of returned list and have to free it via CSLDestroy.

Returns
  A file name list

## ◆ HasRequiredFiles()

virtual bool GDALMDReaderBase::HasRequiredFiles | ( |  | ) | const
| pure virtual

Determine whether the input parameter correspond to the particular provider of remote sensing data completely.

Returns
  True if all needed sources files found

## ◆ LoadMetadata()

void GDALMDReaderBase::LoadMetadata | ( |  | ) |
| protected virtual

Load metadata to the correspondent IMD, RPB, IMAGERY and DEFAULT domains.

LoadMetadata()

## ◆ ReadXMLToList()

char ** GDALMDReaderBase::ReadXMLToList | ( | CPLXMLNode * | psNode,
|  | char ** | papszList,
|  | const char * | pszName = `""`
| ) |  |
| protected virtual

ReadXMLToList Transform xml to list of NULL terminated name=value strings.

ReadXMLToList()

Parameters

  psNode | A xml node to process
  papszList | A list to fill with name=value strings
  pszName | A name of parent node. For root xml node should be empty. If name is not empty, the sibling nodes will not proceed

Returns
  An input list filled with values

The documentation for this class was generated from the following files:

- gdal_mdreader.h
- gdal_mdreader.cpp