metadata namespace

namespace metadata

Common classes from ISO 19115 (Metadata) standard.

osgeo.proj.metadata namespace

Typedefs

typedef std::shared_ptr<Extent> ExtentPtr

Shared pointer of Extent.

typedef util::nn<ExtentPtr> ExtentNNPtr

Non-null shared pointer of Extent.

using GeographicExtentPtr = std::shared_ptr<GeographicExtent>

Shared pointer of GeographicExtent.

using GeographicExtentNNPtr = util::nn<GeographicExtentPtr>

Non-null shared pointer of GeographicExtent.

using GeographicBoundingBoxPtr = std::shared_ptr<GeographicBoundingBox>

Shared pointer of GeographicBoundingBox.

using GeographicBoundingBoxNNPtr = util::nn<GeographicBoundingBoxPtr>

Non-null shared pointer of GeographicBoundingBox.

using TemporalExtentPtr = std::shared_ptr<TemporalExtent>

Shared pointer of TemporalExtent.

using TemporalExtentNNPtr = util::nn<TemporalExtentPtr>

Non-null shared pointer of TemporalExtent.

using VerticalExtentPtr = std::shared_ptr<VerticalExtent>

Shared pointer of VerticalExtent.

using VerticalExtentNNPtr = util::nn<VerticalExtentPtr>

Non-null shared pointer of VerticalExtent.

using IdentifierPtr = std::shared_ptr<Identifier>

Shared pointer of Identifier.

using IdentifierNNPtr = util::nn<IdentifierPtr>

Non-null shared pointer of Identifier.

using PositionalAccuracyPtr = std::shared_ptr<PositionalAccuracy>

Shared pointer of PositionalAccuracy.

using PositionalAccuracyNNPtr = util::nn<PositionalAccuracyPtr>

Non-null shared pointer of PositionalAccuracy.

class Citation : public osgeo::proj::util::BaseObject
#include <metadata.hpp>

Standardized resource reference.

A citation contains a title.

Remark

Simplified version of Citation from GeoAPI

Public Functions

explicit Citation(const std::string &titleIn)

Constructs a citation by its title.

const util::optional<std::string> &title()

Returns the name by which the cited resource is known.

class GeographicExtent : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable
#include <metadata.hpp>

Base interface for geographic area of the dataset.

Remark

Simplified version of GeographicExtent from GeoAPI

Subclassed by osgeo::proj::metadata::GeographicBoundingBox

Public Functions

virtual bool contains(const GeographicExtentNNPtr &other) const = 0

Returns whether this extent contains the other one.

virtual bool intersects(const GeographicExtentNNPtr &other) const = 0

Returns whether this extent intersects the other one.

virtual GeographicExtentPtr intersection(const GeographicExtentNNPtr &other) const = 0

Returns the intersection of this extent with another one.

class GeographicBoundingBox : public osgeo::proj::metadata::GeographicExtent
#include <metadata.hpp>

Geographic position of the dataset.

This is only an approximate so specifying the coordinate reference system is unnecessary.

Remark

Implements GeographicBoundingBox from GeoAPI

Public Functions

double westBoundLongitude()

Returns the western-most coordinate of the limit of the dataset extent.

The unit is degrees.

If eastBoundLongitude < westBoundLongitude(), then the bounding box crosses the anti-meridian.

double southBoundLatitude()

Returns the southern-most coordinate of the limit of the dataset extent.

The unit is degrees.

double eastBoundLongitude()

Returns the eastern-most coordinate of the limit of the dataset extent.

The unit is degrees.

If eastBoundLongitude < westBoundLongitude(), then the bounding box crosses the anti-meridian.

double northBoundLatitude()

Returns the northern-most coordinate of the limit of the dataset extent.

The unit is degrees.

virtual bool contains(const GeographicExtentNNPtr &other) const override

Returns whether this extent contains the other one.

virtual bool intersects(const GeographicExtentNNPtr &other) const override

Returns whether this extent intersects the other one.

virtual GeographicExtentPtr intersection(const GeographicExtentNNPtr &other) const override

Returns the intersection of this extent with another one.

Public Static Functions

static GeographicBoundingBoxNNPtr create(double west, double south, double east, double north)

Instantiate a GeographicBoundingBox.

If east < west, then the bounding box crosses the anti-meridian.

Parameters:
  • west -- Western-most coordinate of the limit of the dataset extent (in degrees).

  • south -- Southern-most coordinate of the limit of the dataset extent (in degrees).

  • east -- Eastern-most coordinate of the limit of the dataset extent (in degrees).

  • north -- Northern-most coordinate of the limit of the dataset extent (in degrees).

Returns:

a new GeographicBoundingBox.

class TemporalExtent : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable
#include <metadata.hpp>

Time period covered by the content of the dataset.

Remark

Simplified version of TemporalExtent from GeoAPI

Public Functions

const std::string &start()

Returns the start of the temporal extent.

const std::string &stop()

Returns the end of the temporal extent.

bool contains(const TemporalExtentNNPtr &other) const

Returns whether this extent contains the other one.

bool intersects(const TemporalExtentNNPtr &other) const

Returns whether this extent intersects the other one.

Public Static Functions

static TemporalExtentNNPtr create(const std::string &start, const std::string &stop)

Instantiate a TemporalExtent.

Parameters:
  • start -- start.

  • stop -- stop.

Returns:

a new TemporalExtent.

class VerticalExtent : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable
#include <metadata.hpp>

Vertical domain of dataset.

Remark

Simplified version of VerticalExtent from GeoAPI

Public Functions

double minimumValue()

Returns the minimum of the vertical extent.

double maximumValue()

Returns the maximum of the vertical extent.

common::UnitOfMeasureNNPtr &unit()

Returns the unit of the vertical extent.

bool contains(const VerticalExtentNNPtr &other) const

Returns whether this extent contains the other one.

bool intersects(const VerticalExtentNNPtr &other) const

Returns whether this extent intersects the other one.

Public Static Functions

static VerticalExtentNNPtr create(double minimumValue, double maximumValue, const common::UnitOfMeasureNNPtr &unitIn)

Instantiate a VerticalExtent.

Parameters:
  • minimumIn -- minimum.

  • maximumIn -- maximum.

  • unitIn -- unit.

Returns:

a new VerticalExtent.

class Extent : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable
#include <metadata.hpp>

Information about spatial, vertical, and temporal extent.

Remark

Simplified version of Extent from GeoAPI

Public Functions

const util::optional<std::string> &description()

Return a textual description of the extent.

Returns:

the description, or empty.

const std::vector<GeographicExtentNNPtr> &geographicElements()

Return the geographic element(s) of the extent

Returns:

the geographic element(s), or empty.

const std::vector<TemporalExtentNNPtr> &temporalElements()

Return the temporal element(s) of the extent

Returns:

the temporal element(s), or empty.

const std::vector<VerticalExtentNNPtr> &verticalElements()

Return the vertical element(s) of the extent

Returns:

the vertical element(s), or empty.

bool contains(const ExtentNNPtr &other) const

Returns whether this extent contains the other one.

Behavior only well specified if each sub-extent category as at most one element.

bool intersects(const ExtentNNPtr &other) const

Returns whether this extent intersects the other one.

Behavior only well specified if each sub-extent category as at most one element.

ExtentPtr intersection(const ExtentNNPtr &other) const

Returns the intersection of this extent with another one.

Behavior only well specified if there is one single GeographicExtent in each object. Returns nullptr otherwise.

Public Static Functions

static ExtentNNPtr create(const util::optional<std::string> &descriptionIn, const std::vector<GeographicExtentNNPtr> &geographicElementsIn, const std::vector<VerticalExtentNNPtr> &verticalElementsIn, const std::vector<TemporalExtentNNPtr> &temporalElementsIn)

Instantiate a Extent.

Parameters:
  • descriptionIn -- Textual description, or empty.

  • geographicElementsIn -- Geographic element(s), or empty.

  • verticalElementsIn -- Vertical element(s), or empty.

  • temporalElementsIn -- Temporal element(s), or empty.

Returns:

a new Extent.

static ExtentNNPtr createFromBBOX(double west, double south, double east, double north, const util::optional<std::string> &descriptionIn = util::optional<std::string>())

Instantiate a Extent from a bounding box.

Parameters:
  • west -- Western-most coordinate of the limit of the dataset extent (in degrees).

  • south -- Southern-most coordinate of the limit of the dataset extent (in degrees).

  • east -- Eastern-most coordinate of the limit of the dataset extent (in degrees).

  • north -- Northern-most coordinate of the limit of the dataset extent (in degrees).

  • descriptionIn -- Textual description, or empty.

Returns:

a new Extent.

Public Static Attributes

static const ExtentNNPtr WORLD

World extent.

class Identifier : public osgeo::proj::util::BaseObject, public osgeo::proj::io::IWKTExportable, public osgeo::proj::io::IJSONExportable
#include <metadata.hpp>

Value uniquely identifying an object within a namespace.

Remark

Implements Identifier as described in ISO 19111:2019 but which originates from ISO 19115 (Metadata)

Public Functions

const util::optional<Citation> &authority()

Return a citation for the organization responsible for definition and maintenance of the code.

Returns:

the citation for the authority, or empty.

const std::string &code()

Return the alphanumeric value identifying an instance in the codespace.

e.g. "4326" (for EPSG:4326 WGS 84 GeographicCRS)

Returns:

the code.

const util::optional<std::string> &codeSpace()

Return the organization responsible for definition and maintenance of the code.

e.g "EPSG"

Returns:

the authority codespace, or empty.

const util::optional<std::string> &version()

Return the version identifier for the namespace.

When appropriate, the edition is identified by the effective date, coded using ISO 8601 date format.

Returns:

the version or empty.

const util::optional<std::string> &description()

Return the natural language description of the meaning of the code value.

Returns:

the description or empty.

const util::optional<std::string> &uri()

Return the URI of the identifier.

Returns:

the URI or empty.

Public Static Functions

static IdentifierNNPtr create(const std::string &codeIn = std::string(), const util::PropertyMap &properties = util::PropertyMap())

Instantiate a Identifier.

Parameters:
Returns:

a new Identifier.

static bool isEquivalentName(const char *a, const char *b) noexcept

Returns whether two names are considered equivalent.

Two names are equivalent by removing any space, underscore, dash, slash, { or } character from them, and comparing in a case insensitive way.

Public Static Attributes

static const std::string AUTHORITY_KEY

Key to set the authority citation of a metadata::Identifier.

The value is to be provided as a string or a metadata::Citation.

static const std::string CODE_KEY

Key to set the code of a metadata::Identifier.

The value is to be provided as a integer or a string.

static const std::string CODESPACE_KEY

Key to set the organization responsible for definition and maintenance of the code of a metadata::Identifier.

The value is to be provided as a string.

static const std::string VERSION_KEY

Key to set the version identifier for the namespace of a metadata::Identifier.

The value is to be provided as a string.

static const std::string DESCRIPTION_KEY

Key to set the natural language description of the meaning of the code value of a metadata::Identifier.

The value is to be provided as a string.

static const std::string URI_KEY

Key to set the URI of a metadata::Identifier.

The value is to be provided as a string.

static const std::string EPSG

EPSG codespace.

static const std::string OGC

OGC codespace.

class PositionalAccuracy : public osgeo::proj::util::BaseObject
#include <metadata.hpp>

Accuracy of the position of features.

Remark

Simplified version of PositionalAccuracy from GeoAPI, which originates from ISO 19115 (Metadata)

Public Functions

const std::string &value()

Return the value of the positional accuracy.

Public Static Functions

static PositionalAccuracyNNPtr create(const std::string &valueIn)

Instantiate a PositionalAccuracy.

Parameters:

valueIn -- positional accuracy value.

Returns:

a new PositionalAccuracy.