From a3f43744feec86272fe532124679d3a013ef9a8c Mon Sep 17 00:00:00 2001 From: PROJ deploybot Date: Tue, 22 Mar 2022 20:00:06 +0000 Subject: update with results of commit https://github.com/OSGeo/PROJ/commit/53c07a8bd211b7aee4bc07a9c6726005504b7181 --- development/reference/cpp/common.html | 896 +++++++ development/reference/cpp/cpp_general.html | 249 ++ development/reference/cpp/crs.html | 1966 ++++++++++++++ development/reference/cpp/cs.html | 1312 +++++++++ development/reference/cpp/datum.html | 1180 ++++++++ development/reference/cpp/index.html | 171 ++ development/reference/cpp/io.html | 2208 +++++++++++++++ development/reference/cpp/metadata.html | 872 ++++++ development/reference/cpp/operation.html | 4030 ++++++++++++++++++++++++++++ development/reference/cpp/util.html | 688 +++++ 10 files changed, 13572 insertions(+) create mode 100644 development/reference/cpp/common.html create mode 100644 development/reference/cpp/cpp_general.html create mode 100644 development/reference/cpp/crs.html create mode 100644 development/reference/cpp/cs.html create mode 100644 development/reference/cpp/datum.html create mode 100644 development/reference/cpp/index.html create mode 100644 development/reference/cpp/io.html create mode 100644 development/reference/cpp/metadata.html create mode 100644 development/reference/cpp/operation.html create mode 100644 development/reference/cpp/util.html (limited to 'development/reference/cpp') diff --git a/development/reference/cpp/common.html b/development/reference/cpp/common.html new file mode 100644 index 00000000..8ed8ce86 --- /dev/null +++ b/development/reference/cpp/common.html @@ -0,0 +1,896 @@ + + + + + + + common namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

common namespace

+
+
+namespace osgeo::proj::common
+

Common classes.

+

osgeo.proj.common namespace

+
+

Typedefs

+
+
+typedef std::shared_ptr<UnitOfMeasure> UnitOfMeasurePtr
+

Shared pointer of UnitOfMeasure.

+
+ +
+
+typedef util::nn<UnitOfMeasurePtr> UnitOfMeasureNNPtr
+

Non-null shared pointer of UnitOfMeasure.

+
+ +
+
+typedef std::shared_ptr<IdentifiedObject> IdentifiedObjectPtr
+

Shared pointer of IdentifiedObject.

+
+ +
+
+typedef util::nn<IdentifiedObjectPtr> IdentifiedObjectNNPtr
+

Non-null shared pointer of IdentifiedObject.

+
+ +
+
+using ObjectDomainPtr = std::shared_ptr<ObjectDomain>
+

Shared pointer of ObjectDomain.

+
+ +
+
+using ObjectDomainNNPtr = util::nn<ObjectDomainPtr>
+

Non-null shared pointer of ObjectDomain.

+
+ +
+
+using ObjectUsagePtr = std::shared_ptr<ObjectUsage>
+

Shared pointer of ObjectUsage.

+
+ +
+
+using ObjectUsageNNPtr = util::nn<ObjectUsagePtr>
+

Non-null shared pointer of ObjectUsage.

+
+ +
+
+
+class Angle : public osgeo::proj::common::Measure
+
+#include <common.hpp>
+

Numeric value, with a angular unit of measure.

+
+

Public Functions

+
+
+explicit Angle(double valueIn = 0.0)
+

Instantiate a Angle.

+
+
Parameters
+

valueIn – value

+
+
+
+ +
+
+Angle(double valueIn, const UnitOfMeasure &unitIn)
+

Instantiate a Angle.

+
+
Parameters
+
+
+
+
+ +
+
+ +
+
+class DataEpoch
+
+#include <common.hpp>
+

Data epoch.

+
+

Public Functions

+
+
+const Measure &coordinateEpoch() const
+

Return the coordinate epoch, as a measure in decimal year.

+
+ +
+
+ +
+
+class DateTime
+
+#include <common.hpp>
+

Date-time value, as a ISO:8601 encoded string, or other string encoding.

+
+

Public Functions

+
+
+bool isISO_8601() const
+

Return whether the DateTime is ISO:8601 compliant.

+

+

Remark

+

The current implementation is really simplistic, and aimed at detecting date-times that are not ISO:8601 compliant.

+
+

+
+ +
+
+std::string toString() const
+

Return the DateTime as a string.

+
+ +
+
+

Public Static Functions

+
+
+static DateTime create(const std::string &str)
+

Instantiate a DateTime.

+
+ +
+
+ +
+
+class IdentifiedObject : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable, public osgeo::proj::io::IWKTExportable
+
+#include <common.hpp>
+

Abstract class representing a CRS-related object that has an identification.

+

+

Remark

+

Implements IdentifiedObject from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::common::ObjectUsage, osgeo::proj::cs::CoordinateSystem, osgeo::proj::cs::CoordinateSystemAxis, osgeo::proj::cs::Meridian, osgeo::proj::datum::Ellipsoid, osgeo::proj::datum::PrimeMeridian, osgeo::proj::operation::GeneralOperationParameter, osgeo::proj::operation::OperationMethod

+
+

Public Functions

+
+
+const metadata::IdentifierNNPtr &name()
+

Return the name of the object.

+

Generally, the only interesting field of the name will be name()->description().

+
+ +
+
+const std::string &nameStr()
+

Return the name of the object.

+

Return *(name()->description())

+
+ +
+
+const std::vector<metadata::IdentifierNNPtr> &identifiers()
+

Return the identifier(s) of the object.

+

Generally, those will have Identifier::code() and Identifier::codeSpace() filled.

+
+ +
+
+const std::vector<util::GenericNameNNPtr> &aliases()
+

Return the alias(es) of the object.

+
+ +
+
+const std::string &remarks()
+

Return the remarks.

+
+ +
+
+bool isDeprecated()
+

Return whether the object is deprecated.

+

+

Remark

+

Extension of ISO 19111:2019

+
+

+
+ +
+
+std::string alias()
+

Return the (first) alias of the object as a string.

+

Shortcut for aliases()[0]->toFullyQualifiedName()->toString()

+
+ +
+
+int getEPSGCode()
+

Return the EPSG code.

+
+
Returns
+

code, or 0 if not found

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static const std::string NAME_KEY
+

Key to set the name of a common::IdentifiedObject.

+

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

+
+ +
+
+static const std::string IDENTIFIERS_KEY
+

Key to set the identifier(s) of a common::IdentifiedObject.

+

The value is to be provided as a common::IdentifierNNPtr or a util::ArrayOfBaseObjectNNPtr of common::IdentifierNNPtr.

+
+ +
+
+static const std::string ALIAS_KEY
+

Key to set the alias(es) of a common::IdentifiedObject.

+

The value is to be provided as string, a util::GenericNameNNPtr or a util::ArrayOfBaseObjectNNPtr of util::GenericNameNNPtr.

+
+ +
+
+static const std::string REMARKS_KEY
+

Key to set the remarks of a common::IdentifiedObject.

+

The value is to be provided as a string.

+
+ +
+
+static const std::string DEPRECATED_KEY
+

Key to set the deprecation flag of a common::IdentifiedObject.

+

The value is to be provided as a boolean.

+
+ +
+
+ +
+
+class Length : public osgeo::proj::common::Measure
+
+#include <common.hpp>
+

Numeric value, with a linear unit of measure.

+
+

Public Functions

+
+
+explicit Length(double valueIn = 0.0)
+

Instantiate a Length.

+
+
Parameters
+

valueIn – value

+
+
+
+ +
+
+Length(double valueIn, const UnitOfMeasure &unitIn)
+

Instantiate a Length.

+
+
Parameters
+
+
+
+
+ +
+
+ +
+
+class Measure : public osgeo::proj::util::BaseObject
+
+#include <common.hpp>
+

Numeric value associated with a UnitOfMeasure.

+

Subclassed by osgeo::proj::common::Angle, osgeo::proj::common::Length, osgeo::proj::common::Scale

+
+

Public Functions

+
+
+Measure(double valueIn = 0.0, const UnitOfMeasure &unitIn = UnitOfMeasure())
+

Instantiate a Measure.

+
+ +
+
+const UnitOfMeasure &unit()
+

Return the unit of the Measure.

+
+ +
+
+double getSIValue()
+

Return the value of the Measure, after conversion to the corresponding unit of the International System.

+
+ +
+
+double value()
+

Return the value of the measure, expressed in the unit()

+
+ +
+
+double convertToUnit(const UnitOfMeasure &otherUnit)
+

Return the value of this measure expressed into the provided unit.

+
+ +
+
+bool operator==(const Measure &other)
+

Return whether two measures are equal.

+

The comparison is done both on the value and the unit.

+
+ +
+
+bool _isEquivalentTo(const Measure &other, util::IComparable::Criterion criterion = util::IComparable::Criterion::STRICT, double maxRelativeError = DEFAULT_MAX_REL_ERROR) const
+

Returns whether an object is equivalent to another one.

+
+
Parameters
+
    +
  • other – other object to compare to

  • +
  • criterion – comparison criterion.

  • +
  • maxRelativeError – Maximum relative error allowed.

  • +
+
+
Returns
+

true if objects are equivalent.

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static constexpr double DEFAULT_MAX_REL_ERROR = 1e-10
+

Default maximum resulative error.

+
+ +
+
+ +
+
+class ObjectDomain : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable
+
+#include <common.hpp>
+

The scope and validity of a CRS-related object.

+

+

Remark

+

Implements ObjectDomain from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const util::optional<std::string> &scope()
+

Return the scope.

+
+
Returns
+

the scope, or empty.

+
+
+
+ +
+
+const metadata::ExtentPtr &domainOfValidity()
+

Return the domain of validity.

+
+
Returns
+

the domain of validity, or nullptr.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static ObjectDomainNNPtr create(const util::optional<std::string> &scopeIn, const metadata::ExtentPtr &extent)
+

Instantiate a ObjectDomain.

+
+ +
+
+ +
+
+class ObjectUsage : public osgeo::proj::common::IdentifiedObject
+
+#include <common.hpp>
+

Abstract class of a CRS-related object that has usages.

+

+

Remark

+

Implements ObjectUsage from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::crs::CRS, osgeo::proj::datum::Datum, osgeo::proj::datum::DatumEnsemble, osgeo::proj::operation::CoordinateOperation

+
+

Public Functions

+
+
+const std::vector<ObjectDomainNNPtr> &domains()
+

Return the domains of the object.

+
+ +
+
+

Public Static Attributes

+
+
+static const std::string SCOPE_KEY
+

Key to set the scope of a common::ObjectUsage.

+

The value is to be provided as a string.

+
+ +
+
+static const std::string DOMAIN_OF_VALIDITY_KEY
+

Key to set the domain of validity of a common::ObjectUsage.

+

The value is to be provided as a common::ExtentNNPtr.

+
+ +
+
+static const std::string OBJECT_DOMAIN_KEY
+

Key to set the object domain(s) of a common::ObjectUsage.

+

The value is to be provided as a common::ObjectDomainNNPtr or a util::ArrayOfBaseObjectNNPtr of common::ObjectDomainNNPtr.

+
+ +
+
+ +
+
+class Scale : public osgeo::proj::common::Measure
+
+#include <common.hpp>
+

Numeric value, without a physical unit of measure.

+
+

Public Functions

+
+
+explicit Scale(double valueIn = 0.0)
+

Instantiate a Scale.

+
+
Parameters
+

valueIn – value

+
+
+
+ +
+
+explicit Scale(double valueIn, const UnitOfMeasure &unitIn)
+

Instantiate a Scale.

+
+
Parameters
+
+
+
+
+ +
+
+ +
+
+class UnitOfMeasure : public osgeo::proj::util::BaseObject
+
+#include <common.hpp>
+

Unit of measure.

+

This is a mutable object.

+
+

Public Types

+
+
+enum class Type
+

Type of unit of measure.

+

Values:

+
+
+enumerator UNKNOWN
+

Unknown unit of measure

+
+ +
+
+enumerator NONE
+

No unit of measure

+
+ +
+
+enumerator ANGULAR
+

Angular unit of measure

+
+ +
+
+enumerator LINEAR
+

Linear unit of measure

+
+ +
+
+enumerator SCALE
+

Scale unit of measure

+
+ +
+
+enumerator TIME
+

Time unit of measure

+
+ +
+
+enumerator PARAMETRIC
+

Parametric unit of measure

+
+ +
+ +
+
+

Public Functions

+
+
+UnitOfMeasure(const std::string &nameIn = std::string(), double toSIIn = 1.0, Type typeIn = Type::UNKNOWN, const std::string &codeSpaceIn = std::string(), const std::string &codeIn = std::string())
+

Creates a UnitOfMeasure.

+
+ +
+
+const std::string &name()
+

Return the name of the unit of measure.

+
+ +
+
+double conversionToSI()
+

Return the conversion factor to the unit of the International System of Units of the same Type.

+

For example, for foot, this would be 0.3048 (metre)

+
+
Returns
+

the conversion factor, or 0 if no conversion exists.

+
+
+
+ +
+
+Type type()
+

Return the type of the unit of measure.

+
+ +
+
+const std::string &codeSpace()
+

Return the code space of the unit of measure.

+

For example “EPSG”

+
+
Returns
+

the code space, or empty string.

+
+
+
+ +
+
+const std::string &code()
+

Return the code of the unit of measure.

+
+
Returns
+

the code, or empty string.

+
+
+
+ +
+
+bool operator==(const UnitOfMeasure &other)
+

Returns whether two units of measures are equal.

+

The comparison is based on the name.

+
+ +
+
+bool operator!=(const UnitOfMeasure &other)
+

Returns whether two units of measures are different.

+

The comparison is based on the name.

+
+ +
+
+

Public Static Attributes

+
+
+static const UnitOfMeasure NONE
+

“Empty”/”None”, unit of measure of type NONE.

+
+ +
+
+static const UnitOfMeasure SCALE_UNITY
+

Scale unity, unit of measure of type SCALE.

+
+ +
+
+static const UnitOfMeasure PARTS_PER_MILLION
+

Parts-per-million, unit of measure of type SCALE.

+
+ +
+
+static const UnitOfMeasure PPM_PER_YEAR
+

Parts-per-million per year, unit of measure of type SCALE.

+
+ +
+
+static const UnitOfMeasure METRE
+

Metre, unit of measure of type LINEAR (SI unit).

+
+ +
+
+static const UnitOfMeasure METRE_PER_YEAR
+

Metre per year, unit of measure of type LINEAR.

+
+ +
+
+static const UnitOfMeasure FOOT
+

Foot, unit of measure of type LINEAR.

+
+ +
+
+static const UnitOfMeasure US_FOOT
+

US survey foot, unit of measure of type LINEAR.

+
+ +
+
+static const UnitOfMeasure RADIAN
+

Radian, unit of measure of type ANGULAR (SI unit).

+
+ +
+
+static const UnitOfMeasure MICRORADIAN
+

Microradian, unit of measure of type ANGULAR.

+
+ +
+
+static const UnitOfMeasure DEGREE
+

Degree, unit of measure of type ANGULAR.

+
+ +
+
+static const UnitOfMeasure ARC_SECOND
+

Arc-second, unit of measure of type ANGULAR.

+
+ +
+
+static const UnitOfMeasure GRAD
+

Grad, unit of measure of type ANGULAR.

+
+ +
+
+static const UnitOfMeasure ARC_SECOND_PER_YEAR
+

Arc-second per year, unit of measure of type ANGULAR.

+
+ +
+
+static const UnitOfMeasure SECOND
+

Second, unit of measure of type TIME (SI unit).

+
+ +
+
+static const UnitOfMeasure YEAR
+

Year, unit of measure of type TIME.

+
+ +
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/cpp_general.html b/development/reference/cpp/cpp_general.html new file mode 100644 index 00000000..81e045b5 --- /dev/null +++ b/development/reference/cpp/cpp_general.html @@ -0,0 +1,249 @@ + + + + + + + General documentation — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

General documentation

+
+
+page general_doc
+
+

General API design

+

The design of the class hierarchy is strongly derived from ISO 19111:2019.

+

Classes for which the constructors are not directly accessible have their instances constructed with create() methods. The returned object is a non-null shared pointer. Such objects are immutable, and thread-safe.

+

TODO

+
+
+

General properties

+

All classes deriving from IdentifiedObject have general properties that can be defined at creation time. Those properties are:

+

+

+
+
+

Applicable standards

+
+

ISO:19111 / OGC Topic 2 standard

+

Topic 2 - Spatial referencing by coordinates.

+

This is an Abstract Specification describes the data elements, relationships and associated metadata required for spatial referencing by coordinates. It describes Coordinate Reference Systems (CRS), coordinate systems (CS) and coordinate transformation or coordinate conversion between two different coordinate reference systems.

+
+

ISO 19111:2019

+

This is the revision mostly used for PROJ C++ modelling.

+

[OGC 18-005r4, 2019-02-08, ISO 19111:2019] (http://docs.opengeospatial.org/as/18-005r4/18-005r4.html)

+
+
+

ISO 19111:2007

+

The precedent version of the specification was: [OGC 08-015r2, 2010-04-27, ISO 19111:2007] (http://portal.opengeospatial.org/files/?artifact_id=39049)

+
+
+
+

WKT2 standard

+

Well-known text representation of coordinate reference systems.

+

Well-known Text (WKT) offers a compact machine- and human-readable representation of the critical elements of coordinate reference system (CRS) definitions, and coordinate operations. This is an implementation of ISO:19111 / OGC Topic 2 standard

+

PROJ implements the two following revisions of the standard:

+
+

WKT2:2019

+

[OGC 18-010r7, 2019-06-24, WKT2-2019] (http://docs.opengeospatial.org/is/18-010r7/18-010r7.html)

+
+
+

WKT2:2015

+

[OGC 12-063r5, 2015-05-01, ISO 19162:2015(E), WKT2-2015] (http://docs.opengeospatial.org/is/12-063r5/12-063r5.html)

+
+
+
+

WKT1 specification

+

Older specifications of well-known text representation of coordinate reference systems are also supported by PROJ, mostly for compatibility with legacy systems, or older versions of GDAL.

+

GDAL v2.4 and earlier mostly implements:

+

[OGC 01-009, 2001-01-12, OpenGIS Coordinate Transformation Service Implementation Specification] (http://portal.opengeospatial.org/files/?artifact_id=999)

+

The [GDAL documentation, OGC WKT Coordinate System Issues] (https://gdal.org/tutorials/wktproblems.html) discusses issues, and GDAL implementation choices.

+

An older specification of WKT1 is/was used by some software packages:

+

[OGC 99-049, 1999-05-05, OpenGIS Simple Features Specification For SQL v1.1] (http://portal.opengeospatial.org/files/?artifact_id=829)

+
+
+

ISO 19115 (Metadata)

+

Defines the schema required for describing geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal schema, spatial reference, and distribution of digital geographic data.

+

PROJ implements a simplified subset of ISO 19115.

+
+
+

GeoAPI

+

A set of Java and Python language programming interfaces for geospatial applications.

+

GeoAPI main page

+

GeoAPI Javadoc

+

[OGC GeoAPI Implementation Specification] (http://www.opengeospatial.org/standards/geoapi)

+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/crs.html b/development/reference/cpp/crs.html new file mode 100644 index 00000000..943366a3 --- /dev/null +++ b/development/reference/cpp/crs.html @@ -0,0 +1,1966 @@ + + + + + + + crs namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

crs namespace

+
+
+namespace osgeo::proj::crs
+

CRS (coordinate reference system = coordinate system with a datum).

+

osgeo.proj.crs namespace

+
+

Typedefs

+
+
+typedef std::shared_ptr<CRS> CRSPtr
+

Shared pointer of CRS

+
+ +
+
+typedef util::nn<CRSPtr> CRSNNPtr
+

Non-null shared pointer of CRS

+
+ +
+
+typedef std::shared_ptr<GeographicCRS> GeographicCRSPtr
+

Shared pointer of GeographicCRS

+
+ +
+
+typedef util::nn<GeographicCRSPtr> GeographicCRSNNPtr
+

Non-null shared pointer of GeographicCRS

+
+ +
+
+typedef std::shared_ptr<VerticalCRS> VerticalCRSPtr
+

Shared pointer of VerticalCRS

+
+ +
+
+typedef util::nn<VerticalCRSPtr> VerticalCRSNNPtr
+

Non-null shared pointer of VerticalCRS

+
+ +
+
+using BoundCRSPtr = std::shared_ptr<BoundCRS>
+

Shared pointer of BoundCRS

+
+ +
+
+using BoundCRSNNPtr = util::nn<BoundCRSPtr>
+

Non-null shared pointer of BoundCRS

+
+ +
+
+typedef std::shared_ptr<CompoundCRS> CompoundCRSPtr
+

Shared pointer of CompoundCRS

+
+ +
+
+typedef util::nn<CompoundCRSPtr> CompoundCRSNNPtr
+

Non-null shared pointer of CompoundCRS

+
+ +
+
+using SingleCRSPtr = std::shared_ptr<SingleCRS>
+

Shared pointer of SingleCRS

+
+ +
+
+using SingleCRSNNPtr = util::nn<SingleCRSPtr>
+

Non-null shared pointer of SingleCRS

+
+ +
+
+typedef std::shared_ptr<GeodeticCRS> GeodeticCRSPtr
+

Shared pointer of GeodeticCRS

+
+ +
+
+typedef util::nn<GeodeticCRSPtr> GeodeticCRSNNPtr
+

Non-null shared pointer of GeodeticCRS

+
+ +
+
+using DerivedCRSPtr = std::shared_ptr<DerivedCRS>
+

Shared pointer of DerivedCRS

+
+ +
+
+using DerivedCRSNNPtr = util::nn<DerivedCRSPtr>
+

Non-null shared pointer of DerivedCRS

+
+ +
+
+typedef std::shared_ptr<ProjectedCRS> ProjectedCRSPtr
+

Shared pointer of ProjectedCRS

+
+ +
+
+typedef util::nn<ProjectedCRSPtr> ProjectedCRSNNPtr
+

Non-null shared pointer of ProjectedCRS

+
+ +
+
+using TemporalCRSPtr = std::shared_ptr<TemporalCRS>
+

Shared pointer of TemporalCRS

+
+ +
+
+using TemporalCRSNNPtr = util::nn<TemporalCRSPtr>
+

Non-null shared pointer of TemporalCRS

+
+ +
+
+using EngineeringCRSPtr = std::shared_ptr<EngineeringCRS>
+

Shared pointer of EngineeringCRS

+
+ +
+
+using EngineeringCRSNNPtr = util::nn<EngineeringCRSPtr>
+

Non-null shared pointer of EngineeringCRS

+
+ +
+
+using ParametricCRSPtr = std::shared_ptr<ParametricCRS>
+

Shared pointer of ParametricCRS

+
+ +
+
+using ParametricCRSNNPtr = util::nn<ParametricCRSPtr>
+

Non-null shared pointer of ParametricCRS

+
+ +
+
+using DerivedGeodeticCRSPtr = std::shared_ptr<DerivedGeodeticCRS>
+

Shared pointer of DerivedGeodeticCRS

+
+ +
+
+using DerivedGeodeticCRSNNPtr = util::nn<DerivedGeodeticCRSPtr>
+

Non-null shared pointer of DerivedGeodeticCRS

+
+ +
+
+using DerivedGeographicCRSPtr = std::shared_ptr<DerivedGeographicCRS>
+

Shared pointer of DerivedGeographicCRS

+
+ +
+
+using DerivedGeographicCRSNNPtr = util::nn<DerivedGeographicCRSPtr>
+

Non-null shared pointer of DerivedGeographicCRS

+
+ +
+
+using DerivedProjectedCRSPtr = std::shared_ptr<DerivedProjectedCRS>
+

Shared pointer of DerivedProjectedCRS

+
+ +
+
+using DerivedProjectedCRSNNPtr = util::nn<DerivedProjectedCRSPtr>
+

Non-null shared pointer of DerivedProjectedCRS

+
+ +
+
+using DerivedVerticalCRSPtr = std::shared_ptr<DerivedVerticalCRS>
+

Shared pointer of DerivedVerticalCRS

+
+ +
+
+using DerivedVerticalCRSNNPtr = util::nn<DerivedVerticalCRSPtr>
+

Non-null shared pointer of DerivedVerticalCRS

+
+ +
+
+using DerivedEngineeringCRSPtr = std::shared_ptr<DerivedEngineeringCRS>
+

Shared pointer of DerivedEngineeringCRS

+
+ +
+
+using DerivedEngineeringCRSNNPtr = util::nn<DerivedEngineeringCRSPtr>
+

Non-null shared pointer of DerivedEngineeringCRS

+
+ +
+
+using DerivedParametricCRSPtr = std::shared_ptr<DerivedParametricCRS>
+

Shared pointer of DerivedParametricCRS

+
+ +
+
+using DerivedParametricCRSNNPtr = util::nn<DerivedParametricCRSPtr>
+

Non-null shared pointer of DerivedParametricCRS

+
+ +
+
+using DerivedTemporalCRSPtr = std::shared_ptr<DerivedTemporalCRS>
+

Shared pointer of DerivedTemporalCRS

+
+ +
+
+using DerivedTemporalCRSNNPtr = util::nn<DerivedTemporalCRSPtr>
+

Non-null shared pointer of DerivedTemporalCRS

+
+ +
+
+
+class BoundCRS : public osgeo::proj::crs::CRS, public osgeo::proj::io::IPROJStringExportable
+
+#include <crs.hpp>
+

A coordinate reference system with an associated transformation to a target/hub CRS.

+

The definition of a CRS is not dependent upon any relationship to an independent CRS. However in an implementation that merges datasets referenced to differing CRSs, it is sometimes useful to associate the definition of the transformation that has been used with the CRS definition. This facilitates the interrelationship of CRS by concatenating transformations via a common or hub CRS. This is sometimes referred to as “early-binding”. WKT2 standard permits the association of an abridged coordinate transformation description with a coordinate reference system description in a single text string. In a BoundCRS, the abridged coordinate transformation is applied to the source CRS with the target CRS being the common or hub system.

+

Coordinates referring to a BoundCRS are expressed into its source/base CRS.

+

This abstraction can for example model the concept of TOWGS84 datum shift present in WKT1 specification.

+

+

Remark

+

Implements BoundCRS from WKT2 standard

+
+

+
+

Note

+

Contrary to other CRS classes of this package, there is no ISO 19111:2019 modelling of a BoundCRS.

+
+
+

Public Functions

+
+
+const CRSNNPtr &baseCRS()
+

Return the base CRS.

+

This is the CRS into which coordinates of the BoundCRS are expressed.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+CRSNNPtr baseCRSWithCanonicalBoundCRS() const
+

Return a shallow clone of the base CRS that points to a shallow clone of this BoundCRS.

+

The base CRS is the CRS into which coordinates of the BoundCRS are expressed.

+

The returned CRS will actually be a shallow clone of the actual base CRS, with the extra property that CRS::canonicalBoundCRS() will point to a shallow clone of this BoundCRS. Use this only if you want to work with the base CRS object rather than the BoundCRS, but wanting to be able to retrieve the BoundCRS later.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+const CRSNNPtr &hubCRS()
+

Return the target / hub CRS.

+
+
Returns
+

the hub CRS.

+
+
+
+ +
+
+const operation::TransformationNNPtr &transformation()
+

Return the transformation to the hub RS.

+
+
Returns
+

transformation.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static BoundCRSNNPtr create(const util::PropertyMap &properties, const CRSNNPtr &baseCRSIn, const CRSNNPtr &hubCRSIn, const operation::TransformationNNPtr &transformationIn)
+

Instantiate a BoundCRS from a base CRS, a hub CRS and a transformation.

+

+
Since

PROJ 8.2

+
+
+

+
+
Parameters
+
    +
  • properties – See General properties.

  • +
  • baseCRSIn – base CRS.

  • +
  • hubCRSIn – hub CRS.

  • +
  • transformationIn – transformation from base CRS to hub CRS.

  • +
+
+
Returns
+

new BoundCRS.

+
+
+
+ +
+
+static BoundCRSNNPtr create(const CRSNNPtr &baseCRSIn, const CRSNNPtr &hubCRSIn, const operation::TransformationNNPtr &transformationIn)
+

Instantiate a BoundCRS from a base CRS, a hub CRS and a transformation.

+
+
Parameters
+
    +
  • baseCRSIn – base CRS.

  • +
  • hubCRSIn – hub CRS.

  • +
  • transformationIn – transformation from base CRS to hub CRS.

  • +
+
+
Returns
+

new BoundCRS.

+
+
+
+ +
+
+static BoundCRSNNPtr createFromTOWGS84(const CRSNNPtr &baseCRSIn, const std::vector<double> &TOWGS84Parameters)
+

Instantiate a BoundCRS from a base CRS and TOWGS84 parameters.

+
+
Parameters
+
    +
  • baseCRSIn – base CRS.

  • +
  • TOWGS84Parameters – a vector of 3 or 7 double values representing WKT1 TOWGS84 parameter.

  • +
+
+
Returns
+

new BoundCRS.

+
+
+
+ +
+
+static BoundCRSNNPtr createFromNadgrids(const CRSNNPtr &baseCRSIn, const std::string &filename)
+

Instantiate a BoundCRS from a base CRS and nadgrids parameters.

+
+
Parameters
+
    +
  • baseCRSIn – base CRS.

  • +
  • filename – Horizontal grid filename

  • +
+
+
Returns
+

new BoundCRS.

+
+
+
+ +
+
+ +
+
+class CompoundCRS : public osgeo::proj::crs::CRS, public osgeo::proj::io::IPROJStringExportable
+
+#include <crs.hpp>
+

A coordinate reference system describing the position of points through two or more independent single coordinate reference systems.

+

+

Remark

+

Implements CompoundCRS from ISO 19111:2019

+
+

+
+

Note

+

Two coordinate reference systems are independent of each other if coordinate values in one cannot be converted or transformed into coordinate values in the other.

+
+
+

Note

+

As a departure to ISO 19111:2019, we allow to build a CompoundCRS from CRS objects, whereas ISO19111:2019 restricts the components to SingleCRS.

+
+
+

Public Functions

+
+
+const std::vector<CRSNNPtr> &componentReferenceSystems()
+

Return the components of a CompoundCRS.

+
+
Returns
+

the components.

+
+
+
+ +
+
+std::list<std::pair<CompoundCRSNNPtr, int>> identify(const io::AuthorityFactoryPtr &authorityFactory) const
+

Identify the CRS with reference CRSs.

+

The candidate CRSs are looked in the database when authorityFactory is not null.

+

Note that the implementation uses a set of heuristics to have a good compromise of successful identifications over execution time. It might miss legitimate matches in some circumstances.

+

The method returns a list of matching reference CRS, and the percentage (0-100) of confidence in the match. The list is sorted by decreasing confidence.

+

100% means that the name of the reference entry perfectly matches the CRS name, and both are equivalent. In which case a single result is returned. 90% means that CRS are equivalent, but the names are not exactly the same. 70% means that CRS are equivalent (equivalent horizontal and vertical CRS), but the names are not equivalent. 25% means that the CRS are not equivalent, but there is some similarity in the names.

+
+
Parameters
+

authorityFactory – Authority factory (if null, will return an empty list)

+
+
Returns
+

a list of matching reference CRS, and the percentage (0-100) of confidence in the match.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static CompoundCRSNNPtr create(const util::PropertyMap &properties, const std::vector<CRSNNPtr> &components)
+

Instantiate a CompoundCRS from a vector of CRS.

+
+
Parameters
+
+
+
Throws
+

InvalidCompoundCRSException

+
+
Returns
+

new CompoundCRS.

+
+
+
+ +
+
+ +
+
+class CRS : public osgeo::proj::common::ObjectUsage, public osgeo::proj::io::IJSONExportable
+
+#include <crs.hpp>
+

Abstract class modelling a coordinate reference system which is usually single but may be compound.

+

+

Remark

+

Implements CRS from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::crs::BoundCRS, osgeo::proj::crs::CompoundCRS, osgeo::proj::crs::SingleCRS

+
+

Public Functions

+
+
+GeodeticCRSPtr extractGeodeticCRS() const
+

Return the GeodeticCRS of the CRS.

+

Returns the GeodeticCRS contained in a CRS. This works currently with input parameters of type GeodeticCRS or derived, ProjectedCRS, CompoundCRS or BoundCRS.

+
+
Returns
+

a GeodeticCRSPtr, that might be null.

+
+
+
+ +
+
+GeographicCRSPtr extractGeographicCRS() const
+

Return the GeographicCRS of the CRS.

+

Returns the GeographicCRS contained in a CRS. This works currently with input parameters of type GeographicCRS or derived, ProjectedCRS, CompoundCRS or BoundCRS.

+
+
Returns
+

a GeographicCRSPtr, that might be null.

+
+
+
+ +
+
+VerticalCRSPtr extractVerticalCRS() const
+

Return the VerticalCRS of the CRS.

+

Returns the VerticalCRS contained in a CRS. This works currently with input parameters of type VerticalCRS or derived, CompoundCRS or BoundCRS.

+
+
Returns
+

a VerticalCRSPtr, that might be null.

+
+
+
+ +
+
+CRSNNPtr createBoundCRSToWGS84IfPossible(const io::DatabaseContextPtr &dbContext, operation::CoordinateOperationContext::IntermediateCRSUse allowIntermediateCRSUse) const
+

Returns potentially a BoundCRS, with a transformation to EPSG:4326, wrapping this CRS.

+

If no such BoundCRS is possible, the object will be returned.

+

The purpose of this method is to be able to format a PROJ.4 string with a +towgs84 parameter or a WKT1:GDAL string with a TOWGS node.

+

This method will fetch the GeographicCRS of this CRS and find a transformation to EPSG:4326 using the domain of the validity of the main CRS, and there’s only one Helmert transformation.

+
+
Returns
+

a CRS.

+
+
+
+ +
+
+CRSNNPtr stripVerticalComponent() const
+

Returns a CRS whose coordinate system does not contain a vertical component.

+
+
Returns
+

a CRS.

+
+
+
+ +
+
+const BoundCRSPtr &canonicalBoundCRS()
+

Return the BoundCRS potentially attached to this CRS.

+

In the case this method is called on a object returned by BoundCRS::baseCRSWithCanonicalBoundCRS(), this method will return this BoundCRS

+
+
Returns
+

a BoundCRSPtr, that might be null.

+
+
+
+ +
+
+std::list<std::pair<CRSNNPtr, int>> identify(const io::AuthorityFactoryPtr &authorityFactory) const
+

Identify the CRS with reference CRSs.

+

The candidate CRSs are either hard-coded, or looked in the database when authorityFactory is not null.

+

Note that the implementation uses a set of heuristics to have a good compromise of successful identifications over execution time. It might miss legitimate matches in some circumstances.

+

The method returns a list of matching reference CRS, and the percentage (0-100) of confidence in the match. The list is sorted by decreasing confidence.

    +
  • 100% means that the name of the reference entry perfectly matches the CRS name, and both are equivalent. In which case a single result is returned. Note: in the case of a GeographicCRS whose axis order is implicit in the input definition (for example ESRI WKT), then axis order is ignored for the purpose of identification. That is the CRS

    built from GEOGCS[“GCS_WGS_1984”,DATUM[“D_WGS_1984”,SPHEROID[“WGS_1984”,6378137.0,298.257223563]], PRIMEM[“Greenwich”,0.0],UNIT[“Degree”,0.0174532925199433]] will be identified to EPSG:4326, but will not pass a isEquivalentTo(EPSG_4326, util::IComparable::Criterion::EQUIVALENT) test, but rather isEquivalentTo(EPSG_4326,

    +

    util::IComparable::Criterion::EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS)

    +

  • +
  • 90% means that CRS are equivalent, but the names are not exactly the same.

  • +
  • 70% means that CRS are equivalent), but the names do not match at all.

  • +
  • 25% means that the CRS are not equivalent, but there is some similarity in the names.

  • +
+ +Other confidence values may be returned by some specialized implementations.

+

This is implemented for GeodeticCRS, ProjectedCRS, VerticalCRS and CompoundCRS.

+
+
Parameters
+

authorityFactory – Authority factory (or null, but degraded functionality)

+
+
Returns
+

a list of matching reference CRS, and the percentage (0-100) of confidence in the match.

+
+
+
+ +
+
+std::list<CRSNNPtr> getNonDeprecated(const io::DatabaseContextNNPtr &dbContext) const
+

Return CRSs that are non-deprecated substitutes for the current CRS.

+
+ +
+
+CRSNNPtr promoteTo3D(const std::string &newName, const io::DatabaseContextPtr &dbContext) const
+

Return a variant of this CRS “promoted” to a 3D one, if not already the case.

+

The new axis will be ellipsoidal height, oriented upwards, and with metre units.

+

+
Since

6.3

+
+
+

+
+
Parameters
+
    +
  • newName – Name of the new CRS. If empty, nameStr() will be used.

  • +
  • dbContext – Database context to look for potentially already registered 3D CRS. May be nullptr.

  • +
+
+
Returns
+

a new CRS promoted to 3D, or the current one if already 3D or not applicable.

+
+
+
+ +
+
+CRSNNPtr demoteTo2D(const std::string &newName, const io::DatabaseContextPtr &dbContext) const
+

Return a variant of this CRS “demoted” to a 2D one, if not already the case.

+

+
Since

6.3

+
+
+

+
+
Parameters
+
    +
  • newName – Name of the new CRS. If empty, nameStr() will be used.

  • +
  • dbContext – Database context to look for potentially already registered 2D CRS. May be nullptr.

  • +
+
+
Returns
+

a new CRS demoted to 2D, or the current one if already 2D or not applicable.

+
+
+
+ +
+
+ +
+
+class DerivedCRS : public virtual osgeo::proj::crs::SingleCRS
+
+#include <crs.hpp>
+

Abstract class modelling a single coordinate reference system that is defined through the application of a specified coordinate conversion to the definition of a previously established single coordinate reference system referred to as the base CRS.

+

A derived coordinate reference system inherits its datum (or datum ensemble) from its base CRS. The coordinate conversion between the base and derived coordinate reference system is implemented using the parameters and formula(s) specified in the definition of the coordinate conversion.

+

+

Remark

+

Implements DerivedCRS from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::crs::DerivedCRSTemplate< DerivedEngineeringCRSTraits >, osgeo::proj::crs::DerivedCRSTemplate< DerivedParametricCRSTraits >, osgeo::proj::crs::DerivedCRSTemplate< DerivedTemporalCRSTraits >, osgeo::proj::crs::DerivedCRSTemplate< DerivedCRSTraits >, osgeo::proj::crs::DerivedGeodeticCRS, osgeo::proj::crs::DerivedGeographicCRS, osgeo::proj::crs::DerivedProjectedCRS, osgeo::proj::crs::DerivedVerticalCRS, osgeo::proj::crs::ProjectedCRS

+
+

Public Functions

+
+
+const SingleCRSNNPtr &baseCRS()
+

Return the base CRS of a DerivedCRS.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+const operation::ConversionNNPtr derivingConversion() const
+

Return the deriving conversion from the base CRS to this CRS.

+
+
Returns
+

the deriving conversion.

+
+
+
+ +
+
+ +
+
+template<class DerivedCRSTraits>
class DerivedCRSTemplate : public DerivedCRSTraits::BaseType, public osgeo::proj::crs::DerivedCRS
+
+#include <crs.hpp>
+

Template representing a derived coordinate reference system.

+
+

Public Types

+
+
+typedef util::nn<std::shared_ptr<DerivedCRSTemplate>> NNPtr
+

Non-null shared pointer of DerivedCRSTemplate

+
+ +
+
+typedef util::nn<std::shared_ptr<BaseType>> BaseNNPtr
+

Non-null shared pointer of BaseType

+
+ +
+
+typedef util::nn<std::shared_ptr<CSType>> CSNNPtr
+

Non-null shared pointer of CSType

+
+ +
+
+

Public Functions

+
+
+const BaseNNPtr baseCRS() const
+

Return the base CRS of a DerivedCRSTemplate.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static NNPtr create(const util::PropertyMap &properties, const BaseNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, const CSNNPtr &csIn)
+

Instantiate a DerivedCRSTemplate from a base CRS, a deriving conversion and a cs::CoordinateSystem.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • baseCRSIn – base CRS.

  • +
  • derivingConversionIn – the deriving conversion from the base CRS to this CRS.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new DerivedCRSTemplate.

+
+
+
+ +
+
+ +
+
+class DerivedEngineeringCRS : public osgeo::proj::crs::DerivedCRSTemplate<DerivedEngineeringCRSTraits>
+
+#include <crs.hpp>
+

A derived coordinate reference system which has an engineering coordinate reference system as its base CRS, thereby inheriting an engineering datum, and is associated with one of the coordinate system types for an EngineeringCRS.

+

+

Remark

+

Implements DerivedEngineeringCRS from ISO 19111:2019

+
+

+
+ +
+
+class DerivedGeodeticCRS : public osgeo::proj::crs::GeodeticCRS, public osgeo::proj::crs::DerivedCRS
+
+#include <crs.hpp>
+

A derived coordinate reference system which has either a geodetic or a geographic coordinate reference system as its base CRS, thereby inheriting a geodetic reference frame, and associated with a 3D Cartesian or spherical coordinate system.

+

+

Remark

+

Implements DerivedGeodeticCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const GeodeticCRSNNPtr baseCRS() const
+

Return the base CRS (a GeodeticCRS) of a DerivedGeodeticCRS.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static DerivedGeodeticCRSNNPtr create(const util::PropertyMap &properties, const GeodeticCRSNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, const cs::CartesianCSNNPtr &csIn)
+

Instantiate a DerivedGeodeticCRS from a base CRS, a deriving conversion and a cs::CartesianCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • baseCRSIn – base CRS.

  • +
  • derivingConversionIn – the deriving conversion from the base CRS to this CRS.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new DerivedGeodeticCRS.

+
+
+
+ +
+
+static DerivedGeodeticCRSNNPtr create(const util::PropertyMap &properties, const GeodeticCRSNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, const cs::SphericalCSNNPtr &csIn)
+

Instantiate a DerivedGeodeticCRS from a base CRS, a deriving conversion and a cs::SphericalCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • baseCRSIn – base CRS.

  • +
  • derivingConversionIn – the deriving conversion from the base CRS to this CRS.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new DerivedGeodeticCRS.

+
+
+
+ +
+
+ +
+
+class DerivedGeographicCRS : public osgeo::proj::crs::GeographicCRS, public osgeo::proj::crs::DerivedCRS
+
+#include <crs.hpp>
+

A derived coordinate reference system which has either a geodetic or a geographic coordinate reference system as its base CRS, thereby inheriting a geodetic reference frame, and an ellipsoidal coordinate system.

+

A derived geographic CRS can be based on a geodetic CRS only if that geodetic CRS definition includes an ellipsoid.

+

+

Remark

+

Implements DerivedGeographicCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const GeodeticCRSNNPtr baseCRS() const
+

Return the base CRS (a GeodeticCRS) of a DerivedGeographicCRS.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+DerivedGeographicCRSNNPtr demoteTo2D(const std::string &newName, const io::DatabaseContextPtr &dbContext) const
+

Return a variant of this CRS “demoted” to a 2D one, if not already the case.

+

+
Since

8.1.1

+
+
+

+
+
Parameters
+
    +
  • newName – Name of the new CRS. If empty, nameStr() will be used.

  • +
  • dbContext – Database context to look for potentially already registered 2D CRS. May be nullptr.

  • +
+
+
Returns
+

a new CRS demoted to 2D, or the current one if already 2D or not applicable.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static DerivedGeographicCRSNNPtr create(const util::PropertyMap &properties, const GeodeticCRSNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, const cs::EllipsoidalCSNNPtr &csIn)
+

Instantiate a DerivedGeographicCRS from a base CRS, a deriving conversion and a cs::EllipsoidalCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • baseCRSIn – base CRS.

  • +
  • derivingConversionIn – the deriving conversion from the base CRS to this CRS.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new DerivedGeographicCRS.

+
+
+
+ +
+
+ +
+
+class DerivedParametricCRS : public osgeo::proj::crs::DerivedCRSTemplate<DerivedParametricCRSTraits>
+
+#include <crs.hpp>
+

A derived coordinate reference system which has a parametric coordinate reference system as its base CRS, thereby inheriting a parametric datum, and a parametric coordinate system.

+

+

Remark

+

Implements DerivedParametricCRS from ISO 19111:2019

+
+

+
+ +
+
+class DerivedProjectedCRS : public osgeo::proj::crs::DerivedCRS
+
+#include <crs.hpp>
+

A derived coordinate reference system which has a projected coordinate reference system as its base CRS, thereby inheriting a geodetic reference frame, but also inheriting the distortion characteristics of the base projected CRS.

+

A DerivedProjectedCRS is not a ProjectedCRS.

+

+

Remark

+

Implements DerivedProjectedCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const ProjectedCRSNNPtr baseCRS() const
+

Return the base CRS (a ProjectedCRS) of a DerivedProjectedCRS.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static DerivedProjectedCRSNNPtr create(const util::PropertyMap &properties, const ProjectedCRSNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, const cs::CoordinateSystemNNPtr &csIn)
+

Instantiate a DerivedProjectedCRS from a base CRS, a deriving conversion and a cs::CS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • baseCRSIn – base CRS.

  • +
  • derivingConversionIn – the deriving conversion from the base CRS to this CRS.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new DerivedProjectedCRS.

+
+
+
+ +
+
+ +
+
+class DerivedTemporalCRS : public osgeo::proj::crs::DerivedCRSTemplate<DerivedTemporalCRSTraits>
+
+#include <crs.hpp>
+

A derived coordinate reference system which has a temporal coordinate reference system as its base CRS, thereby inheriting a temporal datum, and a temporal coordinate system.

+

+

Remark

+

Implements DerivedTemporalCRS from ISO 19111:2019

+
+

+
+ +
+
+class DerivedVerticalCRS : public osgeo::proj::crs::VerticalCRS, public osgeo::proj::crs::DerivedCRS
+
+#include <crs.hpp>
+

A derived coordinate reference system which has a vertical coordinate reference system as its base CRS, thereby inheriting a vertical reference frame, and a vertical coordinate system.

+

+

Remark

+

Implements DerivedVerticalCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const VerticalCRSNNPtr baseCRS() const
+

Return the base CRS (a VerticalCRS) of a DerivedVerticalCRS.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static DerivedVerticalCRSNNPtr create(const util::PropertyMap &properties, const VerticalCRSNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, const cs::VerticalCSNNPtr &csIn)
+

Instantiate a DerivedVerticalCRS from a base CRS, a deriving conversion and a cs::VerticalCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • baseCRSIn – base CRS.

  • +
  • derivingConversionIn – the deriving conversion from the base CRS to this CRS.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new DerivedVerticalCRS.

+
+
+
+ +
+
+ +
+
+class EngineeringCRS : public virtual osgeo::proj::crs::SingleCRS
+
+#include <crs.hpp>
+

Contextually local coordinate reference system associated with an engineering datum.

+

It is applied either to activities on or near the surface of the Earth without geodetic corrections, or on moving platforms such as road vehicles, vessels, aircraft or spacecraft, or as the internal CRS of an image.

+

In WKT2 standard, it maps to a ENGINEERINGCRS / ENGCRS keyword. In WKT1 specification, it maps to a LOCAL_CS keyword.

+

+

Remark

+

Implements EngineeringCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const datum::EngineeringDatumNNPtr datum() const
+

Return the datum::EngineeringDatum associated with the CRS.

+
+
Returns
+

a EngineeringDatum

+
+
+
+ +
+
+

Public Static Functions

+
+
+static EngineeringCRSNNPtr create(const util::PropertyMap &properties, const datum::EngineeringDatumNNPtr &datumIn, const cs::CoordinateSystemNNPtr &csIn)
+

Instantiate a EngineeringCRS from a datum and a coordinate system.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datumIn – the datum.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new EngineeringCRS.

+
+
+
+ +
+
+ +
+
+class GeodeticCRS : public virtual osgeo::proj::crs::SingleCRS, public osgeo::proj::io::IPROJStringExportable
+
+#include <crs.hpp>
+

A coordinate reference system associated with a geodetic reference frame and a three-dimensional Cartesian or spherical coordinate system.

+

If the geodetic reference frame is dynamic or if the geodetic CRS has an association to a velocity model then the geodetic CRS is dynamic, else it is static.

+

+

Remark

+

Implements GeodeticCRS from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::crs::DerivedGeodeticCRS, osgeo::proj::crs::GeographicCRS

+
+

Public Functions

+
+
+const datum::GeodeticReferenceFramePtr &datum()
+

Return the datum::GeodeticReferenceFrame associated with the CRS.

+
+
Returns
+

a GeodeticReferenceFrame or null (in which case datumEnsemble() should return a non-null pointer.)

+
+
+
+ +
+
+const datum::PrimeMeridianNNPtr &primeMeridian()
+

Return the PrimeMeridian associated with the GeodeticReferenceFrame or with one of the GeodeticReferenceFrame of the datumEnsemble().

+
+
Returns
+

the PrimeMeridian.

+
+
+
+ +
+
+const datum::EllipsoidNNPtr &ellipsoid()
+

Return the ellipsoid associated with the GeodeticReferenceFrame or with one of the GeodeticReferenceFrame of the datumEnsemble().

+
+
Returns
+

the PrimeMeridian.

+
+
+
+ +
+
+const std::vector<operation::PointMotionOperationNNPtr> &velocityModel()
+

Return the velocity model associated with the CRS.

+
+
Returns
+

a velocity model. might be null.

+
+
+
+ +
+
+bool isGeocentric()
+

Return whether the CRS is a Cartesian geocentric one.

+

A geocentric CRS is a geodetic CRS that has a Cartesian coordinate system with three axis, whose direction is respectively cs::AxisDirection::GEOCENTRIC_X, cs::AxisDirection::GEOCENTRIC_Y and cs::AxisDirection::GEOCENTRIC_Z.

+
+
Returns
+

true if the CRS is a geocentric CRS.

+
+
+
+ +
+
+bool isSphericalPlanetocentric()
+

Return whether the CRS is a Spherical planetocentric one.

+

A Spherical planetocentric CRS is a geodetic CRS that has a spherical (angular) coordinate system with 2 axis, which represent geocentric latitude/ longitude or longitude/geocentric latitude.

+

Such CRS are typically used in use case that apply to non-Earth bodies.

+

+
Since

8.2

+
+
+

+
+
Returns
+

true if the CRS is a Spherical planetocentric CRS.

+
+
+
+ +
+
+std::list<std::pair<GeodeticCRSNNPtr, int>> identify(const io::AuthorityFactoryPtr &authorityFactory) const
+

Identify the CRS with reference CRSs.

+

The candidate CRSs are either hard-coded, or looked in the database when authorityFactory is not null.

+

Note that the implementation uses a set of heuristics to have a good compromise of successful identifications over execution time. It might miss legitimate matches in some circumstances.

+

The method returns a list of matching reference CRS, and the percentage (0-100) of confidence in the match:

    +
  • 100% means that the name of the reference entry perfectly matches the CRS name, and both are equivalent. In which case a single result is returned. Note: in the case of a GeographicCRS whose axis order is implicit in the input definition (for example ESRI WKT), then axis order is ignored for the purpose of identification. That is the CRS

    built from GEOGCS[“GCS_WGS_1984”,DATUM[“D_WGS_1984”,SPHEROID[“WGS_1984”,6378137.0,298.257223563]], PRIMEM[“Greenwich”,0.0],UNIT[“Degree”,0.0174532925199433]] will be identified to EPSG:4326, but will not pass a isEquivalentTo(EPSG_4326, util::IComparable::Criterion::EQUIVALENT) test, but rather isEquivalentTo(EPSG_4326,

    +

    util::IComparable::Criterion::EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS)

    +

  • +
  • 90% means that CRS are equivalent, but the names are not exactly the same.

  • +
  • 70% means that CRS are equivalent (equivalent datum and coordinate system), but the names are not equivalent.

  • +
  • 60% means that ellipsoid, prime meridian and coordinate systems are equivalent, but the CRS and datum names do not match.

  • +
  • 25% means that the CRS are not equivalent, but there is some similarity in the names.

  • +
+

+
+
Parameters
+

authorityFactory – Authority factory (or null, but degraded functionality)

+
+
Returns
+

a list of matching reference CRS, and the percentage (0-100) of confidence in the match.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static GeodeticCRSNNPtr create(const util::PropertyMap &properties, const datum::GeodeticReferenceFrameNNPtr &datum, const cs::SphericalCSNNPtr &cs)
+

Instantiate a GeodeticCRS from a datum::GeodeticReferenceFrame and a cs::SphericalCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datum – The datum of the CRS.

  • +
  • cs – a SphericalCS.

  • +
+
+
Returns
+

new GeodeticCRS.

+
+
+
+ +
+
+static GeodeticCRSNNPtr create(const util::PropertyMap &properties, const datum::GeodeticReferenceFrameNNPtr &datum, const cs::CartesianCSNNPtr &cs)
+

Instantiate a GeodeticCRS from a datum::GeodeticReferenceFrame and a cs::CartesianCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datum – The datum of the CRS.

  • +
  • cs – a CartesianCS.

  • +
+
+
Returns
+

new GeodeticCRS.

+
+
+
+ +
+
+static GeodeticCRSNNPtr create(const util::PropertyMap &properties, const datum::GeodeticReferenceFramePtr &datum, const datum::DatumEnsemblePtr &datumEnsemble, const cs::SphericalCSNNPtr &cs)
+

Instantiate a GeodeticCRS from a datum::GeodeticReferenceFrame or datum::DatumEnsemble and a cs::SphericalCS.

+

One and only one of datum or datumEnsemble should be set to a non-null value.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datum – The datum of the CRS, or nullptr

  • +
  • datumEnsemble – The datum ensemble of the CRS, or nullptr.

  • +
  • cs – a SphericalCS.

  • +
+
+
Returns
+

new GeodeticCRS.

+
+
+
+ +
+
+static GeodeticCRSNNPtr create(const util::PropertyMap &properties, const datum::GeodeticReferenceFramePtr &datum, const datum::DatumEnsemblePtr &datumEnsemble, const cs::CartesianCSNNPtr &cs)
+

Instantiate a GeodeticCRS from a datum::GeodeticReferenceFrame or datum::DatumEnsemble and a cs::CartesianCS.

+

One and only one of datum or datumEnsemble should be set to a non-null value.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datum – The datum of the CRS, or nullptr

  • +
  • datumEnsemble – The datum ensemble of the CRS, or nullptr.

  • +
  • cs – a CartesianCS

  • +
+
+
Returns
+

new GeodeticCRS.

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static const GeodeticCRSNNPtr EPSG_4978
+

EPSG:4978 / “WGS 84” Geocentric.

+
+ +
+
+ +
+
+class GeographicCRS : public osgeo::proj::crs::GeodeticCRS
+
+#include <crs.hpp>
+

A coordinate reference system associated with a geodetic reference frame and a two- or three-dimensional ellipsoidal coordinate system.

+

If the geodetic reference frame is dynamic or if the geographic CRS has an association to a velocity model then the geodetic CRS is dynamic, else it is static.

+

+

Remark

+

Implements GeographicCRS from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::crs::DerivedGeographicCRS

+
+

Public Functions

+
+
+const cs::EllipsoidalCSNNPtr &coordinateSystem()
+

Return the cs::EllipsoidalCS associated with the CRS.

+
+
Returns
+

a EllipsoidalCS.

+
+
+
+ +
+
+GeographicCRSNNPtr demoteTo2D(const std::string &newName, const io::DatabaseContextPtr &dbContext) const
+

Return a variant of this CRS “demoted” to a 2D one, if not already the case.

+

+
Since

6.3

+
+
+

+
+
Parameters
+
    +
  • newName – Name of the new CRS. If empty, nameStr() will be used.

  • +
  • dbContext – Database context to look for potentially already registered 2D CRS. May be nullptr.

  • +
+
+
Returns
+

a new CRS demoted to 2D, or the current one if already 2D or not applicable.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static GeographicCRSNNPtr create(const util::PropertyMap &properties, const datum::GeodeticReferenceFrameNNPtr &datum, const cs::EllipsoidalCSNNPtr &cs)
+

Instantiate a GeographicCRS from a datum::GeodeticReferenceFrameNNPtr and a cs::EllipsoidalCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datum – The datum of the CRS.

  • +
  • cs – a EllipsoidalCS.

  • +
+
+
Returns
+

new GeographicCRS.

+
+
+
+ +
+
+static GeographicCRSNNPtr create(const util::PropertyMap &properties, const datum::GeodeticReferenceFramePtr &datum, const datum::DatumEnsemblePtr &datumEnsemble, const cs::EllipsoidalCSNNPtr &cs)
+

Instantiate a GeographicCRS from a datum::GeodeticReferenceFramePtr or datum::DatumEnsemble and a cs::EllipsoidalCS.

+

One and only one of datum or datumEnsemble should be set to a non-null value.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datum – The datum of the CRS, or nullptr

  • +
  • datumEnsemble – The datum ensemble of the CRS, or nullptr.

  • +
  • cs – a EllipsoidalCS.

  • +
+
+
Returns
+

new GeographicCRS.

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static const GeographicCRSNNPtr EPSG_4267
+

EPSG:4267 / “NAD27” 2D GeographicCRS.

+
+ +
+
+static const GeographicCRSNNPtr EPSG_4269
+

EPSG:4269 / “NAD83” 2D GeographicCRS.

+
+ +
+
+static const GeographicCRSNNPtr EPSG_4326
+

EPSG:4326 / “WGS 84” 2D GeographicCRS.

+
+ +
+
+static const GeographicCRSNNPtr OGC_CRS84
+

OGC:CRS84 / “CRS 84” 2D GeographicCRS (long, lat)

+
+ +
+
+static const GeographicCRSNNPtr EPSG_4807
+

EPSG:4807 / “NTF (Paris)” 2D GeographicCRS.

+
+ +
+
+static const GeographicCRSNNPtr EPSG_4979
+

EPSG:4979 / “WGS 84” 3D GeographicCRS.

+
+ +
+
+ +
+
+class InvalidCompoundCRSException : public osgeo::proj::util::Exception
+
+#include <crs.hpp>
+

Exception thrown when attempting to create an invalid compound CRS.

+
+ +
+
+class ParametricCRS : public virtual osgeo::proj::crs::SingleCRS
+
+#include <crs.hpp>
+

Contextually local coordinate reference system associated with an engineering datum.

+

This is applied either to activities on or near the surface of the Earth without geodetic corrections, or on moving platforms such as road vehicles vessels, aircraft or spacecraft, or as the internal CRS of an image.

+

+

Remark

+

Implements ParametricCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const datum::ParametricDatumNNPtr datum() const
+

Return the datum::ParametricDatum associated with the CRS.

+
+
Returns
+

a ParametricDatum

+
+
+
+ +
+
+const cs::ParametricCSNNPtr coordinateSystem() const
+

Return the cs::TemporalCS associated with the CRS.

+
+
Returns
+

a TemporalCS

+
+
+
+ +
+
+

Public Static Functions

+
+
+static ParametricCRSNNPtr create(const util::PropertyMap &properties, const datum::ParametricDatumNNPtr &datumIn, const cs::ParametricCSNNPtr &csIn)
+

Instantiate a ParametricCRS from a datum and a coordinate system.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datumIn – the datum.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new ParametricCRS.

+
+
+
+ +
+
+ +
+
+class ProjectedCRS : public osgeo::proj::crs::DerivedCRS, public osgeo::proj::io::IPROJStringExportable
+
+#include <crs.hpp>
+

A derived coordinate reference system which has a geodetic (usually geographic) coordinate reference system as its base CRS, thereby inheriting a geodetic reference frame, and is converted using a map projection.

+

It has a Cartesian coordinate system, usually two-dimensional but may be three-dimensional; in the 3D case the base geographic CRSs ellipsoidal height is passed through unchanged and forms the vertical axis of the projected CRS’s Cartesian coordinate system.

+

+

Remark

+

Implements ProjectedCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const GeodeticCRSNNPtr &baseCRS()
+

Return the base CRS (a GeodeticCRS, which is generally a GeographicCRS) of the ProjectedCRS.

+
+
Returns
+

the base CRS.

+
+
+
+ +
+
+const cs::CartesianCSNNPtr &coordinateSystem()
+

Return the cs::CartesianCS associated with the CRS.

+
+
Returns
+

a CartesianCS

+
+
+
+ +
+
+std::list<std::pair<ProjectedCRSNNPtr, int>> identify(const io::AuthorityFactoryPtr &authorityFactory) const
+

Identify the CRS with reference CRSs.

+

The candidate CRSs are either hard-coded, or looked in the database when authorityFactory is not null.

+

Note that the implementation uses a set of heuristics to have a good compromise of successful identifications over execution time. It might miss legitimate matches in some circumstances.

+

The method returns a list of matching reference CRS, and the percentage (0-100) of confidence in the match. The list is sorted by decreasing confidence.

+

100% means that the name of the reference entry perfectly matches the CRS name, and both are equivalent. In which case a single result is returned. 90% means that CRS are equivalent, but the names are not exactly the same. 70% means that CRS are equivalent (equivalent base CRS, conversion and coordinate system), but the names are not equivalent. 60% means that CRS have strong similarity (equivalent base datum, conversion and coordinate system), but the names are not equivalent. 50% means that CRS have similarity (equivalent base ellipsoid and conversion), but the coordinate system do not match (e.g. different axis ordering or axis unit). 25% means that the CRS are not equivalent, but there is some similarity in the names.

+

For the purpose of this function, equivalence is tested with the util::IComparable::Criterion::EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS, that is to say that the axis order of the base GeographicCRS is ignored.

+
+
Parameters
+

authorityFactory – Authority factory (or null, but degraded functionality)

+
+
Returns
+

a list of matching reference CRS, and the percentage (0-100) of confidence in the match.

+
+
+
+ +
+
+ProjectedCRSNNPtr demoteTo2D(const std::string &newName, const io::DatabaseContextPtr &dbContext) const
+

Return a variant of this CRS “demoted” to a 2D one, if not already the case.

+

+
Since

6.3

+
+
+

+
+
Parameters
+
    +
  • newName – Name of the new CRS. If empty, nameStr() will be used.

  • +
  • dbContext – Database context to look for potentially already registered 2D CRS. May be nullptr.

  • +
+
+
Returns
+

a new CRS demoted to 2D, or the current one if already 2D or not applicable.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static ProjectedCRSNNPtr create(const util::PropertyMap &properties, const GeodeticCRSNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, const cs::CartesianCSNNPtr &csIn)
+

Instantiate a ProjectedCRS from a base CRS, a deriving operation::Conversion and a coordinate system.

+
+
Parameters
+
+
+
Returns
+

new ProjectedCRS.

+
+
+
+ +
+
+ +
+
+class SingleCRS : public osgeo::proj::crs::CRS
+
+#include <crs.hpp>
+

Abstract class modelling a coordinate reference system consisting of one Coordinate System and either one datum::Datum or one datum::DatumEnsemble.

+

+

Remark

+

Implements SingleCRS from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::crs::DerivedCRS, osgeo::proj::crs::EngineeringCRS, osgeo::proj::crs::GeodeticCRS, osgeo::proj::crs::ParametricCRS, osgeo::proj::crs::TemporalCRS, osgeo::proj::crs::VerticalCRS

+
+

Public Functions

+
+
+const datum::DatumPtr &datum()
+

Return the datum::Datum associated with the CRS.

+

This might be null, in which case datumEnsemble() return will not be null.

+
+
Returns
+

a Datum that might be null.

+
+
+
+ +
+
+const datum::DatumEnsemblePtr &datumEnsemble()
+

Return the datum::DatumEnsemble associated with the CRS.

+

This might be null, in which case datum() return will not be null.

+
+
Returns
+

a DatumEnsemble that might be null.

+
+
+
+ +
+
+const cs::CoordinateSystemNNPtr &coordinateSystem()
+

Return the cs::CoordinateSystem associated with the CRS.

+
+
Returns
+

a CoordinateSystem.

+
+
+
+ +
+
+ +
+
+class TemporalCRS : public virtual osgeo::proj::crs::SingleCRS
+
+#include <crs.hpp>
+

A coordinate reference system associated with a temporal datum and a one-dimensional temporal coordinate system.

+

+

Remark

+

Implements TemporalCRS from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const datum::TemporalDatumNNPtr datum() const
+

Return the datum::TemporalDatum associated with the CRS.

+
+
Returns
+

a TemporalDatum

+
+
+
+ +
+
+const cs::TemporalCSNNPtr coordinateSystem() const
+

Return the cs::TemporalCS associated with the CRS.

+
+
Returns
+

a TemporalCS

+
+
+
+ +
+
+

Public Static Functions

+
+
+static TemporalCRSNNPtr create(const util::PropertyMap &properties, const datum::TemporalDatumNNPtr &datumIn, const cs::TemporalCSNNPtr &csIn)
+

Instantiate a TemporalCRS from a datum and a coordinate system.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datumIn – the datum.

  • +
  • csIn – the coordinate system.

  • +
+
+
Returns
+

new TemporalCRS.

+
+
+
+ +
+
+ +
+
+class VerticalCRS : public virtual osgeo::proj::crs::SingleCRS, public osgeo::proj::io::IPROJStringExportable
+
+#include <crs.hpp>
+

A coordinate reference system having a vertical reference frame and a one-dimensional vertical coordinate system used for recording gravity-related heights or depths.

+

Vertical CRSs make use of the direction of gravity to define the concept of height or depth, but the relationship with gravity may not be straightforward. If the vertical reference frame is dynamic or if the vertical CRS has an association to a velocity model then the CRS is dynamic, else it is static.

+

+

Remark

+

Implements VerticalCRS from ISO 19111:2019

+
+

+
+

Note

+

Ellipsoidal heights cannot be captured in a vertical coordinate reference system. They exist only as an inseparable part of a 3D coordinate tuple defined in a geographic 3D coordinate reference system.

+
+

Subclassed by osgeo::proj::crs::DerivedVerticalCRS

+
+

Public Functions

+
+
+const datum::VerticalReferenceFramePtr datum() const
+

Return the datum::VerticalReferenceFrame associated with the CRS.

+
+
Returns
+

a VerticalReferenceFrame.

+
+
+
+ +
+
+const cs::VerticalCSNNPtr coordinateSystem() const
+

Return the cs::VerticalCS associated with the CRS.

+
+
Returns
+

a VerticalCS.

+
+
+
+ +
+
+const std::vector<operation::TransformationNNPtr> &geoidModel()
+

Return the geoid model associated with the CRS.

+

Geoid height model or height correction model linked to a geoid-based vertical CRS.

+
+
Returns
+

a geoid model. might be null

+
+
+
+ +
+
+const std::vector<operation::PointMotionOperationNNPtr> &velocityModel()
+

Return the velocity model associated with the CRS.

+
+
Returns
+

a velocity model. might be null.

+
+
+
+ +
+
+std::list<std::pair<VerticalCRSNNPtr, int>> identify(const io::AuthorityFactoryPtr &authorityFactory) const
+

Identify the CRS with reference CRSs.

+

The candidate CRSs are looked in the database when authorityFactory is not null.

+

Note that the implementation uses a set of heuristics to have a good compromise of successful identifications over execution time. It might miss legitimate matches in some circumstances.

+

The method returns a list of matching reference CRS, and the percentage (0-100) of confidence in the match. 100% means that the name of the reference entry perfectly matches the CRS name, and both are equivalent. In which case a single result is returned. 90% means that CRS are equivalent, but the names are not exactly the same. 70% means that CRS are equivalent (equivalent datum and coordinate system), but the names are not equivalent. 25% means that the CRS are not equivalent, but there is some similarity in the names.

+
+
Parameters
+

authorityFactory – Authority factory (if null, will return an empty list)

+
+
Returns
+

a list of matching reference CRS, and the percentage (0-100) of confidence in the match.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static VerticalCRSNNPtr create(const util::PropertyMap &properties, const datum::VerticalReferenceFrameNNPtr &datumIn, const cs::VerticalCSNNPtr &csIn)
+

Instantiate a VerticalCRS from a datum::VerticalReferenceFrame and a cs::VerticalCS.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined. The GEOID_MODEL property can be set to a TransformationNNPtr object.

  • +
  • datumIn – The datum of the CRS.

  • +
  • csIn – a VerticalCS.

  • +
+
+
Returns
+

new VerticalCRS.

+
+
+
+ +
+
+static VerticalCRSNNPtr create(const util::PropertyMap &properties, const datum::VerticalReferenceFramePtr &datumIn, const datum::DatumEnsemblePtr &datumEnsembleIn, const cs::VerticalCSNNPtr &csIn)
+

Instantiate a VerticalCRS from a datum::VerticalReferenceFrame or datum::DatumEnsemble and a cs::VerticalCS.

+

One and only one of datum or datumEnsemble should be set to a non-null value.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined. The GEOID_MODEL property can be set to a TransformationNNPtr object.

  • +
  • datumIn – The datum of the CRS, or nullptr

  • +
  • datumEnsembleIn – The datum ensemble of the CRS, or nullptr.

  • +
  • csIn – a VerticalCS.

  • +
+
+
Returns
+

new VerticalCRS.

+
+
+
+ +
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/cs.html b/development/reference/cpp/cs.html new file mode 100644 index 00000000..688b5800 --- /dev/null +++ b/development/reference/cpp/cs.html @@ -0,0 +1,1312 @@ + + + + + + + cs namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

cs namespace

+
+
+namespace osgeo::proj::cs
+

Coordinate systems and their axis.

+

osgeo.proj.cs namespace

+
+

Typedefs

+
+
+using MeridianPtr = std::shared_ptr<Meridian>
+

Shared pointer of Meridian.

+
+ +
+
+using MeridianNNPtr = util::nn<MeridianPtr>
+

Non-null shared pointer of Meridian.

+
+ +
+
+using CoordinateSystemAxisPtr = std::shared_ptr<CoordinateSystemAxis>
+

Shared pointer of CoordinateSystemAxis.

+
+ +
+
+using CoordinateSystemAxisNNPtr = util::nn<CoordinateSystemAxisPtr>
+

Non-null shared pointer of CoordinateSystemAxis.

+
+ +
+
+typedef std::shared_ptr<CoordinateSystem> CoordinateSystemPtr
+

Shared pointer of CoordinateSystem.

+
+ +
+
+typedef util::nn<CoordinateSystemPtr> CoordinateSystemNNPtr
+

Non-null shared pointer of CoordinateSystem.

+
+ +
+
+using SphericalCSPtr = std::shared_ptr<SphericalCS>
+

Shared pointer of SphericalCS.

+
+ +
+
+using SphericalCSNNPtr = util::nn<SphericalCSPtr>
+

Non-null shared pointer of SphericalCS.

+
+ +
+
+using EllipsoidalCSPtr = std::shared_ptr<EllipsoidalCS>
+

Shared pointer of EllipsoidalCS.

+
+ +
+
+using EllipsoidalCSNNPtr = util::nn<EllipsoidalCSPtr>
+

Non-null shared pointer of EllipsoidalCS.

+
+ +
+
+using VerticalCSPtr = std::shared_ptr<VerticalCS>
+

Shared pointer of VerticalCS.

+
+ +
+
+using VerticalCSNNPtr = util::nn<VerticalCSPtr>
+

Non-null shared pointer of VerticalCS.

+
+ +
+
+using CartesianCSPtr = std::shared_ptr<CartesianCS>
+

Shared pointer of CartesianCS.

+
+ +
+
+using CartesianCSNNPtr = util::nn<CartesianCSPtr>
+

Non-null shared pointer of CartesianCS.

+
+ +
+
+using OrdinalCSPtr = std::shared_ptr<OrdinalCS>
+

Shared pointer of OrdinalCS.

+
+ +
+
+using OrdinalCSNNPtr = util::nn<OrdinalCSPtr>
+

Non-null shared pointer of OrdinalCS.

+
+ +
+
+using ParametricCSPtr = std::shared_ptr<ParametricCS>
+

Shared pointer of ParametricCS.

+
+ +
+
+using ParametricCSNNPtr = util::nn<ParametricCSPtr>
+

Non-null shared pointer of ParametricCS.

+
+ +
+
+using TemporalCSPtr = std::shared_ptr<TemporalCS>
+

Shared pointer of TemporalCS.

+
+ +
+
+using TemporalCSNNPtr = util::nn<TemporalCSPtr>
+

Non-null shared pointer of TemporalCS.

+
+ +
+
+using DateTimeTemporalCSPtr = std::shared_ptr<DateTimeTemporalCS>
+

Shared pointer of DateTimeTemporalCS.

+
+ +
+
+using DateTimeTemporalCSNNPtr = util::nn<DateTimeTemporalCSPtr>
+

Non-null shared pointer of DateTimeTemporalCS.

+
+ +
+
+using TemporalCountCSPtr = std::shared_ptr<TemporalCountCS>
+

Shared pointer of TemporalCountCS.

+
+ +
+
+using TemporalCountCSNNPtr = util::nn<TemporalCountCSPtr>
+

Non-null shared pointer of TemporalCountCS.

+
+ +
+
+using TemporalMeasureCSPtr = std::shared_ptr<TemporalMeasureCS>
+

Shared pointer of TemporalMeasureCS.

+
+ +
+
+using TemporalMeasureCSNNPtr = util::nn<TemporalMeasureCSPtr>
+

Non-null shared pointer of TemporalMeasureCS.

+
+ +
+
+
+class AxisDirection : public osgeo::proj::util::CodeList
+
+#include <coordinatesystem.hpp>
+

The direction of positive increase in the coordinate value for a coordinate system axis.

+

+

Remark

+

Implements AxisDirection from ISO 19111:2019

+
+

+
+

Public Static Attributes

+
+
+static const AxisDirection NORTH
+

Axis positive direction is north. In a geodetic or projected CRS, north is defined through the geodetic reference frame. In an engineering CRS, north may be defined with respect to an engineering object rather than a geographical direction.

+
+ +
+
+static const AxisDirection NORTH_NORTH_EAST
+

Axis positive direction is approximately north-north-east.

+
+ +
+
+static const AxisDirection NORTH_EAST
+

Axis positive direction is approximately north-east.

+
+ +
+
+static const AxisDirection EAST_NORTH_EAST
+

Axis positive direction is approximately east-north-east.

+
+ +
+
+static const AxisDirection EAST
+

Axis positive direction is 90deg clockwise from north.

+
+ +
+
+static const AxisDirection EAST_SOUTH_EAST
+

Axis positive direction is approximately east-south-east.

+
+ +
+
+static const AxisDirection SOUTH_EAST
+

Axis positive direction is approximately south-east.

+
+ +
+
+static const AxisDirection SOUTH_SOUTH_EAST
+

Axis positive direction is approximately south-south-east.

+
+ +
+
+static const AxisDirection SOUTH
+

Axis positive direction is 180deg clockwise from north.

+
+ +
+
+static const AxisDirection SOUTH_SOUTH_WEST
+

Axis positive direction is approximately south-south-west.

+
+ +
+
+static const AxisDirection SOUTH_WEST
+

Axis positive direction is approximately south-west.

+
+ +
+
+static const AxisDirection WEST_SOUTH_WEST
+

Axis positive direction is approximately west-south-west.

+
+ +
+
+static const AxisDirection WEST
+

Axis positive direction is 270deg clockwise from north.

+
+ +
+
+static const AxisDirection WEST_NORTH_WEST
+

Axis positive direction is approximately west-north-west.

+
+ +
+
+static const AxisDirection NORTH_WEST
+

Axis positive direction is approximately north-west.

+
+ +
+
+static const AxisDirection NORTH_NORTH_WEST
+

Axis positive direction is approximately north-north-west.

+
+ +
+
+static const AxisDirection UP
+

Axis positive direction is up relative to gravity.

+
+ +
+
+static const AxisDirection DOWN
+

Axis positive direction is down relative to gravity.

+
+ +
+
+static const AxisDirection GEOCENTRIC_X
+

Axis positive direction is in the equatorial plane from the centre of the modelled Earth towards the intersection of the equator with the prime meridian.

+
+ +
+
+static const AxisDirection GEOCENTRIC_Y
+

Axis positive direction is in the equatorial plane from the centre of the modelled Earth towards the intersection of the equator and the meridian 90deg eastwards from the prime meridian.

+
+ +
+
+static const AxisDirection GEOCENTRIC_Z
+

Axis positive direction is from the centre of the modelled Earth parallel to its rotation axis and towards its north pole.

+
+ +
+
+static const AxisDirection COLUMN_POSITIVE
+

Axis positive direction is towards higher pixel column.

+
+ +
+
+static const AxisDirection COLUMN_NEGATIVE
+

Axis positive direction is towards lower pixel column.

+
+ +
+
+static const AxisDirection ROW_POSITIVE
+

Axis positive direction is towards higher pixel row.

+
+ +
+
+static const AxisDirection ROW_NEGATIVE
+

Axis positive direction is towards lower pixel row.

+
+ +
+
+static const AxisDirection DISPLAY_RIGHT
+

Axis positive direction is right in display.

+
+ +
+
+static const AxisDirection DISPLAY_LEFT
+

Axis positive direction is left in display.

+
+ +
+
+static const AxisDirection DISPLAY_UP
+

Axis positive direction is towards top of approximately vertical display surface.

+
+ +
+
+static const AxisDirection DISPLAY_DOWN
+

Axis positive direction is towards bottom of approximately vertical display surface.

+
+ +
+
+static const AxisDirection FORWARD
+

Axis positive direction is forward; for an observer at the centre of the object this is will be towards its front, bow or nose.

+
+ +
+
+static const AxisDirection AFT
+

Axis positive direction is aft; for an observer at the centre of the object this will be towards its back, stern or tail.

+
+ +
+
+static const AxisDirection PORT
+

Axis positive direction is port; for an observer at the centre of the object this will be towards its left.

+
+ +
+
+static const AxisDirection STARBOARD
+

Axis positive direction is starboard; for an observer at the centre of the object this will be towards its right.

+
+ +
+
+static const AxisDirection CLOCKWISE
+

Axis positive direction is clockwise from a specified direction.

+
+ +
+
+static const AxisDirection COUNTER_CLOCKWISE
+

Axis positive direction is counter clockwise from a specified direction.

+
+ +
+
+static const AxisDirection TOWARDS
+

Axis positive direction is towards the object.

+
+ +
+
+static const AxisDirection AWAY_FROM
+

Axis positive direction is away from the object.

+
+ +
+
+static const AxisDirection FUTURE
+

Temporal axis positive direction is towards the future.

+
+ +
+
+static const AxisDirection PAST
+

Temporal axis positive direction is towards the past.

+
+ +
+
+static const AxisDirection UNSPECIFIED
+

Axis positive direction is unspecified.

+
+ +
+
+ +
+
+class CartesianCS : public osgeo::proj::cs::CoordinateSystem
+
+#include <coordinatesystem.hpp>
+

A two- or three-dimensional coordinate system in Euclidean space with orthogonal straight axes.

+

All axes shall have the same length unit. A CartesianCS shall have two or three axis associations; the number of associations shall equal the dimension of the CS.

+

+

Remark

+

Implements CartesianCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static CartesianCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis1, const CoordinateSystemAxisNNPtr &axis2)
+

Instantiate a CartesianCS.

+
+
Parameters
+
    +
  • properties – See General properties.

  • +
  • axis1 – The first axis.

  • +
  • axis2 – The second axis.

  • +
+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+static CartesianCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis1, const CoordinateSystemAxisNNPtr &axis2, const CoordinateSystemAxisNNPtr &axis3)
+

Instantiate a CartesianCS.

+
+
Parameters
+
    +
  • properties – See General properties.

  • +
  • axis1 – The first axis.

  • +
  • axis2 – The second axis.

  • +
  • axis3 – The third axis.

  • +
+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+static CartesianCSNNPtr createEastingNorthing(const common::UnitOfMeasure &unit)
+

Instantiate a CartesianCS with a Easting (first) and Northing (second) axis.

+
+
Parameters
+

unit – Linear unit of the axes.

+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+static CartesianCSNNPtr createNorthingEasting(const common::UnitOfMeasure &unit)
+

Instantiate a CartesianCS with a Northing (first) and Easting (second) axis.

+
+
Parameters
+

unit – Linear unit of the axes.

+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+static CartesianCSNNPtr createNorthPoleEastingSouthNorthingSouth(const common::UnitOfMeasure &unit)
+

Instantiate a CartesianCS, north-pole centered, with a Easting (first) South-Oriented and Northing (second) South-Oriented axis.

+
+
Parameters
+

unit – Linear unit of the axes.

+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+static CartesianCSNNPtr createSouthPoleEastingNorthNorthingNorth(const common::UnitOfMeasure &unit)
+

Instantiate a CartesianCS, south-pole centered, with a Easting (first) North-Oriented and Northing (second) North-Oriented axis.

+
+
Parameters
+

unit – Linear unit of the axes.

+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+static CartesianCSNNPtr createWestingSouthing(const common::UnitOfMeasure &unit)
+

Instantiate a CartesianCS with a Westing (first) and Southing (second) axis.

+
+
Parameters
+

unit – Linear unit of the axes.

+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+static CartesianCSNNPtr createGeocentric(const common::UnitOfMeasure &unit)
+

Instantiate a CartesianCS with the three geocentric axes.

+
+
Parameters
+

unit – Linear unit of the axes.

+
+
Returns
+

a new CartesianCS.

+
+
+
+ +
+
+ +
+
+class CoordinateSystem : public osgeo::proj::common::IdentifiedObject, public osgeo::proj::io::IJSONExportable
+
+#include <coordinatesystem.hpp>
+

Abstract class modelling a coordinate system (CS)

+

A CS is the non-repeating sequence of coordinate system axes that spans a given coordinate space. A CS is derived from a set of mathematical rules for specifying how coordinates in a given space are to be assigned to points. The coordinate values in a coordinate tuple shall be recorded in the order in which the coordinate system axes associations are recorded.

+

+

Remark

+

Implements CoordinateSystem from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::cs::CartesianCS, osgeo::proj::cs::EllipsoidalCS, osgeo::proj::cs::OrdinalCS, osgeo::proj::cs::ParametricCS, osgeo::proj::cs::SphericalCS, osgeo::proj::cs::TemporalCS, osgeo::proj::cs::VerticalCS

+
+

Public Functions

+
+
+const std::vector<CoordinateSystemAxisNNPtr> &axisList()
+

Return the list of axes of this coordinate system.

+
+
Returns
+

the axes.

+
+
+
+ +
+
+ +
+
+class CoordinateSystemAxis : public osgeo::proj::common::IdentifiedObject, public osgeo::proj::io::IJSONExportable
+
+#include <coordinatesystem.hpp>
+

The definition of a coordinate system axis.

+

+

Remark

+

Implements CoordinateSystemAxis from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const std::string &abbreviation()
+

Return the axis abbreviation.

+

The abbreviation used for this coordinate system axis; this abbreviation is also used to identify the coordinates in the coordinate tuple. Examples are X and Y.

+
+
Returns
+

the abbreviation.

+
+
+
+ +
+
+const AxisDirection &direction()
+

Return the axis direction.

+

The direction of this coordinate system axis (or in the case of Cartesian projected coordinates, the direction of this coordinate system axis locally) Examples: north or south, east or west, up or down. Within any set of coordinate system axes, only one of each pair of terms can be used. For Earth-fixed CRSs, this direction is often approximate and intended to provide a human interpretable meaning to the axis. When a geodetic reference frame is used, the precise directions of the axes may therefore vary slightly from this approximate direction. Note that an EngineeringCRS often requires specific descriptions of the directions of its coordinate system axes.

+
+
Returns
+

the direction.

+
+
+
+ +
+
+const common::UnitOfMeasure &unit()
+

Return the axis unit.

+

This is the spatial unit or temporal quantity used for this coordinate system axis. The value of a coordinate in a coordinate tuple shall be recorded using this unit.

+
+
Returns
+

the axis unit.

+
+
+
+ +
+
+const util::optional<double> &minimumValue()
+

Return the minimum value normally allowed for this axis, in the unit for the axis.

+
+
Returns
+

the minimum value, or empty.

+
+
+
+ +
+
+const util::optional<double> &maximumValue()
+

Return the maximum value normally allowed for this axis, in the unit for the axis.

+
+
Returns
+

the maximum value, or empty.

+
+
+
+ +
+
+const MeridianPtr &meridian()
+

Return the meridian that the axis follows from the pole, for a coordinate reference system centered on a pole.

+
+
Returns
+

the meridian, or null.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static CoordinateSystemAxisNNPtr create(const util::PropertyMap &properties, const std::string &abbreviationIn, const AxisDirection &directionIn, const common::UnitOfMeasure &unitIn, const MeridianPtr &meridianIn = nullptr)
+

Instantiate a CoordinateSystemAxis.

+
+
Parameters
+
    +
  • properties – See General properties. The name should generally be defined.

  • +
  • abbreviationIn – Axis abbreviation (might be empty)

  • +
  • directionIn – Axis direction

  • +
  • unitIn – Axis unit

  • +
  • meridianIn – The meridian that the axis follows from the pole, for a coordinate reference system centered on a pole, or nullptr

  • +
+
+
Returns
+

a new CoordinateSystemAxis.

+
+
+
+ +
+
+ +
+
+class DateTimeTemporalCS : public osgeo::proj::cs::TemporalCS
+
+#include <coordinatesystem.hpp>
+

A one-dimensional coordinate system used to record time in dateTime representation as defined in ISO 8601.

+

A DateTimeTemporalCS shall have one axis association. It does not use axisUnitID; the temporal quantities are defined through the ISO 8601 representation.

+

+

Remark

+

Implements DateTimeTemporalCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static DateTimeTemporalCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis)
+

Instantiate a DateTimeTemporalCS.

+
+
Parameters
+
+
+
Returns
+

a new DateTimeTemporalCS.

+
+
+
+ +
+
+ +
+
+class EllipsoidalCS : public osgeo::proj::cs::CoordinateSystem
+
+#include <coordinatesystem.hpp>
+

A two- or three-dimensional coordinate system in which position is specified by geodetic latitude, geodetic longitude, and (in the three-dimensional case) ellipsoidal height.

+

An EllipsoidalCS shall have two or three associations.

+

+

Remark

+

Implements EllipsoidalCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static EllipsoidalCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis1, const CoordinateSystemAxisNNPtr &axis2)
+

Instantiate a EllipsoidalCS.

+
+
Parameters
+
    +
  • properties – See General properties.

  • +
  • axis1 – The first axis.

  • +
  • axis2 – The second axis.

  • +
+
+
Returns
+

a new EllipsoidalCS.

+
+
+
+ +
+
+static EllipsoidalCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis1, const CoordinateSystemAxisNNPtr &axis2, const CoordinateSystemAxisNNPtr &axis3)
+

Instantiate a EllipsoidalCS.

+
+
Parameters
+
    +
  • properties – See General properties.

  • +
  • axis1 – The first axis.

  • +
  • axis2 – The second axis.

  • +
  • axis3 – The third axis.

  • +
+
+
Returns
+

a new EllipsoidalCS.

+
+
+
+ +
+
+static EllipsoidalCSNNPtr createLatitudeLongitude(const common::UnitOfMeasure &unit)
+

Instantiate a EllipsoidalCS with a Latitude (first) and Longitude (second) axis.

+
+
Parameters
+

unit – Angular unit of the axes.

+
+
Returns
+

a new EllipsoidalCS.

+
+
+
+ +
+
+static EllipsoidalCSNNPtr createLatitudeLongitudeEllipsoidalHeight(const common::UnitOfMeasure &angularUnit, const common::UnitOfMeasure &linearUnit)
+

Instantiate a EllipsoidalCS with a Latitude (first), Longitude (second) axis and ellipsoidal height (third) axis.

+
+
Parameters
+
    +
  • angularUnit – Angular unit of the latitude and longitude axes.

  • +
  • linearUnit – Linear unit of the ellipsoidal height axis.

  • +
+
+
Returns
+

a new EllipsoidalCS.

+
+
+
+ +
+
+static EllipsoidalCSNNPtr createLongitudeLatitude(const common::UnitOfMeasure &unit)
+

Instantiate a EllipsoidalCS with a Longitude (first) and Latitude (second) axis.

+
+
Parameters
+

unit – Angular unit of the axes.

+
+
Returns
+

a new EllipsoidalCS.

+
+
+
+ +
+
+static EllipsoidalCSNNPtr createLongitudeLatitudeEllipsoidalHeight(const common::UnitOfMeasure &angularUnit, const common::UnitOfMeasure &linearUnit)
+

Instantiate a EllipsoidalCS with a Longitude (first), Latitude (second) axis and ellipsoidal height (third) axis.

+

+
Since

7.0

+
+
+

+
+
Parameters
+
    +
  • angularUnit – Angular unit of the latitude and longitude axes.

  • +
  • linearUnit – Linear unit of the ellipsoidal height axis.

  • +
+
+
Returns
+

a new EllipsoidalCS.

+
+
+
+ +
+
+ +
+
+class Meridian : public osgeo::proj::common::IdentifiedObject
+
+#include <coordinatesystem.hpp>
+

The meridian that the axis follows from the pole, for a coordinate reference system centered on a pole.

+

+

Remark

+

Implements MERIDIAN from WKT2 standard

+
+

+
+

Note

+

There is no modelling for this concept in ISO 19111:2019

+
+
+

Public Functions

+
+
+const common::Angle &longitude()
+

Return the longitude of the meridian that the axis follows from the pole.

+
+
Returns
+

the longitude.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static MeridianNNPtr create(const common::Angle &longitudeIn)
+

Instantiate a Meridian.

+
+
Parameters
+

longitudeIn – longitude of the meridian that the axis follows from the pole.

+
+
Returns
+

new Meridian.

+
+
+
+ +
+
+ +
+
+class OrdinalCS : public osgeo::proj::cs::CoordinateSystem
+
+#include <coordinatesystem.hpp>
+

n-dimensional coordinate system in which every axis uses integers.

+

The number of associations shall equal the dimension of the CS.

+

+

Remark

+

Implements OrdinalCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static OrdinalCSNNPtr create(const util::PropertyMap &properties, const std::vector<CoordinateSystemAxisNNPtr> &axisIn)
+

Instantiate a OrdinalCS.

+
+
Parameters
+
+
+
Returns
+

a new OrdinalCS.

+
+
+
+ +
+
+ +
+
+class ParametricCS : public osgeo::proj::cs::CoordinateSystem
+
+#include <coordinatesystem.hpp>
+

one-dimensional coordinate reference system which uses parameter values or functions that may vary monotonically with height.

+

+

Remark

+

Implements ParametricCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static ParametricCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axisIn)
+

Instantiate a ParametricCS.

+
+
Parameters
+
+
+
Returns
+

a new ParametricCS.

+
+
+
+ +
+
+ +
+
+class SphericalCS : public osgeo::proj::cs::CoordinateSystem
+
+#include <coordinatesystem.hpp>
+

A three-dimensional coordinate system in Euclidean space with one distance measured from the origin and two angular coordinates.

+

Not to be confused with an ellipsoidal coordinate system based on an ellipsoid “degenerated” into a sphere. A SphericalCS shall have three axis associations.

+

+

Remark

+

Implements SphericalCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static SphericalCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis1, const CoordinateSystemAxisNNPtr &axis2, const CoordinateSystemAxisNNPtr &axis3)
+

Instantiate a SphericalCS.

+
+
Parameters
+
    +
  • properties – See General properties.

  • +
  • axis1 – The first axis.

  • +
  • axis2 – The second axis.

  • +
  • axis3 – The third axis.

  • +
+
+
Returns
+

a new SphericalCS.

+
+
+
+ +
+
+static SphericalCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis1, const CoordinateSystemAxisNNPtr &axis2)
+

Instantiate a SphericalCS with 2 axis.

+

This is an extension to ISO19111 to support (planet)-ocentric CS with geocentric latitude.

+
+
Parameters
+
    +
  • properties – See General properties.

  • +
  • axis1 – The first axis.

  • +
  • axis2 – The second axis.

  • +
+
+
Returns
+

a new SphericalCS.

+
+
+
+ +
+
+ +
+
+class TemporalCountCS : public osgeo::proj::cs::TemporalCS
+
+#include <coordinatesystem.hpp>
+

A one-dimensional coordinate system used to record time as an integer count.

+

A TemporalCountCS shall have one axis association.

+

+

Remark

+

Implements TemporalCountCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static TemporalCountCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis)
+

Instantiate a TemporalCountCS.

+
+
Parameters
+
+
+
Returns
+

a new TemporalCountCS.

+
+
+
+ +
+
+ +
+
+class TemporalCS : public osgeo::proj::cs::CoordinateSystem
+
+#include <coordinatesystem.hpp>
+

(Abstract class) A one-dimensional coordinate system used to record time.

+

A TemporalCS shall have one axis association.

+

+

Remark

+

Implements TemporalCS from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::cs::DateTimeTemporalCS, osgeo::proj::cs::TemporalCountCS, osgeo::proj::cs::TemporalMeasureCS

+
+ +
+
+class TemporalMeasureCS : public osgeo::proj::cs::TemporalCS
+
+#include <coordinatesystem.hpp>
+

A one-dimensional coordinate system used to record a time as a real number.

+

A TemporalMeasureCS shall have one axis association.

+

+

Remark

+

Implements TemporalMeasureCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static TemporalMeasureCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis)
+

Instantiate a TemporalMeasureCS.

+
+
Parameters
+
+
+
Returns
+

a new TemporalMeasureCS.

+
+
+
+ +
+
+ +
+
+class VerticalCS : public osgeo::proj::cs::CoordinateSystem
+
+#include <coordinatesystem.hpp>
+

A one-dimensional coordinate system used to record the heights or depths of points.

+

Such a coordinate system is usually dependent on the Earth’s gravity field. A VerticalCS shall have one axis association.

+

+

Remark

+

Implements VerticalCS from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static VerticalCSNNPtr create(const util::PropertyMap &properties, const CoordinateSystemAxisNNPtr &axis)
+

Instantiate a VerticalCS.

+
+
Parameters
+
+
+
Returns
+

a new VerticalCS.

+
+
+
+ +
+
+static VerticalCSNNPtr createGravityRelatedHeight(const common::UnitOfMeasure &unit)
+

Instantiate a VerticalCS with a Gravity-related height axis.

+
+
Parameters
+

unit – linear unit.

+
+
Returns
+

a new VerticalCS.

+
+
+
+ +
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/datum.html b/development/reference/cpp/datum.html new file mode 100644 index 00000000..ef77b4e6 --- /dev/null +++ b/development/reference/cpp/datum.html @@ -0,0 +1,1180 @@ + + + + + + + datum namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

datum namespace

+
+
+namespace osgeo::proj::datum
+

Datum (the relationship of a coordinate system to the body).

+

osgeo.proj.datum namespace

+
+

Typedefs

+
+
+typedef std::shared_ptr<Datum> DatumPtr
+

Shared pointer of Datum

+
+ +
+
+typedef util::nn<DatumPtr> DatumNNPtr
+

Non-null shared pointer of Datum

+
+ +
+
+typedef std::shared_ptr<DatumEnsemble> DatumEnsemblePtr
+

Shared pointer of DatumEnsemble

+
+ +
+
+typedef util::nn<DatumEnsemblePtr> DatumEnsembleNNPtr
+

Non-null shared pointer of DatumEnsemble

+
+ +
+
+typedef std::shared_ptr<PrimeMeridian> PrimeMeridianPtr
+

Shared pointer of PrimeMeridian

+
+ +
+
+typedef util::nn<PrimeMeridianPtr> PrimeMeridianNNPtr
+

Non-null shared pointer of PrimeMeridian

+
+ +
+
+typedef std::shared_ptr<Ellipsoid> EllipsoidPtr
+

Shared pointer of Ellipsoid

+
+ +
+
+typedef util::nn<EllipsoidPtr> EllipsoidNNPtr
+

Non-null shared pointer of Ellipsoid

+
+ +
+
+typedef std::shared_ptr<GeodeticReferenceFrame> GeodeticReferenceFramePtr
+

Shared pointer of GeodeticReferenceFrame

+
+ +
+
+typedef util::nn<GeodeticReferenceFramePtr> GeodeticReferenceFrameNNPtr
+

Non-null shared pointer of GeodeticReferenceFrame

+
+ +
+
+using DynamicGeodeticReferenceFramePtr = std::shared_ptr<DynamicGeodeticReferenceFrame>
+

Shared pointer of DynamicGeodeticReferenceFrame

+
+ +
+
+using DynamicGeodeticReferenceFrameNNPtr = util::nn<DynamicGeodeticReferenceFramePtr>
+

Non-null shared pointer of DynamicGeodeticReferenceFrame

+
+ +
+
+typedef std::shared_ptr<VerticalReferenceFrame> VerticalReferenceFramePtr
+

Shared pointer of VerticalReferenceFrame

+
+ +
+
+typedef util::nn<VerticalReferenceFramePtr> VerticalReferenceFrameNNPtr
+

Non-null shared pointer of VerticalReferenceFrame

+
+ +
+
+using DynamicVerticalReferenceFramePtr = std::shared_ptr<DynamicVerticalReferenceFrame>
+

Shared pointer of DynamicVerticalReferenceFrame

+
+ +
+
+using DynamicVerticalReferenceFrameNNPtr = util::nn<DynamicVerticalReferenceFramePtr>
+

Non-null shared pointer of DynamicVerticalReferenceFrame

+
+ +
+
+using TemporalDatumPtr = std::shared_ptr<TemporalDatum>
+

Shared pointer of TemporalDatum

+
+ +
+
+using TemporalDatumNNPtr = util::nn<TemporalDatumPtr>
+

Non-null shared pointer of TemporalDatum

+
+ +
+
+using EngineeringDatumPtr = std::shared_ptr<EngineeringDatum>
+

Shared pointer of EngineeringDatum

+
+ +
+
+using EngineeringDatumNNPtr = util::nn<EngineeringDatumPtr>
+

Non-null shared pointer of EngineeringDatum

+
+ +
+
+using ParametricDatumPtr = std::shared_ptr<ParametricDatum>
+

Shared pointer of ParametricDatum

+
+ +
+
+using ParametricDatumNNPtr = util::nn<ParametricDatumPtr>
+

Non-null shared pointer of ParametricDatum

+
+ +
+
+
+class Datum : public osgeo::proj::common::ObjectUsage, public osgeo::proj::io::IJSONExportable
+
+#include <datum.hpp>
+

Abstract class of the relationship of a coordinate system to an object, thus creating a coordinate reference system.

+

For geodetic and vertical coordinate reference systems, it relates a coordinate system to the Earth (or the celestial body considered). With other types of coordinate reference systems, the datum may relate the coordinate system to another physical or virtual object. A datum uses a parameter or set of parameters that determine the location of the origin of the coordinate reference system. Each datum subtype can be associated with only specific types of coordinate reference systems.

+

+

Remark

+

Implements Datum from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::datum::EngineeringDatum, osgeo::proj::datum::GeodeticReferenceFrame, osgeo::proj::datum::ParametricDatum, osgeo::proj::datum::TemporalDatum, osgeo::proj::datum::VerticalReferenceFrame

+
+

Public Functions

+
+
+const util::optional<std::string> &anchorDefinition() const
+

Return the anchor definition.

+

A description - possibly including coordinates of an identified point or points - of the relationship used to anchor a coordinate system to the Earth or alternate object.

    +
  • For modern geodetic reference frames the anchor may be a set of station coordinates; if the reference frame is dynamic it will also include coordinate velocities. For a traditional geodetic datum, this anchor may be a point known as the fundamental point, which is traditionally the point where the relationship between geoid and ellipsoid is defined, together with a direction from that point.

  • +
  • For a vertical reference frame the anchor may be the zero level at one or more defined locations or a conventionally defined surface.

  • +
  • For an engineering datum, the anchor may be an identified physical point with the orientation defined relative to the object.

  • +
+

+
+
Returns
+

the anchor definition, or empty.

+
+
+
+ +
+
+const util::optional<common::DateTime> &publicationDate() const
+

Return the date on which the datum definition was published.

+
+

Note

+

Departure from ISO 19111:2019 : we return a DateTime instead of a Citation::Date.

+
+
+
Returns
+

the publication date, or empty.

+
+
+
+ +
+
+const common::IdentifiedObjectPtr &conventionalRS() const
+

Return the conventional reference system.

+

This is the name, identifier, alias and remarks for the terrestrial reference system or vertical reference system realized by this reference frame, for example “ITRS” for ITRF88 through ITRF2008 and ITRF2014, or “EVRS” for EVRF2000 and EVRF2007.

+
+
Returns
+

the conventional reference system, or nullptr.

+
+
+
+ +
+
+ +
+
+class DatumEnsemble : public osgeo::proj::common::ObjectUsage, public osgeo::proj::io::IJSONExportable
+
+#include <datum.hpp>
+

A collection of two or more geodetic or vertical reference frames (or if not geodetic or vertical reference frame, a collection of two or more datums) which for all but the highest accuracy requirements may be considered to be insignificantly different from each other.

+

Every frame within the datum ensemble must be a realizations of the same Terrestrial Reference System or Vertical Reference System.

+

+

Remark

+

Implements DatumEnsemble from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const std::vector<DatumNNPtr> &datums() const
+

Return the set of datums which may be considered to be insignificantly different from each other.

+
+
Returns
+

the set of datums of the DatumEnsemble.

+
+
+
+ +
+
+const metadata::PositionalAccuracyNNPtr &positionalAccuracy() const
+

Return the inaccuracy introduced through use of this collection of datums.

+

It is an indication of the differences in coordinate values at all points between the various realizations that have been grouped into this datum ensemble.

+
+
Returns
+

the accuracy.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static DatumEnsembleNNPtr create(const util::PropertyMap &properties, const std::vector<DatumNNPtr> &datumsIn, const metadata::PositionalAccuracyNNPtr &accuracy)
+

Instantiate a DatumEnsemble.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • datumsIn – Array of at least 2 datums.

  • +
  • accuracy – Accuracy of the datum ensemble

  • +
+
+
Throws
+

util::Exception

+
+
Returns
+

new DatumEnsemble.

+
+
+
+ +
+
+ +
+
+class DynamicGeodeticReferenceFrame : public osgeo::proj::datum::GeodeticReferenceFrame
+
+#include <datum.hpp>
+

A geodetic reference frame in which some of the parameters describe time evolution of defining station coordinates.

+

For example defining station coordinates having linear velocities to account for crustal motion.

+

+

Remark

+

Implements DynamicGeodeticReferenceFrame from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const common::Measure &frameReferenceEpoch() const
+

Return the epoch to which the coordinates of stations defining the dynamic geodetic reference frame are referenced.

+

Usually given as a decimal year e.g. 2016.47.

+
+
Returns
+

the frame reference epoch.

+
+
+
+ +
+
+const util::optional<std::string> &deformationModelName() const
+

Return the name of the deformation model.

+
+

Note

+

This is an extension to the ISO 19111:2019 modeling, to hold the content of the DYNAMIC.MODEL WKT2 node.

+
+
+
Returns
+

the name of the deformation model.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static DynamicGeodeticReferenceFrameNNPtr create(const util::PropertyMap &properties, const EllipsoidNNPtr &ellipsoid, const util::optional<std::string> &anchor, const PrimeMeridianNNPtr &primeMeridian, const common::Measure &frameReferenceEpochIn, const util::optional<std::string> &deformationModelNameIn)
+

Instantiate a DynamicGeodeticReferenceFrame.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • ellipsoid – the Ellipsoid.

  • +
  • anchor – the anchor definition, or empty.

  • +
  • primeMeridian – the PrimeMeridian.

  • +
  • frameReferenceEpochIn – the frame reference epoch.

  • +
  • deformationModelNameIn – deformation model name, or empty

  • +
+
+
Returns
+

new DynamicGeodeticReferenceFrame.

+
+
+
+ +
+
+ +
+
+class DynamicVerticalReferenceFrame : public osgeo::proj::datum::VerticalReferenceFrame
+
+#include <datum.hpp>
+

A vertical reference frame in which some of the defining parameters have time dependency.

+

For example defining station heights have velocity to account for post-glacial isostatic rebound motion.

+

+

Remark

+

Implements DynamicVerticalReferenceFrame from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const common::Measure &frameReferenceEpoch() const
+

Return the epoch to which the coordinates of stations defining the dynamic geodetic reference frame are referenced.

+

Usually given as a decimal year e.g. 2016.47.

+
+
Returns
+

the frame reference epoch.

+
+
+
+ +
+
+const util::optional<std::string> &deformationModelName() const
+

Return the name of the deformation model.

+
+

Note

+

This is an extension to the ISO 19111:2019 modeling, to hold the content of the DYNAMIC.MODEL WKT2 node.

+
+
+
Returns
+

the name of the deformation model.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static DynamicVerticalReferenceFrameNNPtr create(const util::PropertyMap &properties, const util::optional<std::string> &anchor, const util::optional<RealizationMethod> &realizationMethodIn, const common::Measure &frameReferenceEpochIn, const util::optional<std::string> &deformationModelNameIn)
+

Instantiate a DynamicVerticalReferenceFrame.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • anchor – the anchor definition, or empty.

  • +
  • realizationMethodIn – the realization method, or empty.

  • +
  • frameReferenceEpochIn – the frame reference epoch.

  • +
  • deformationModelNameIn – deformation model name, or empty

  • +
+
+
Returns
+

new DynamicVerticalReferenceFrame.

+
+
+
+ +
+
+ +
+
+class Ellipsoid : public osgeo::proj::common::IdentifiedObject, public osgeo::proj::io::IPROJStringExportable, public osgeo::proj::io::IJSONExportable
+
+#include <datum.hpp>
+

A geometric figure that can be used to describe the approximate shape of an object.

+

For the Earth an oblate biaxial ellipsoid is used: in mathematical terms, it is a surface formed by the rotation of an ellipse about its minor axis.

+

+

Remark

+

Implements Ellipsoid from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const common::Length &semiMajorAxis()
+

Return the length of the semi-major axis of the ellipsoid.

+
+
Returns
+

the semi-major axis.

+
+
+
+ +
+
+const util::optional<common::Scale> &inverseFlattening()
+

Return the inverse flattening value of the ellipsoid, if the ellipsoid has been defined with this value.

+

+

See also

+

computeInverseFlattening() that will always return a valid value of the inverse flattening, whether the ellipsoid has been defined through inverse flattening or semi-minor axis.

+
+

+
+
Returns
+

the inverse flattening value of the ellipsoid, or empty.

+
+
+
+ +
+
+const util::optional<common::Length> &semiMinorAxis()
+

Return the length of the semi-minor axis of the ellipsoid, if the ellipsoid has been defined with this value.

+

+

See also

+

computeSemiMinorAxis() that will always return a valid value of the semi-minor axis, whether the ellipsoid has been defined through inverse flattening or semi-minor axis.

+
+

+
+
Returns
+

the semi-minor axis of the ellipsoid, or empty.

+
+
+
+ +
+
+bool isSphere()
+

Return whether the ellipsoid is spherical.

+

That is to say is semiMajorAxis() == computeSemiMinorAxis().

+

A sphere is completely defined by the semi-major axis, which is the radius of the sphere.

+
+
Returns
+

true if the ellipsoid is spherical.

+
+
+
+ +
+
+const util::optional<common::Length> &semiMedianAxis()
+

Return the length of the semi-median axis of a triaxial ellipsoid.

+

This parameter is not required for a biaxial ellipsoid.

+
+
Returns
+

the semi-median axis of the ellipsoid, or empty.

+
+
+
+ +
+
+double computedInverseFlattening()
+

Return or compute the inverse flattening value of the ellipsoid.

+

If computed, the inverse flattening is the result of a / (a - b), where a is the semi-major axis and b the semi-minor axis.

+
+
Returns
+

the inverse flattening value of the ellipsoid, or 0 for a sphere.

+
+
+
+ +
+
+double squaredEccentricity()
+

Return the squared eccentricity of the ellipsoid.

+
+
Returns
+

the squared eccentricity, or a negative value if invalid.

+
+
+
+ +
+
+common::Length computeSemiMinorAxis() const
+

Return or compute the length of the semi-minor axis of the ellipsoid.

+

If computed, the semi-minor axis is the result of a * (1 - 1 / rf) where a is the semi-major axis and rf the reverse/inverse flattening.

+
+
Returns
+

the semi-minor axis of the ellipsoid.

+
+
+
+ +
+
+const std::string &celestialBody()
+

Return the name of the celestial body on which the ellipsoid refers to.

+
+ +
+
+EllipsoidNNPtr identify() const
+

Return a Ellipsoid object where some parameters are better identified.

+
+
Returns
+

a new Ellipsoid.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static EllipsoidNNPtr createSphere(const util::PropertyMap &properties, const common::Length &radius, const std::string &celestialBody = EARTH)
+

Instantiate a Ellipsoid as a sphere.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • radius – the sphere radius (semi-major axis).

  • +
  • celestialBody – Name of the celestial body on which the ellipsoid refers to.

  • +
+
+
Returns
+

new Ellipsoid.

+
+
+
+ +
+
+static EllipsoidNNPtr createFlattenedSphere(const util::PropertyMap &properties, const common::Length &semiMajorAxisIn, const common::Scale &invFlattening, const std::string &celestialBody = EARTH)
+

Instantiate a Ellipsoid from its inverse/reverse flattening.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • semiMajorAxisIn – the semi-major axis.

  • +
  • invFlattening – the inverse/reverse flattening. If set to 0, this will be considered as a sphere.

  • +
  • celestialBody – Name of the celestial body on which the ellipsoid refers to.

  • +
+
+
Returns
+

new Ellipsoid.

+
+
+
+ +
+
+static EllipsoidNNPtr createTwoAxis(const util::PropertyMap &properties, const common::Length &semiMajorAxisIn, const common::Length &semiMinorAxisIn, const std::string &celestialBody = EARTH)
+

Instantiate a Ellipsoid from the value of its two semi axis.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • semiMajorAxisIn – the semi-major axis.

  • +
  • semiMinorAxisIn – the semi-minor axis.

  • +
  • celestialBody – Name of the celestial body on which the ellipsoid refers to.

  • +
+
+
Returns
+

new Ellipsoid.

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static const std::string EARTH
+

Earth celestial body.

+
+ +
+
+static const EllipsoidNNPtr CLARKE_1866
+

The EPSG:7008 / “Clarke 1866” Ellipsoid.

+
+ +
+
+static const EllipsoidNNPtr WGS84
+

The EPSG:7030 / “WGS 84” Ellipsoid.

+
+ +
+
+static const EllipsoidNNPtr GRS1980
+

The EPSG:7019 / “GRS 1980” Ellipsoid.

+
+ +
+
+ +
+
+class EngineeringDatum : public osgeo::proj::datum::Datum
+
+#include <datum.hpp>
+

The definition of the origin and orientation of an engineering coordinate reference system.

+

+

Remark

+

Implements EngineeringDatum from ISO 19111:2019

+
+

+
+

Note

+

The origin can be fixed with respect to the Earth (such as a defined point at a construction site), or be a defined point on a moving vehicle (such as on a ship or satellite), or a defined point of an image.

+
+
+

Public Static Functions

+
+
+static EngineeringDatumNNPtr create(const util::PropertyMap &properties, const util::optional<std::string> &anchor = util::optional<std::string>())
+

Instantiate a EngineeringDatum.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • anchor – the anchor definition, or empty.

  • +
+
+
Returns
+

new EngineeringDatum.

+
+
+
+ +
+
+ +
+
+class GeodeticReferenceFrame : public osgeo::proj::datum::Datum
+
+#include <datum.hpp>
+

The definition of the position, scale and orientation of a geocentric Cartesian 3D coordinate system relative to the Earth.

+

It may also identify a defined ellipsoid (or sphere) that approximates the shape of the Earth and which is centred on and aligned to this geocentric coordinate system. Older geodetic datums define the location and orientation of a defined ellipsoid (or sphere) that approximates the shape of the earth.

+

+

Remark

+

Implements GeodeticReferenceFrame from ISO 19111:2019

+
+

+
+

Note

+

The terminology “Datum” is often used to mean a GeodeticReferenceFrame.

+
+
+

Note

+

In ISO 19111:2007, this class was called GeodeticDatum.

+
+

Subclassed by osgeo::proj::datum::DynamicGeodeticReferenceFrame

+
+

Public Functions

+
+
+const PrimeMeridianNNPtr &primeMeridian()
+

Return the PrimeMeridian associated with a GeodeticReferenceFrame.

+
+
Returns
+

the PrimeMeridian.

+
+
+
+ +
+
+const EllipsoidNNPtr &ellipsoid()
+

Return the Ellipsoid associated with a GeodeticReferenceFrame.

+
+

Note

+

The ISO 19111:2019 modelling allows (but discourages) a GeodeticReferenceFrame to not be associated with a Ellipsoid in the case where it is used by a geocentric crs::GeodeticCRS. We have made the choice of making the ellipsoid specification compulsory.

+
+
+
Returns
+

the Ellipsoid.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static GeodeticReferenceFrameNNPtr create(const util::PropertyMap &properties, const EllipsoidNNPtr &ellipsoid, const util::optional<std::string> &anchor, const PrimeMeridianNNPtr &primeMeridian)
+

Instantiate a GeodeticReferenceFrame.

+
+
Parameters
+
+
+
Returns
+

new GeodeticReferenceFrame.

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static const GeodeticReferenceFrameNNPtr EPSG_6267
+

The EPSG:6267 / “North_American_Datum_1927” GeodeticReferenceFrame.

+
+ +
+
+static const GeodeticReferenceFrameNNPtr EPSG_6269
+

The EPSG:6269 / “North_American_Datum_1983” GeodeticReferenceFrame.

+
+ +
+
+static const GeodeticReferenceFrameNNPtr EPSG_6326
+

The EPSG:6326 / “WGS_1984” GeodeticReferenceFrame.

+
+ +
+
+ +
+
+class ParametricDatum : public osgeo::proj::datum::Datum
+
+#include <datum.hpp>
+

Textual description and/or a set of parameters identifying a particular reference surface used as the origin of a parametric coordinate system, including its position with respect to the Earth.

+

+

Remark

+

Implements ParametricDatum from ISO 19111:2019

+
+

+
+

Public Static Functions

+
+
+static ParametricDatumNNPtr create(const util::PropertyMap &properties, const util::optional<std::string> &anchor = util::optional<std::string>())
+

Instantiate a ParametricDatum.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • anchor – the anchor definition, or empty.

  • +
+
+
Returns
+

new ParametricDatum.

+
+
+
+ +
+
+ +
+
+class PrimeMeridian : public osgeo::proj::common::IdentifiedObject, public osgeo::proj::io::IPROJStringExportable, public osgeo::proj::io::IJSONExportable
+
+#include <datum.hpp>
+

The origin meridian from which longitude values are determined.

+

+

Remark

+

Implements PrimeMeridian from ISO 19111:2019

+
+

+
+

Note

+

The default value for prime meridian name is “Greenwich”. When the default applies, the value for the longitude shall be 0 (degrees).

+
+
+

Public Functions

+
+
+const common::Angle &longitude()
+

Return the longitude of the prime meridian.

+

It is measured from the internationally-recognised reference meridian (‘Greenwich meridian’), positive eastward. The default value is 0 degrees.

+
+
Returns
+

the longitude of the prime meridian.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static PrimeMeridianNNPtr create(const util::PropertyMap &properties, const common::Angle &longitudeIn)
+

Instantiate a PrimeMeridian.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • longitudeIn – the longitude of the prime meridian.

  • +
+
+
Returns
+

new PrimeMeridian.

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static const PrimeMeridianNNPtr GREENWICH
+

The Greenwich PrimeMeridian.

+
+ +
+
+static const PrimeMeridianNNPtr REFERENCE_MERIDIAN
+

The “Reference Meridian” PrimeMeridian.

+

This is a meridian of longitude 0 to be used with non-Earth bodies.

+
+ +
+
+static const PrimeMeridianNNPtr PARIS
+

The Paris PrimeMeridian.

+
+ +
+
+ +
+
+class RealizationMethod : public osgeo::proj::util::CodeList
+
+#include <datum.hpp>
+

The specification of the method by which the vertical reference frame is realized.

+

+

Remark

+

Implements RealizationMethod from ISO 19111:2019

+
+

+
+

Public Static Attributes

+
+
+static const RealizationMethod LEVELLING
+

The realization is by adjustment of a levelling network fixed to one or more tide gauges.

+
+ +
+
+static const RealizationMethod GEOID
+

The realization is through a geoid height model or a height correction model. This is applied to a specified geodetic CRS.

+
+ +
+
+static const RealizationMethod TIDAL
+

The realization is through a tidal model or by tidal predictions.

+
+ +
+
+ +
+
+class TemporalDatum : public osgeo::proj::datum::Datum
+
+#include <datum.hpp>
+

The definition of the relationship of a temporal coordinate system to an object. The object is normally time on the Earth.

+

+

Remark

+

Implements TemporalDatum from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const common::DateTime &temporalOrigin() const
+

Return the date and time to which temporal coordinates are referenced, expressed in conformance with ISO 8601.

+
+
Returns
+

the temporal origin.

+
+
+
+ +
+
+const std::string &calendar() const
+

Return the calendar to which the temporal origin is referenced.

+

Default value: TemporalDatum::CALENDAR_PROLEPTIC_GREGORIAN.

+
+
Returns
+

the calendar.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static TemporalDatumNNPtr create(const util::PropertyMap &properties, const common::DateTime &temporalOriginIn, const std::string &calendarIn)
+

Instantiate a TemporalDatum.

+
+
Parameters
+
+
+
Returns
+

new TemporalDatum.

+
+
+
+ +
+
+

Public Static Attributes

+
+
+static const std::string CALENDAR_PROLEPTIC_GREGORIAN
+

The proleptic Gregorian calendar.

+
+ +
+
+ +
+
+class VerticalReferenceFrame : public osgeo::proj::datum::Datum
+
+#include <datum.hpp>
+

A textual description and/or a set of parameters identifying a particular reference level surface used as a zero-height or zero-depth surface, including its position with respect to the Earth.

+

+

Remark

+

Implements VerticalReferenceFrame from ISO 19111:2019

+
+

+
+

Note

+

In ISO 19111:2007, this class was called VerticalDatum.

+
+

Subclassed by osgeo::proj::datum::DynamicVerticalReferenceFrame

+
+

Public Functions

+
+
+const util::optional<RealizationMethod> &realizationMethod() const
+

Return the method through which this vertical reference frame is realized.

+
+
Returns
+

the realization method.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static VerticalReferenceFrameNNPtr create(const util::PropertyMap &properties, const util::optional<std::string> &anchor = util::optional<std::string>(), const util::optional<RealizationMethod> &realizationMethodIn = util::optional<RealizationMethod>())
+

Instantiate a VerticalReferenceFrame.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • anchor – the anchor definition, or empty.

  • +
  • realizationMethodIn – the realization method, or empty.

  • +
+
+
Returns
+

new VerticalReferenceFrame.

+
+
+
+ +
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/index.html b/development/reference/cpp/index.html new file mode 100644 index 00000000..fe374bd5 --- /dev/null +++ b/development/reference/cpp/index.html @@ -0,0 +1,171 @@ + + + + + + + C++ API — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/io.html b/development/reference/cpp/io.html new file mode 100644 index 00000000..2dd16030 --- /dev/null +++ b/development/reference/cpp/io.html @@ -0,0 +1,2208 @@ + + + + + + + io namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

io namespace

+
+
+namespace osgeo::proj::io
+

I/O classes.

+

osgeo.proj.io namespace.

+
+

Typedefs

+
+
+using DatabaseContextPtr = std::shared_ptr<DatabaseContext>
+

Shared pointer of DatabaseContext.

+
+ +
+
+using DatabaseContextNNPtr = util::nn<DatabaseContextPtr>
+

Non-null shared pointer of DatabaseContext.

+
+ +
+
+using WKTNodePtr = std::unique_ptr<WKTNode>
+

Unique pointer of WKTNode.

+
+ +
+
+using WKTNodeNNPtr = util::nn<WKTNodePtr>
+

Non-null unique pointer of WKTNode.

+
+ +
+
+using WKTFormatterPtr = std::unique_ptr<WKTFormatter>
+

WKTFormatter unique pointer.

+
+ +
+
+using WKTFormatterNNPtr = util::nn<WKTFormatterPtr>
+

Non-null WKTFormatter unique pointer.

+
+ +
+
+using PROJStringFormatterPtr = std::unique_ptr<PROJStringFormatter>
+

PROJStringFormatter unique pointer.

+
+ +
+
+using PROJStringFormatterNNPtr = util::nn<PROJStringFormatterPtr>
+

Non-null PROJStringFormatter unique pointer.

+
+ +
+
+using JSONFormatterPtr = std::unique_ptr<JSONFormatter>
+

JSONFormatter unique pointer.

+
+ +
+
+using JSONFormatterNNPtr = util::nn<JSONFormatterPtr>
+

Non-null JSONFormatter unique pointer.

+
+ +
+
+using IPROJStringExportablePtr = std::shared_ptr<IPROJStringExportable>
+

Shared pointer of IPROJStringExportable.

+
+ +
+
+using IPROJStringExportableNNPtr = util::nn<IPROJStringExportablePtr>
+

Non-null shared pointer of IPROJStringExportable.

+
+ +
+
+using AuthorityFactoryPtr = std::shared_ptr<AuthorityFactory>
+

Shared pointer of AuthorityFactory.

+
+ +
+
+using AuthorityFactoryNNPtr = util::nn<AuthorityFactoryPtr>
+

Non-null shared pointer of AuthorityFactory.

+
+ +
+
+

Functions

+
+
+static crs::GeodeticCRSNNPtr cloneWithProps(const crs::GeodeticCRSNNPtr &geodCRS, const util::PropertyMap &props)
+
+ +
+
+BaseObjectNNPtr createFromUserInput(const std::string &text, const DatabaseContextPtr &dbContext, bool usePROJ4InitRules)
+

Instantiate a sub-class of BaseObject from a user specified text.

+

The text can be a:

    +
  • WKT string

  • +
  • PROJ string

  • +
  • database code, prefixed by its authority. e.g. “EPSG:4326”

  • +
  • OGC URN. e.g. “urn:ogc:def:crs:EPSG::4326”, “urn:ogc:def:coordinateOperation:EPSG::1671”, “urn:ogc:def:ellipsoid:EPSG::7001” or “urn:ogc:def:datum:EPSG::6326”

  • +
  • OGC URN combining references for compound coordinate reference systems e.g. “urn:ogc:def:crs,crs:EPSG::2393,crs:EPSG::5717” We also accept a custom abbreviated syntax EPSG:2393+5717 or ESRI:103668+EPSG:5703

  • +
  • OGC URN combining references for references for projected or derived CRSs e.g. for Projected 3D CRS “UTM zone 31N / WGS 84 (3D)” “urn:ogc:def:crs,crs:EPSG::4979,cs:PROJ::ENh,coordinateOperation:EPSG::16031”

  • +
  • OGC URN combining references for concatenated operations e.g. “urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618”

  • +
  • OGC URL for a single CRS. e.g. “http://www.opengis.net/def/crs/EPSG/0/4326</li> <li>OGC URL for a compound

    +

    CRS. e.g

    +

    +http://www.opengis.net/def/crs-compound?1=http://www.opengis.net/def/crs/EPSG/0/4326&2=http://www.opengis.net/def/crs/EPSG/0/3855

    ”</li>

    +

    <li>an Object name. e.g “WGS 84”, “WGS 84 / UTM zone 31N”. In that case as

    +

    uniqueness is not guaranteed, the function may apply heuristics to

    +

    determine the appropriate best match.</li>

    +

    <li>a compound CRS made from two object names separated with ” + “.

    +

    e.g. “WGS 84 + EGM96 height”

    +

  • +
  • PROJJSON string

  • +
+

+
+
Parameters
+
    +
  • text – One of the above mentioned text format

  • +
  • dbContext – Database context, or nullptr (in which case database lookups will not work)

  • +
  • usePROJ4InitRules – When set to true, init=epsg:XXXX syntax will be allowed and will be interpreted according to PROJ.4 and PROJ.5 rules, that is geodeticCRS will have longitude, latitude order and will expect/output coordinates in radians. ProjectedCRS will have easting, northing axis order (except the ones with Transverse Mercator South Orientated projection). In that mode, the epsg:XXXX syntax will be also interpreted the same way.

  • +
+
+
Throws
+

ParsingException

+
+
+
+ +
+
+BaseObjectNNPtr createFromUserInput(const std::string &text, PJ_CONTEXT *ctx)
+

Instantiate a sub-class of BaseObject from a user specified text.

+

The text can be a:

    +
  • WKT string

  • +
  • PROJ string

  • +
  • database code, prefixed by its authority. e.g. “EPSG:4326”

  • +
  • OGC URN. e.g. “urn:ogc:def:crs:EPSG::4326”, “urn:ogc:def:coordinateOperation:EPSG::1671”, “urn:ogc:def:ellipsoid:EPSG::7001” or “urn:ogc:def:datum:EPSG::6326”

  • +
  • OGC URN combining references for compound coordinate reference systems e.g. “urn:ogc:def:crs,crs:EPSG::2393,crs:EPSG::5717” We also accept a custom abbreviated syntax EPSG:2393+5717

  • +
  • OGC URN combining references for references for projected or derived CRSs e.g. for Projected 3D CRS “UTM zone 31N / WGS 84 (3D)” “urn:ogc:def:crs,crs:EPSG::4979,cs:PROJ::ENh,coordinateOperation:EPSG::16031”

  • +
  • OGC URN combining references for concatenated operations e.g. “urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618”

  • +
  • an Object name. e.g “WGS 84”, “WGS 84 / UTM zone 31N”. In that case as uniqueness is not guaranteed, the function may apply heuristics to determine the appropriate best match.

  • +
  • a compound CRS made from two object names separated with ” + “. e.g. “WGS 84 + EGM96 height”

  • +
  • PROJJSON string

  • +
+

+
+
Parameters
+
    +
  • text – One of the above mentioned text format

  • +
  • ctx – PROJ context

  • +
+
+
Throws
+

ParsingException

+
+
+
+ +
+
+
+class AuthorityFactory
+
+#include <io.hpp>
+

Builds object from an authority database.

+

A AuthorityFactory should be used only by one thread at a time.

+

+

+
+

Public Types

+
+
+enum class ObjectType
+

Object type.

+

Values:

+
+
+enumerator PRIME_MERIDIAN
+

Object of type datum::PrimeMeridian

+
+ +
+
+enumerator ELLIPSOID
+

Object of type datum::Ellipsoid

+
+ +
+
+enumerator DATUM
+

Object of type datum::Datum (and derived classes)

+
+ +
+
+enumerator GEODETIC_REFERENCE_FRAME
+

Object of type datum::GeodeticReferenceFrame (and derived classes)

+
+ +
+
+enumerator VERTICAL_REFERENCE_FRAME
+

Object of type datum::VerticalReferenceFrame (and derived classes)

+
+ +
+
+enumerator CRS
+

Object of type crs::CRS (and derived classes)

+
+ +
+
+enumerator GEODETIC_CRS
+

Object of type crs::GeodeticCRS (and derived classes)

+
+ +
+
+enumerator GEOCENTRIC_CRS
+

GEODETIC_CRS of type geocentric

+
+ +
+
+enumerator GEOGRAPHIC_CRS
+

Object of type crs::GeographicCRS (and derived classes)

+
+ +
+
+enumerator GEOGRAPHIC_2D_CRS
+

GEOGRAPHIC_CRS of type Geographic 2D

+
+ +
+
+enumerator GEOGRAPHIC_3D_CRS
+

GEOGRAPHIC_CRS of type Geographic 3D

+
+ +
+
+enumerator PROJECTED_CRS
+

Object of type crs::ProjectedCRS (and derived classes)

+
+ +
+
+enumerator VERTICAL_CRS
+

Object of type crs::VerticalCRS (and derived classes)

+
+ +
+
+enumerator COMPOUND_CRS
+

Object of type crs::CompoundCRS (and derived classes)

+
+ +
+
+enumerator COORDINATE_OPERATION
+

Object of type operation::CoordinateOperation (and derived classes)

+
+ +
+
+enumerator CONVERSION
+

Object of type operation::Conversion (and derived classes)

+
+ +
+
+enumerator TRANSFORMATION
+

Object of type operation::Transformation (and derived classes)

+
+ +
+
+enumerator CONCATENATED_OPERATION
+

Object of type operation::ConcatenatedOperation (and derived classes)

+
+ +
+
+enumerator DYNAMIC_GEODETIC_REFERENCE_FRAME
+

Object of type datum::DynamicGeodeticReferenceFrame

+
+ +
+
+enumerator DYNAMIC_VERTICAL_REFERENCE_FRAME
+

Object of type datum::DynamicVerticalReferenceFrame

+
+ +
+
+enumerator DATUM_ENSEMBLE
+

Object of type datum::DatumEnsemble

+
+ +
+ +
+
+

Public Functions

+
+
+util::BaseObjectNNPtr createObject(const std::string &code) const
+

Returns an arbitrary object from a code.

+

The returned object will typically be an instance of Datum, CoordinateSystem, ReferenceSystem or CoordinateOperation. If the type of the object is know at compile time, it is recommended to invoke the most precise method instead of this one (for example createCoordinateReferenceSystem(code) instead of createObject(code) if the caller know he is asking for a coordinate reference system).

+

If there are several objects with the same code, a FactoryException is thrown.

+
+
Parameters
+

code – Object code allocated by authority. (e.g. “4326”)

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+common::UnitOfMeasureNNPtr createUnitOfMeasure(const std::string &code) const
+

Returns a common::UnitOfMeasure from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+metadata::ExtentNNPtr createExtent(const std::string &code) const
+

Returns a metadata::Extent from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+datum::PrimeMeridianNNPtr createPrimeMeridian(const std::string &code) const
+

Returns a datum::PrimeMeridian from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+std::string identifyBodyFromSemiMajorAxis(double a, double tolerance) const
+

Identify a celestial body from an approximate radius.

+
+
Parameters
+
    +
  • semi_major_axis – Approximate semi-major axis.

  • +
  • tolerance – Relative error allowed.

  • +
+
+
Throws
+

FactoryException

+
+
Returns
+

celestial body name if one single match found.

+
+
+
+ +
+
+datum::EllipsoidNNPtr createEllipsoid(const std::string &code) const
+

Returns a datum::Ellipsoid from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+datum::DatumNNPtr createDatum(const std::string &code) const
+

Returns a datum::Datum from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+datum::DatumEnsembleNNPtr createDatumEnsemble(const std::string &code, const std::string &type = std::string()) const
+

Returns a datum::DatumEnsemble from the specified code.

+
+
Parameters
+
    +
  • code – Object code allocated by authority.

  • +
  • type – “geodetic_datum”, “vertical_datum” or empty string if unknown

  • +
+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+datum::GeodeticReferenceFrameNNPtr createGeodeticDatum(const std::string &code) const
+

Returns a datum::GeodeticReferenceFrame from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+datum::VerticalReferenceFrameNNPtr createVerticalDatum(const std::string &code) const
+

Returns a datum::VerticalReferenceFrame from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+cs::CoordinateSystemNNPtr createCoordinateSystem(const std::string &code) const
+

Returns a cs::CoordinateSystem from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+crs::GeodeticCRSNNPtr createGeodeticCRS(const std::string &code) const
+

Returns a crs::GeodeticCRS from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+crs::GeographicCRSNNPtr createGeographicCRS(const std::string &code) const
+

Returns a crs::GeographicCRS from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+crs::VerticalCRSNNPtr createVerticalCRS(const std::string &code) const
+

Returns a crs::VerticalCRS from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+operation::ConversionNNPtr createConversion(const std::string &code) const
+

Returns a operation::Conversion from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+crs::ProjectedCRSNNPtr createProjectedCRS(const std::string &code) const
+

Returns a crs::ProjectedCRS from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+crs::CompoundCRSNNPtr createCompoundCRS(const std::string &code) const
+

Returns a crs::CompoundCRS from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+crs::CRSNNPtr createCoordinateReferenceSystem(const std::string &code) const
+

Returns a crs::CRS from the specified code.

+
+
Parameters
+

code – Object code allocated by authority.

+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+operation::CoordinateOperationNNPtr createCoordinateOperation(const std::string &code, bool usePROJAlternativeGridNames) const
+

Returns a operation::CoordinateOperation from the specified code.

+
+
Parameters
+
    +
  • code – Object code allocated by authority.

  • +
  • usePROJAlternativeGridNames – Whether PROJ alternative grid names should be substituted to the official grid names.

  • +
+
+
Throws
+
+
+
Returns
+

object.

+
+
+
+ +
+
+std::vector<operation::CoordinateOperationNNPtr> createFromCoordinateReferenceSystemCodes(const std::string &sourceCRSCode, const std::string &targetCRSCode) const
+

Returns a list operation::CoordinateOperation between two CRS.

+

The list is ordered with preferred operations first. No attempt is made at inferring operations that are not explicitly in the database.

+

Deprecated operations are rejected.

+
+
Parameters
+
    +
  • sourceCRSCode – Source CRS code allocated by authority.

  • +
  • targetCRSCode – Source CRS code allocated by authority.

  • +
+
+
Throws
+
+
+
Returns
+

list of coordinate operations

+
+
+
+ +
+
+std::list<std::string> getGeoidModels(const std::string &code) const
+

Returns a list of geoid models available for that crs.

+

The list includes the geoid models connected directly with the crs, or via “Height Depth Reversal” or “Change of Vertical Unit” transformations

+
+
Parameters
+

code – crs code allocated by authority.

+
+
Throws
+

FactoryException

+
+
Returns
+

list of geoid model names

+
+
+
+ +
+
+const std::string &getAuthority()
+

Returns the authority name associated to this factory.

+
+
Returns
+

name.

+
+
+
+ +
+
+std::set<std::string> getAuthorityCodes(const ObjectType &type, bool allowDeprecated = true) const
+

Returns the set of authority codes of the given object type.

+
+
Parameters
+
    +
  • type – Object type.

  • +
  • allowDeprecated – whether we should return deprecated objects as well.

  • +
+
+
Throws
+

FactoryException

+
+
Returns
+

the set of authority codes for spatial reference objects of the given type

+
+
+
+ +
+
+std::string getDescriptionText(const std::string &code) const
+

Gets a description of the object corresponding to a code.

+
+

Note

+

In case of several objects of different types with the same code, one of them will be arbitrarily selected. But if a CRS object is found, it will be selected.

+
+
+
Parameters
+

code – Object code allocated by authority. (e.g. “4326”)

+
+
Throws
+
+
+
Returns
+

description.

+
+
+
+ +
+
+std::list<CRSInfo> getCRSInfoList() const
+

Return a list of information on CRS objects.

+

This is functionally equivalent of listing the codes from an authority, instantiating a CRS object for each of them and getting the information from this CRS object, but this implementation has much less overhead.

+
+
Throws
+

FactoryException

+
+
+
+ +
+
+std::list<UnitInfo> getUnitList() const
+

Return the list of units.

+

+
Since

7.1

+
+
+

+
+
Throws
+

FactoryException

+
+
+
+ +
+
+std::list<CelestialBodyInfo> getCelestialBodyList() const
+

Return the list of celestial bodies.

+

+
Since

8.1

+
+
+

+
+
Throws
+

FactoryException

+
+
+
+ +
+
+const DatabaseContextNNPtr &databaseContext() const
+

Returns the database context.

+
+ +
+
+std::vector<operation::CoordinateOperationNNPtr> createFromCoordinateReferenceSystemCodes(const std::string &sourceCRSAuthName, const std::string &sourceCRSCode, const std::string &targetCRSAuthName, const std::string &targetCRSCode, bool usePROJAlternativeGridNames, bool discardIfMissingGrid, bool considerKnownGridsAsAvailable, bool discardSuperseded, bool tryReverseOrder = false, bool reportOnlyIntersectingTransformations = false, const metadata::ExtentPtr &intersectingExtent1 = nullptr, const metadata::ExtentPtr &intersectingExtent2 = nullptr) const
+

Returns a list operation::CoordinateOperation between two CRS.

+

The list is ordered with preferred operations first. No attempt is made at inferring operations that are not explicitly in the database (see createFromCRSCodesWithIntermediates() for that), and only source -> target operations are searched (i.e. if target -> source is present, you need to call this method with the arguments reversed, and apply the reverse transformations).

+

Deprecated operations are rejected.

+

If getAuthority() returns empty, then coordinate operations from all authorities are considered.

+
+
Parameters
+
    +
  • sourceCRSAuthName – Authority name of sourceCRSCode

  • +
  • sourceCRSCode – Source CRS code allocated by authority sourceCRSAuthName.

  • +
  • targetCRSAuthName – Authority name of targetCRSCode

  • +
  • targetCRSCode – Source CRS code allocated by authority targetCRSAuthName.

  • +
  • usePROJAlternativeGridNames – Whether PROJ alternative grid names should be substituted to the official grid names.

  • +
  • discardIfMissingGrid – Whether coordinate operations that reference missing grids should be removed from the result set.

  • +
  • considerKnownGridsAsAvailable – Whether known grids should be considered as available (typically when network is enabled).

  • +
  • discardSuperseded – Whether coordinate operations that are superseded (but not deprecated) should be removed from the result set.

  • +
  • tryReverseOrder – whether to search in the reverse order too (and thus inverse results found that way)

  • +
  • reportOnlyIntersectingTransformations – if intersectingExtent1 and intersectingExtent2 should be honored in a strict way.

  • +
  • intersectingExtent1 – Optional extent that the resulting operations must intersect.

  • +
  • intersectingExtent2 – Optional extent that the resulting operations must intersect.

  • +
+
+
Throws
+
+
+
Returns
+

list of coordinate operations

+
+
+
+ +
+
+std::vector<operation::CoordinateOperationNNPtr> createFromCRSCodesWithIntermediates(const std::string &sourceCRSAuthName, const std::string &sourceCRSCode, const std::string &targetCRSAuthName, const std::string &targetCRSCode, bool usePROJAlternativeGridNames, bool discardIfMissingGrid, bool considerKnownGridsAsAvailable, bool discardSuperseded, const std::vector<std::pair<std::string, std::string>> &intermediateCRSAuthCodes, ObjectType allowedIntermediateObjectType = ObjectType::CRS, const std::vector<std::string> &allowedAuthorities = std::vector<std::string>(), const metadata::ExtentPtr &intersectingExtent1 = nullptr, const metadata::ExtentPtr &intersectingExtent2 = nullptr) const
+

Returns a list operation::CoordinateOperation between two CRS, using intermediate codes.

+

The list is ordered with preferred operations first.

+

Deprecated operations are rejected.

+

The method will take care of considering all potential combinations (i.e. contrary to createFromCoordinateReferenceSystemCodes(), you do not need to call it with sourceCRS and targetCRS switched)

+

If getAuthority() returns empty, then coordinate operations from all authorities are considered.

+
+
Parameters
+
    +
  • sourceCRSAuthName – Authority name of sourceCRSCode

  • +
  • sourceCRSCode – Source CRS code allocated by authority sourceCRSAuthName.

  • +
  • targetCRSAuthName – Authority name of targetCRSCode

  • +
  • targetCRSCode – Source CRS code allocated by authority targetCRSAuthName.

  • +
  • usePROJAlternativeGridNames – Whether PROJ alternative grid names should be substituted to the official grid names.

  • +
  • discardIfMissingGrid – Whether coordinate operations that reference missing grids should be removed from the result set.

  • +
  • considerKnownGridsAsAvailable – Whether known grids should be considered as available (typically when network is enabled).

  • +
  • discardSuperseded – Whether coordinate operations that are superseded (but not deprecated) should be removed from the result set.

  • +
  • intermediateCRSAuthCodes – List of (auth_name, code) of CRS that can be used as potential intermediate CRS. If the list is empty, the database will be used to find common CRS in operations involving both the source and target CRS.

  • +
  • allowedIntermediateObjectType – Restrict the type of the intermediate object considered. Only ObjectType::CRS and ObjectType::GEOGRAPHIC_CRS supported currently

  • +
  • allowedAuthorities – One or several authority name allowed for the two coordinate operations that are going to be searched. When this vector is no empty, it overrides the authority of this object. This is useful for example when the coordinate operations to chain belong to two different allowed authorities.

  • +
  • intersectingExtent1 – Optional extent that the resulting operations must intersect.

  • +
  • intersectingExtent2 – Optional extent that the resulting operations must intersect.

  • +
+
+
Throws
+
+
+
Returns
+

list of coordinate operations

+
+
+
+ +
+
+std::string getOfficialNameFromAlias(const std::string &aliasedName, const std::string &tableName, const std::string &source, bool tryEquivalentNameSpelling, std::string &outTableName, std::string &outAuthName, std::string &outCode) const
+

Gets the official name from a possibly alias name.

+
+
Parameters
+
    +
  • aliasedName – Alias name.

  • +
  • tableName – Table name/category. Can help in case of ambiguities. Or empty otherwise.

  • +
  • source – Source of the alias. Can help in case of ambiguities. Or empty otherwise.

  • +
  • tryEquivalentNameSpelling – whether the comparison of aliasedName with the alt_name column of the alias_name table should be done with using metadata::Identifier::isEquivalentName() rather than strict string comparison;

  • +
  • outTableName – Table name in which the official name has been found.

  • +
  • outAuthName – Authority name of the official name that has been found.

  • +
  • outCode – Code of the official name that has been found.

  • +
+
+
Throws
+

FactoryException

+
+
Returns
+

official name (or empty if not found).

+
+
+
+ +
+
+std::list<common::IdentifiedObjectNNPtr> createObjectsFromName(const std::string &name, const std::vector<ObjectType> &allowedObjectTypes = std::vector<ObjectType>(), bool approximateMatch = true, size_t limitResultCount = 0) const
+

Return a list of objects, identified by their name.

+
+
Parameters
+
    +
  • searchedName – Searched name. Must be at least 2 character long.

  • +
  • allowedObjectTypes – List of object types into which to search. If empty, all object types will be searched.

  • +
  • approximateMatch – Whether approximate name identification is allowed.

  • +
  • limitResultCount – Maximum number of results to return. Or 0 for unlimited.

  • +
+
+
Throws
+

FactoryException

+
+
Returns
+

list of matched objects.

+
+
+
+ +
+
+std::list<std::pair<std::string, std::string>> listAreaOfUseFromName(const std::string &name, bool approximateMatch) const
+

Return a list of area of use from their name.

+
+
Parameters
+
    +
  • name – Searched name.

  • +
  • approximateMatch – Whether approximate name identification is allowed.

  • +
+
+
Throws
+

FactoryException

+
+
Returns
+

list of (auth_name, code) of matched objects.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static AuthorityFactoryNNPtr create(const DatabaseContextNNPtr &context, const std::string &authorityName)
+

Instantiate a AuthorityFactory.

+

The authority name might be set to the empty string in the particular case where createFromCoordinateReferenceSystemCodes(const std::string&,const std::string&,const std::string&,const std::string&) const is called.

+
+
Parameters
+
    +
  • context – Context.

  • +
  • authorityName – Authority name.

  • +
+
+
Returns
+

new AuthorityFactory.

+
+
+
+ +
+
+
+struct CelestialBodyInfo
+
+#include <io.hpp>
+

Celestial Body information

+
+

Public Members

+
+
+std::string authName
+

Authority name

+
+ +
+
+std::string name
+

Name

+
+ +
+
+ +
+
+struct CRSInfo
+
+#include <io.hpp>
+

CRS information

+
+

Public Members

+
+
+std::string authName
+

Authority name

+
+ +
+
+std::string code
+

Code

+
+ +
+
+std::string name
+

Name

+
+ +
+
+ObjectType type
+

Type

+
+ +
+
+bool deprecated
+

Whether the object is deprecated

+
+ +
+
+bool bbox_valid
+

Whereas the west_lon_degree, south_lat_degree, east_lon_degree and north_lat_degree fields are valid.

+
+ +
+
+double west_lon_degree
+

Western-most longitude of the area of use, in degrees.

+
+ +
+
+double south_lat_degree
+

Southern-most latitude of the area of use, in degrees.

+
+ +
+
+double east_lon_degree
+

Eastern-most longitude of the area of use, in degrees.

+
+ +
+
+double north_lat_degree
+

Northern-most latitude of the area of use, in degrees.

+
+ +
+
+std::string areaName
+

Name of the area of use.

+
+ +
+
+std::string projectionMethodName
+

Name of the projection method for a projected CRS. Might be empty even for projected CRS in some cases.

+
+ +
+
+std::string celestialBodyName
+

Name of the celestial body of the CRS (e.g. “Earth”)

+
+ +
+
+ +
+
+struct UnitInfo
+
+#include <io.hpp>
+

Unit information

+
+

Public Members

+
+
+std::string authName
+

Authority name

+
+ +
+
+std::string code
+

Code

+
+ +
+
+std::string name
+

Name

+
+ +
+
+std::string category
+

Category: one of “linear”, “linear_per_time”, “angular”, “angular_per_time”, “scale”, “scale_per_time” or “time”

+
+ +
+
+double convFactor
+

Conversion factor to the SI unit. It might be 0 in some cases to indicate no known conversion factor.

+
+ +
+
+std::string projShortName
+

PROJ short name (may be empty)

+
+ +
+
+bool deprecated
+

Whether the object is deprecated

+
+ +
+
+ +
+ +
+
+class DatabaseContext
+
+#include <io.hpp>
+

Database context.

+

A database context should be used only by one thread at a time.

+
+

Public Functions

+
+
+const std::string &getPath() const
+

Return the path to the database.

+
+ +
+
+const char *getMetadata(const char *key) const
+

Return a metadata item.

+

Value remains valid while this is alive and to the next call to getMetadata

+
+ +
+
+std::set<std::string> getAuthorities() const
+

Return the list of authorities used in the database.

+
+ +
+
+std::vector<std::string> getDatabaseStructure() const
+

Return the list of SQL commands (CREATE TABLE, CREATE TRIGGER, CREATE VIEW) needed to initialize a new database.

+
+ +
+
+void startInsertStatementsSession()
+

Starts a session for getInsertStatementsFor()

+

Starts a new session for one or several calls to getInsertStatementsFor(). An insertion session guarantees that the inserted objects will not create conflicting intermediate objects.

+

The session must be stopped with stopInsertStatementsSession().

+

Only one session may be active at a time for a given database context.

+

+
Since

8.1

+
+
+

+
+
Throws
+

FactoryException

+
+
+
+ +
+
+std::string suggestsCodeFor(const common::IdentifiedObjectNNPtr &object, const std::string &authName, bool numericCode)
+

Suggests a database code for the passed object.

+

Supported type of objects are PrimeMeridian, Ellipsoid, Datum, DatumEnsemble, GeodeticCRS, ProjectedCRS, VerticalCRS, CompoundCRS, BoundCRS, Conversion.

+

+
Since

8.1

+
+
+

+
+
Parameters
+
    +
  • object – Object for which to suggest a code.

  • +
  • authName – Authority name into which the object will be inserted.

  • +
  • numericCode – Whether the code should be numeric, or derived from the object name.

  • +
+
+
Throws
+

FactoryException

+
+
Returns
+

the suggested code, that is guaranteed to not conflict with an existing one.

+
+
+
+ +
+
+std::vector<std::string> getInsertStatementsFor(const common::IdentifiedObjectNNPtr &object, const std::string &authName, const std::string &code, bool numericCode, const std::vector<std::string> &allowedAuthorities = {"EPSG", "PROJ"})
+

Returns SQL statements needed to insert the passed object into the database.

+

startInsertStatementsSession() must have been called previously.

+

+
Since

8.1

+
+
+

+
+
Parameters
+
    +
  • object – The object to insert into the database. Currently only PrimeMeridian, Ellipsoid, Datum, GeodeticCRS, ProjectedCRS, VerticalCRS, CompoundCRS or BoundCRS are supported.

  • +
  • authName – Authority name into which the object will be inserted.

  • +
  • code – Code with which the object will be inserted.

  • +
  • numericCode – Whether intermediate objects that can be created should use numeric codes (true), or may be alphanumeric (false)

  • +
  • allowedAuthorities – Authorities to which intermediate objects are allowed to refer to. authName will be implicitly added to it. Note that unit, coordinate systems, projection methods and parameters will in any case be allowed to refer to EPSG.

  • +
+
+
Throws
+

FactoryException

+
+
+
+ +
+
+void stopInsertStatementsSession()
+

Stops an insertion session started with startInsertStatementsSession()

+

+
Since

8.1

+
+
+

+
+ +
+
+

Public Static Functions

+
+
+static DatabaseContextNNPtr create(const std::string &databasePath = std::string(), const std::vector<std::string> &auxiliaryDatabasePaths = std::vector<std::string>(), PJ_CONTEXT *ctx = nullptr)
+

Instantiate a database context.

+

This database context should be used only by one thread at a time.

+
+
Parameters
+
    +
  • databasePath – Path and filename of the database. Might be empty string for the default rules to locate the default proj.db

  • +
  • auxiliaryDatabasePaths – Path and filename of auxiliary databases. Might be empty. Starting with PROJ 8.1, if this parameter is an empty array, the PROJ_AUX_DB environment variable will be used, if set. It must contain one or several paths. If several paths are provided, they must be separated by the colon (:) character on Unix, and on Windows, by the semi-colon (;) character.

  • +
  • ctx – Context used for file search.

  • +
+
+
Throws
+

FactoryException

+
+
+
+ +
+
+ +
+
+class FactoryException : public osgeo::proj::util::Exception
+
+#include <io.hpp>
+

Exception thrown when a factory can’t create an instance of the requested object.

+

Subclassed by osgeo::proj::io::NoSuchAuthorityCodeException

+
+ +
+
+class FormattingException : public osgeo::proj::util::Exception
+
+#include <io.hpp>
+

Exception possibly thrown by IWKTExportable::exportToWKT() or IPROJStringExportable::exportToPROJString().

+
+ +
+
+class IJSONExportable
+
+#include <io.hpp>
+

Interface for an object that can be exported to JSON.

+

Subclassed by osgeo::proj::crs::CRS, osgeo::proj::cs::CoordinateSystem, osgeo::proj::cs::CoordinateSystemAxis, osgeo::proj::datum::Datum, osgeo::proj::datum::DatumEnsemble, osgeo::proj::datum::Ellipsoid, osgeo::proj::datum::PrimeMeridian, osgeo::proj::metadata::Identifier, osgeo::proj::operation::CoordinateOperation, osgeo::proj::operation::GeneralParameterValue, osgeo::proj::operation::OperationMethod

+
+

Public Functions

+
+
+std::string exportToJSON(JSONFormatter *formatter) const
+

Builds a JSON representation. May throw a FormattingException

+
+ +
+
+ +
+
+class IPROJStringExportable
+
+#include <io.hpp>
+

Interface for an object that can be exported to a PROJ string.

+

Subclassed by osgeo::proj::crs::BoundCRS, osgeo::proj::crs::CompoundCRS, osgeo::proj::crs::GeodeticCRS, osgeo::proj::crs::ProjectedCRS, osgeo::proj::crs::VerticalCRS, osgeo::proj::datum::Ellipsoid, osgeo::proj::datum::PrimeMeridian, osgeo::proj::operation::CoordinateOperation

+
+

Public Functions

+
+
+std::string exportToPROJString(PROJStringFormatter *formatter) const
+

Builds a PROJ string representation.

+

    +
  • For PROJStringFormatter::Convention::PROJ_5 (the default),

      +
    • For a crs::CRS, returns the same as PROJStringFormatter::Convention::PROJ_4. It should be noted that the export of a CRS as a PROJ string may cause loss of many important aspects of a CRS definition. Consequently it is discouraged to use it for interoperability in newer projects. The choice of a WKT representation will be a better option.

    • +
    • For operation::CoordinateOperation, returns a PROJ pipeline.

    • +
    +

    +

    +
  • +
  • For PROJStringFormatter::Convention::PROJ_4, format a string compatible with the OGRSpatialReference::exportToProj4() of GDAL <=2.3. It is only compatible of a few CRS objects. The PROJ string will also contain a +type=crs parameter to disambiguate the nature of the string from a CoordinateOperation.

      +
    • For a crs::GeographicCRS, returns a proj=longlat string, with ellipsoid / datum / prime meridian information, ignoring axis order and unit information.

    • +
    • For a geocentric crs::GeodeticCRS, returns the transformation from geographic coordinates into geocentric coordinates.

    • +
    • For a crs::ProjectedCRS, returns the projection method, ignoring axis order.

    • +
    • For a crs::BoundCRS, returns the PROJ string of its source/base CRS, amended with towgs84 / nadgrids parameter when the deriving conversion can be expressed in that way.

    • +
    +

    +

    +
  • +
+

+
+
Parameters
+

formatter – PROJ string formatter.

+
+
Throws
+

FormattingException

+
+
Returns
+

a PROJ string.

+
+
+
+ +
+
+ +
+
+class IWKTExportable
+
+#include <io.hpp>
+

Interface for an object that can be exported to WKT.

+

Subclassed by osgeo::proj::common::IdentifiedObject, osgeo::proj::metadata::Identifier, osgeo::proj::operation::GeneralParameterValue, osgeo::proj::operation::ParameterValue

+
+

Public Functions

+
+
+std::string exportToWKT(WKTFormatter *formatter) const
+

Builds a WKT representation. May throw a FormattingException

+
+ +
+
+ +
+
+class JSONFormatter
+
+#include <io.hpp>
+

Formatter to JSON strings.

+

An instance of this class can only be used by a single thread at a time.

+
+

Public Functions

+
+
+JSONFormatter &setMultiLine(bool multiLine) noexcept
+

Whether to use multi line output or not.

+
+ +
+
+JSONFormatter &setIndentationWidth(int width) noexcept
+

Set number of spaces for each indentation level (defaults to 4).

+
+ +
+
+JSONFormatter &setSchema(const std::string &schema) noexcept
+

Set the value of the “$schema” key in the top level object.

+

If set to empty string, it will not be written.

+
+ +
+
+const std::string &toString() const
+

Return the serialized JSON.

+
+ +
+
+

Public Static Functions

+
+
+static JSONFormatterNNPtr create(DatabaseContextPtr dbContext = nullptr)
+

Constructs a new formatter.

+

A formatter can be used only once (its internal state is mutated)

+
+
Returns
+

new formatter.

+
+
+
+ +
+
+ +
+
+class NoSuchAuthorityCodeException : public osgeo::proj::io::FactoryException
+
+#include <io.hpp>
+

Exception thrown when an authority factory can’t find the requested authority code.

+
+

Public Functions

+
+
+const std::string &getAuthority() const
+

Returns authority name.

+
+ +
+
+const std::string &getAuthorityCode() const
+

Returns authority code.

+
+ +
+
+ +
+
+class ParsingException : public osgeo::proj::util::Exception
+
+#include <io.hpp>
+

Exception possibly thrown by WKTNode::createFrom() or WKTParser::createFromWKT().

+
+ +
+
+class PROJStringFormatter
+
+#include <io.hpp>
+

Formatter to PROJ strings.

+

An instance of this class can only be used by a single thread at a time.

+
+

Public Types

+
+
+enum class Convention
+

PROJ variant.

+

Values:

+
+
+enumerator PROJ_5
+

PROJ v5 (or later versions) string.

+
+ +
+
+enumerator PROJ_4
+

PROJ v4 string as output by GDAL exportToProj4()

+
+ +
+ +
+
+

Public Functions

+
+
+PROJStringFormatter &setMultiLine(bool multiLine) noexcept
+

Whether to use multi line output or not.

+
+ +
+
+PROJStringFormatter &setIndentationWidth(int width) noexcept
+

Set number of spaces for each indentation level (defaults to 2).

+
+ +
+
+PROJStringFormatter &setMaxLineLength(int maxLineLength) noexcept
+

Set the maximum size of a line (when multiline output is enable). Can be set to 0 for unlimited length.

+
+ +
+
+void setUseApproxTMerc(bool flag)
+

Set whether approximate Transverse Mercator or UTM should be used.

+
+ +
+
+const std::string &toString() const
+

Returns the PROJ string.

+
+ +
+
+

Public Static Functions

+
+
+static PROJStringFormatterNNPtr create(Convention conventionIn = Convention::PROJ_5, DatabaseContextPtr dbContext = nullptr)
+

Constructs a new formatter.

+

A formatter can be used only once (its internal state is mutated)

+

Its default behavior can be adjusted with the different setters.

+
+
Parameters
+
    +
  • conventionIn – PROJ string flavor. Defaults to Convention::PROJ_5

  • +
  • dbContext – Database context (can help to find alternative grid names). May be nullptr

  • +
+
+
Returns
+

new formatter.

+
+
+
+ +
+
+ +
+
+class PROJStringParser
+
+#include <io.hpp>
+

Parse a PROJ string into the appropriate subclass of util::BaseObject.

+
+

Public Functions

+
+
+PROJStringParser &attachDatabaseContext(const DatabaseContextPtr &dbContext)
+

Attach a database context, to allow queries in it if needed.

+
+ +
+
+PROJStringParser &setUsePROJ4InitRules(bool enable)
+

Set how init=epsg:XXXX syntax should be interpreted.

+
+
Parameters
+

enable – When set to true, init=epsg:XXXX syntax will be allowed and will be interpreted according to PROJ.4 and PROJ.5 rules, that is geodeticCRS will have longitude, latitude order and will expect/output coordinates in radians. ProjectedCRS will have easting, northing axis order (except the ones with Transverse Mercator South Orientated projection).

+
+
+
+ +
+
+std::vector<std::string> warningList() const
+

Return the list of warnings found during parsing.

+
+ +
+
+util::BaseObjectNNPtr createFromPROJString(const std::string &projString)
+

Instantiate a sub-class of BaseObject from a PROJ string.

+

The projString must contain +type=crs for the object to be detected as a CRS instead of a CoordinateOperation.

+
+
Throws
+

ParsingException

+
+
+
+ +
+
+ +
+
+class WKTFormatter
+
+#include <io.hpp>
+

Formatter to WKT strings.

+

An instance of this class can only be used by a single thread at a time.

+
+

Public Types

+
+
+enum class Convention
+

WKT variant.

+

Values:

+
+
+enumerator WKT2
+

Full WKT2 string, conforming to ISO 19162:2015(E) / OGC 12-063r5 (WKT2:2015) with all possible nodes and new keyword names.

+
+ +
+
+enumerator WKT2_2015
+
+ +
+
+enumerator WKT2_SIMPLIFIED
+

Same as WKT2 with the following exceptions:

    +
  • UNIT keyword used.

  • +
  • ID node only on top element.

  • +
  • No ORDER element in AXIS element.

  • +
  • PRIMEM node omitted if it is Greenwich.

  • +
  • ELLIPSOID.UNIT node omitted if it is UnitOfMeasure::METRE.

  • +
  • PARAMETER.UNIT / PRIMEM.UNIT omitted if same as AXIS.

  • +
  • AXIS.UNIT omitted and replaced by a common GEODCRS.UNIT if they are all the same on all axis.

  • +
+

+
+ +
+
+enumerator WKT2_2015_SIMPLIFIED
+
+ +
+
+enumerator WKT2_2019
+

Full WKT2 string, conforming to ISO 19162:2019 / OGC 18-010, with (WKT2:2019) all possible nodes and new keyword names. Non-normative list of differences:

    +
  • WKT2_2019 uses GEOGCRS / BASEGEOGCRS keywords for GeographicCRS.

  • +
+

+
+ +
+
+enumerator WKT2_2018
+

Deprecated alias for WKT2_2019

+
+ +
+
+enumerator WKT2_2019_SIMPLIFIED
+

WKT2_2019 with the simplification rule of WKT2_SIMPLIFIED

+
+ +
+
+enumerator WKT2_2018_SIMPLIFIED
+

Deprecated alias for WKT2_2019_SIMPLIFIED

+
+ +
+
+enumerator WKT1_GDAL
+

WKT1 as traditionally output by GDAL, deriving from OGC 01-009. A notable departure from WKT1_GDAL with respect to OGC 01-009 is that in WKT1_GDAL, the unit of the PRIMEM value is always degrees.

+
+ +
+
+enumerator WKT1_ESRI
+

WKT1 as traditionally output by ESRI software, deriving from OGC 99-049.

+
+ +
+ +
+
+enum class OutputAxisRule
+

Rule for output AXIS nodes

+

Values:

+
+
+enumerator YES
+

Always include AXIS nodes

+
+ +
+
+enumerator NO
+

Never include AXIS nodes

+
+ +
+
+enumerator WKT1_GDAL_EPSG_STYLE
+

Includes them only on PROJCS node if it uses Easting/Northing ordering. Typically used for WKT1_GDAL

+
+ +
+ +
+
+

Public Functions

+
+
+WKTFormatter &setMultiLine(bool multiLine) noexcept
+

Whether to use multi line output or not.

+
+ +
+
+WKTFormatter &setIndentationWidth(int width) noexcept
+

Set number of spaces for each indentation level (defaults to 4).

+
+ +
+
+WKTFormatter &setOutputAxis(OutputAxisRule outputAxis) noexcept
+

Set whether AXIS nodes should be output.

+
+ +
+
+WKTFormatter &setStrict(bool strict) noexcept
+

Set whether the formatter should operate on strict more or not.

+

The default is strict mode, in which case a FormattingException can be thrown. In non-strict mode, a Geographic 3D CRS can be for example exported as WKT1_GDAL with 3 axes, whereas this is normally not allowed.

+
+ +
+
+bool isStrict() const noexcept
+

Returns whether the formatter is in strict mode.

+
+ +
+
+WKTFormatter &setAllowEllipsoidalHeightAsVerticalCRS(bool allow) noexcept
+

Set whether the formatter should export, in WKT1, a Geographic or Projected 3D CRS as a compound CRS whose vertical part represents an ellipsoidal height.

+
+ +
+
+bool isAllowedEllipsoidalHeightAsVerticalCRS() const noexcept
+

Return whether the formatter should export, in WKT1, a Geographic or Projected 3D CRS as a compound CRS whose vertical part represents an ellipsoidal height.

+
+ +
+
+const std::string &toString() const
+

Returns the WKT string from the formatter.

+
+ +
+
+

Public Static Functions

+
+
+static WKTFormatterNNPtr create(Convention convention = Convention::WKT2, DatabaseContextPtr dbContext = nullptr)
+

Constructs a new formatter.

+

A formatter can be used only once (its internal state is mutated)

+

Its default behavior can be adjusted with the different setters.

+
+
Parameters
+
    +
  • convention – WKT flavor. Defaults to Convention::WKT2

  • +
  • dbContext – Database context, to allow queries in it if needed. This is used for example for WKT1_ESRI output to do name substitutions.

  • +
+
+
Returns
+

new formatter.

+
+
+
+ +
+
+static WKTFormatterNNPtr create(const WKTFormatterNNPtr &other)
+

Constructs a new formatter from another one.

+

A formatter can be used only once (its internal state is mutated)

+

Its default behavior can be adjusted with the different setters.

+
+
Parameters
+

other – source formatter.

+
+
Returns
+

new formatter.

+
+
+
+ +
+
+ +
+
+class WKTNode
+
+#include <io.hpp>
+

Node in the tree-splitted WKT representation.

+
+

Public Functions

+
+
+explicit WKTNode(const std::string &valueIn)
+

Instantiate a WKTNode.

+
+
Parameters
+

valueIn – the name of the node.

+
+
+
+ +
+
+const std::string &value() const
+

Return the value of a node.

+
+ +
+
+const std::vector<WKTNodeNNPtr> &children() const
+

Return the children of a node.

+
+ +
+
+void addChild(WKTNodeNNPtr &&child)
+

Adds a child to the current node.

+
+
Parameters
+

child – child to add. This should not be a parent of this node.

+
+
+
+ +
+
+const WKTNodePtr &lookForChild(const std::string &childName, int occurrence = 0) const noexcept
+

Return the (occurrence-1)th sub-node of name childName.

+
+
Parameters
+
    +
  • childName – name of the child.

  • +
  • occurrence – occurrence index (starting at 0)

  • +
+
+
Returns
+

the child, or nullptr.

+
+
+
+ +
+
+int countChildrenOfName(const std::string &childName) const noexcept
+

Return the count of children of given name.

+
+
Parameters
+

childName – name of the children to look for.

+
+
Returns
+

count

+
+
+
+ +
+
+std::string toString() const
+

Return a WKT representation of the tree structure.

+
+ +
+
+

Public Static Functions

+
+
+static WKTNodeNNPtr createFrom(const std::string &wkt, size_t indexStart = 0)
+

Instantiate a WKTNode hierarchy from a WKT string.

+
+
Parameters
+
    +
  • wkt – the WKT string to parse.

  • +
  • indexStart – the start index in the wkt string.

  • +
+
+
Throws
+

ParsingException

+
+
+
+ +
+
+ +
+
+class WKTParser
+
+#include <io.hpp>
+

Parse a WKT string into the appropriate subclass of util::BaseObject.

+
+

Public Types

+
+
+enum class WKTGuessedDialect
+

Guessed WKT “dialect”

+

Values:

+
+
+enumerator WKT2_2019
+

WKT2:2019

+
+ +
+
+enumerator WKT2_2018
+

Deprecated alias for WKT2_2019

+
+ +
+
+enumerator WKT2_2015
+

WKT2:2015

+
+ +
+
+enumerator WKT1_GDAL
+

WKT1 specification

+
+ +
+
+enumerator WKT1_ESRI
+

ESRI variant of WKT1

+
+ +
+
+enumerator NOT_WKT
+

Not WKT / unrecognized

+
+ +
+ +
+
+

Public Functions

+
+
+WKTParser &attachDatabaseContext(const DatabaseContextPtr &dbContext)
+

Attach a database context, to allow queries in it if needed.

+
+ +
+
+WKTParser &setStrict(bool strict)
+

Set whether parsing should be done in strict mode.

+
+ +
+
+std::list<std::string> warningList() const
+

Return the list of warnings found during parsing.

+
+

Note

+

The list might be non-empty only is setStrict(false) has been called.

+
+
+ +
+
+util::BaseObjectNNPtr createFromWKT(const std::string &wkt)
+

Instantiate a sub-class of BaseObject from a WKT string.

+

By default, validation is strict (to the extent of the checks that are actually implemented. Currently only WKT1 strict grammar is checked), and any issue detected will cause an exception to be thrown, unless setStrict(false) is called priorly.

+

In non-strict mode, non-fatal issues will be recovered and simply listed in warningList(). This does not prevent more severe errors to cause an exception to be thrown.

+
+
Throws
+

ParsingException

+
+
+
+ +
+
+WKTGuessedDialect guessDialect(const std::string &wkt) noexcept
+

Guess the “dialect” of the WKT string.

+
+ +
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/metadata.html b/development/reference/cpp/metadata.html new file mode 100644 index 00000000..a307f054 --- /dev/null +++ b/development/reference/cpp/metadata.html @@ -0,0 +1,872 @@ + + + + + + + metadata namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

metadata namespace

+
+
+namespace osgeo::proj::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.

+

+

+
+

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 Extent : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable
+
+#include <metadata.hpp>
+

Information about spatial, vertical, and temporal extent.

+

+

+
+

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 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.

+

+

+
+

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 GeographicExtent : public osgeo::proj::util::BaseObject, public osgeo::proj::util::IComparable
+
+#include <metadata.hpp>
+

Base interface for geographic area of the dataset.

+

+

+

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 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.

+

+

+
+

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.

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

Time period covered by the content of the dataset.

+

+

+
+

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.

+

+

+
+

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.

+
+
+
+ +
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/operation.html b/development/reference/cpp/operation.html new file mode 100644 index 00000000..cb5ba8cb --- /dev/null +++ b/development/reference/cpp/operation.html @@ -0,0 +1,4030 @@ + + + + + + + operation namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

operation namespace

+
+
+namespace osgeo::proj::operation
+

Coordinate operations (relationship between any two coordinate reference systems).

+

osgeo.proj.operation namespace

+

This covers Conversion, Transformation, PointMotionOperation or ConcatenatedOperation.

+
+

Typedefs

+
+
+typedef std::shared_ptr<CoordinateOperation> CoordinateOperationPtr
+

Shared pointer of CoordinateOperation

+
+ +
+
+typedef util::nn<CoordinateOperationPtr> CoordinateOperationNNPtr
+

Non-null shared pointer of CoordinateOperation

+
+ +
+
+using GeneralOperationParameterPtr = std::shared_ptr<GeneralOperationParameter>
+

Shared pointer of GeneralOperationParameter

+
+ +
+
+using GeneralOperationParameterNNPtr = util::nn<GeneralOperationParameterPtr>
+

Non-null shared pointer of GeneralOperationParameter

+
+ +
+
+using OperationParameterPtr = std::shared_ptr<OperationParameter>
+

Shared pointer of OperationParameter

+
+ +
+
+using OperationParameterNNPtr = util::nn<OperationParameterPtr>
+

Non-null shared pointer of OperationParameter

+
+ +
+
+using GeneralParameterValuePtr = std::shared_ptr<GeneralParameterValue>
+

Shared pointer of GeneralParameterValue

+
+ +
+
+using GeneralParameterValueNNPtr = util::nn<GeneralParameterValuePtr>
+

Non-null shared pointer of GeneralParameterValue

+
+ +
+
+using ParameterValuePtr = std::shared_ptr<ParameterValue>
+

Shared pointer of ParameterValue

+
+ +
+
+using ParameterValueNNPtr = util::nn<ParameterValuePtr>
+

Non-null shared pointer of ParameterValue

+
+ +
+
+using OperationParameterValuePtr = std::shared_ptr<OperationParameterValue>
+

Shared pointer of OperationParameterValue

+
+ +
+
+using OperationParameterValueNNPtr = util::nn<OperationParameterValuePtr>
+

Non-null shared pointer of OperationParameterValue

+
+ +
+
+using OperationMethodPtr = std::shared_ptr<OperationMethod>
+

Shared pointer of OperationMethod

+
+ +
+
+using OperationMethodNNPtr = util::nn<OperationMethodPtr>
+

Non-null shared pointer of OperationMethod

+
+ +
+
+using SingleOperationPtr = std::shared_ptr<SingleOperation>
+

Shared pointer of SingleOperation

+
+ +
+
+using SingleOperationNNPtr = util::nn<SingleOperationPtr>
+

Non-null shared pointer of SingleOperation

+
+ +
+
+typedef std::shared_ptr<Conversion> ConversionPtr
+

Shared pointer of Conversion

+
+ +
+
+typedef util::nn<ConversionPtr> ConversionNNPtr
+

Non-null shared pointer of Conversion

+
+ +
+
+using TransformationPtr = std::shared_ptr<Transformation>
+

Shared pointer of Transformation

+
+ +
+
+using TransformationNNPtr = util::nn<TransformationPtr>
+

Non-null shared pointer of Transformation

+
+ +
+
+using PointMotionOperationPtr = std::shared_ptr<PointMotionOperation>
+

Shared pointer of PointMotionOperation

+
+ +
+
+using PointMotionOperationNNPtr = util::nn<PointMotionOperationPtr>
+

Non-null shared pointer of PointMotionOperation

+
+ +
+
+using ConcatenatedOperationPtr = std::shared_ptr<ConcatenatedOperation>
+

Shared pointer of ConcatenatedOperation

+
+ +
+
+using ConcatenatedOperationNNPtr = util::nn<ConcatenatedOperationPtr>
+

Non-null shared pointer of ConcatenatedOperation

+
+ +
+
+using CoordinateOperationContextPtr = std::unique_ptr<CoordinateOperationContext>
+

Unique pointer of CoordinateOperationContext

+
+ +
+
+using CoordinateOperationContextNNPtr = util::nn<CoordinateOperationContextPtr>
+

Non-null unique pointer of CoordinateOperationContext

+
+ +
+
+using CoordinateOperationFactoryPtr = std::unique_ptr<CoordinateOperationFactory>
+

Unique pointer of CoordinateOperationFactory

+
+ +
+
+using CoordinateOperationFactoryNNPtr = util::nn<CoordinateOperationFactoryPtr>
+

Non-null unique pointer of CoordinateOperationFactory

+
+ +
+
+

Functions

+
+
+static double negate(double val)
+
+ +
+
+static CoordinateOperationPtr createApproximateInverseIfPossible(const Transformation *op)
+
+ +
+
+
+class ConcatenatedOperation : public osgeo::proj::operation::CoordinateOperation
+
+#include <coordinateoperation.hpp>
+

An ordered sequence of two or more single coordinate operations (SingleOperation).

+

The sequence of coordinate operations is constrained by the requirement that the source coordinate reference system of step n+1 shall be the same as the target coordinate reference system of step n.

+

+

Remark

+

Implements ConcatenatedOperation from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const std::vector<CoordinateOperationNNPtr> &operations() const
+

Return the operation steps of the concatenated operation.

+
+
Returns
+

the operation steps.

+
+
+
+ +
+
+virtual CoordinateOperationNNPtr inverse() const override
+

Return the inverse of the coordinate operation.

+
+
Throws
+

util::UnsupportedOperationException

+
+
+
+ +
+
+virtual std::set<GridDescription> gridsNeeded(const io::DatabaseContextPtr &databaseContext, bool considerKnownGridsAsAvailable) const override
+

Return grids needed by an operation.

+
+ +
+
+

Public Static Functions

+
+
+static ConcatenatedOperationNNPtr create(const util::PropertyMap &properties, const std::vector<CoordinateOperationNNPtr> &operationsIn, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a ConcatenatedOperation.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • operationsIn – Vector of the CoordinateOperation steps.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static CoordinateOperationNNPtr createComputeMetadata(const std::vector<CoordinateOperationNNPtr> &operationsIn, bool checkExtent)
+

Instantiate a ConcatenatedOperation, or return a single coordinate operation.

+

This computes its accuracy from the sum of its member operations, its extent

+
+
Parameters
+
    +
  • operationsIn – Vector of the CoordinateOperation steps.

  • +
  • checkExtent – Whether we should check the non-emptiness of the intersection of the extents of the operations

  • +
+
+
Throws
+

InvalidOperation

+
+
+
+ +
+
+ +
+
+class Conversion : public osgeo::proj::operation::SingleOperation
+
+#include <coordinateoperation.hpp>
+

A mathematical operation on coordinates in which the parameter values are defined rather than empirically derived.

+

Application of the coordinate conversion introduces no error into output coordinates. The best-known example of a coordinate conversion is a map projection. For coordinate conversions the output coordinates are referenced to the same datum as are the input coordinates.

+

Coordinate conversions forming a component of a derived CRS have a source crs::CRS and a target crs::CRS that are NOT specified through the source and target associations, but through associations from crs::DerivedCRS to crs::SingleCRS.

+

+

Remark

+

Implements Conversion from ISO 19111:2019

+
+

+
+

Projection parameters

+
+

Co-latitude of cone axis

+

The rotation applied to spherical coordinates for the oblique projection, measured on the conformal sphere in the plane of the meridian of origin.

+

EPSG:1036

+
+
+

Latitude of natural origin/Center Latitude

+

The latitude of the point from which the values of both the geographical coordinates on the ellipsoid and the grid coordinates on the projection are deemed to increment or decrement for computational purposes. Alternatively it may be considered as the latitude of the point which in the absence of application of false coordinates has grid coordinates of (0,0).

+

EPSG:8801

+
+
+

Longitude of natural origin/Central Meridian

+

The longitude of the point from which the values of both the geographical coordinates on the ellipsoid and the grid coordinates on the projection are deemed to increment or decrement for computational purposes. Alternatively it may be considered as the longitude of the point which in the absence of application of false coordinates has grid coordinates of (0,0). Sometimes known as “central meridian (CM)”.

+

EPSG:8802

+
+
+

Scale Factor

+

The factor by which the map grid is reduced or enlarged during the projection process, defined by its value at the natural origin.

+

EPSG:8805

+
+
+

False Easting

+

Since the natural origin may be at or near the centre of the projection and under normal coordinate circumstances would thus give rise to negative coordinates over parts of the mapped area, this origin is usually given false coordinates which are large enough to avoid this inconvenience. The False Easting, FE, is the value assigned to the abscissa (east or west) axis of the projection grid at the natural origin.

+

EPSG:8806

+
+
+

False Northing

+

Since the natural origin may be at or near the centre of the projection and under normal coordinate circumstances would thus give rise to negative coordinates over parts of the mapped area, this origin is usually given false coordinates which are large enough to avoid this inconvenience. The False Northing, FN, is the value assigned to the ordinate (north or south) axis of the projection grid at the natural origin.

+

EPSG:8807

+
+
+

Latitude of projection centre

+

For an oblique projection, this is the latitude of the point at which the azimuth of the central line is defined.

+

EPSG:8811

+
+
+

Longitude of projection centre

+

For an oblique projection, this is the longitude of the point at which the azimuth of the central line is defined.

+

EPSG:8812

+
+
+

Azimuth of initial line

+

The azimuthal direction (north zero, east of north being positive) of the great circle which is the centre line of an oblique projection. The azimuth is given at the projection centre.

+

EPSG:8813

+
+
+

Angle from Rectified to Skew Grid

+

The angle at the natural origin of an oblique projection through which the natural coordinate reference system is rotated to make the projection north axis parallel with true north.

+

EPSG:8814

+
+
+

Scale factor on initial line

+

The factor by which the map grid is reduced or enlarged during the projection process, defined by its value at the projection center.

+

EPSG:8815

+
+
+

Easting at projection centre

+

The easting value assigned to the projection centre.

+

EPSG:8816

+
+
+

Northing at projection centre

+

The northing value assigned to the projection centre.

+

EPSG:8817

+
+
+

Latitude of pseudo standard

+

parallel

+

Latitude of the parallel on which the conic or cylindrical projection is based. This latitude is not geographic, but is defined on the conformal sphere AFTER its rotation to obtain the oblique aspect of the projection.

+

EPSG:8818

+
+
+

Scale factor on pseudo

+

standard parallel

+

The factor by which the map grid is reduced or enlarged during the projection process, defined by its value at the pseudo-standard parallel. EPSG:8819

+
+
+

Latitude of false origin

+

The latitude of the point which is not the natural origin and at which grid coordinate values false easting and false northing are defined.

+

EPSG:8821

+
+
+

Longitude of false origin

+

The longitude of the point which is not the natural origin and at which grid coordinate values false easting and false northing are defined.

+

EPSG:8822

+
+
+

Latitude of 1st standard parallel

+

For a conic projection with two standard parallels, this is the latitude of one of the parallels of intersection of the cone with the ellipsoid. It is normally but not necessarily that nearest to the pole. Scale is true along this parallel.

+

EPSG:8823

+
+
+

Latitude of 2nd standard parallel

+

For a conic projection with two standard parallels, this is the latitude of one of the parallels at which the cone intersects with the ellipsoid. It is normally but not necessarily that nearest to the equator. Scale is true along this parallel.

+

EPSG:8824

+
+
+

Easting of false origin

+

The easting value assigned to the false origin.

+

EPSG:8826

+
+
+

Northing of false origin

+

The northing value assigned to the false origin.

+

EPSG:8827

+
+
+

Latitude of standard parallel

+

For polar aspect azimuthal projections, the parallel on which the scale factor is defined to be unity.

+

EPSG:8832

+
+
+

Longitude of origin

+

For polar aspect azimuthal projections, the meridian along which the northing axis increments and also across which parallels of latitude increment towards the north pole.

+

EPSG:8833

+
+
+
+

Public Functions

+
+
+virtual CoordinateOperationNNPtr inverse() const override
+

Return the inverse of the coordinate operation.

+
+
Throws
+

util::UnsupportedOperationException

+
+
+
+ +
+
+bool isUTM(int &zone, bool &north) const
+

Return whether a conversion is a [Universal Transverse Mercator] (https://proj.org/operations/projections/utm.html) conversion.

+
+
Parameters
+
    +
  • zone[out] UTM zone number between 1 and 60.

  • +
  • north[out] true for UTM northern hemisphere, false for UTM southern hemisphere.

  • +
+
+
Returns
+

true if it is a UTM conversion.

+
+
+
+ +
+
+ConversionNNPtr identify() const
+

Return a Conversion object where some parameters are better identified.

+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+ConversionPtr convertToOtherMethod(int targetEPSGCode) const
+

Return an equivalent projection.

+

Currently implemented:

    +
  • EPSG_CODE_METHOD_MERCATOR_VARIANT_A (1SP) to EPSG_CODE_METHOD_MERCATOR_VARIANT_B (2SP)

  • +
  • EPSG_CODE_METHOD_MERCATOR_VARIANT_B (2SP) to EPSG_CODE_METHOD_MERCATOR_VARIANT_A (1SP)

  • +
  • EPSG_CODE_METHOD_LAMBERT_CONIC_CONFORMAL_1SP to EPSG_CODE_METHOD_LAMBERT_CONIC_CONFORMAL_2SP

  • +
  • EPSG_CODE_METHOD_LAMBERT_CONIC_CONFORMAL_2SP to EPSG_CODE_METHOD_LAMBERT_CONIC_CONFORMAL_1SP

  • +
+

+
+
Parameters
+

targetEPSGCode – EPSG code of the target method.

+
+
Returns
+

new conversion, or nullptr

+
+
+
+ +
+
+

Public Static Functions

+
+
+static ConversionNNPtr create(const util::PropertyMap &properties, const OperationMethodNNPtr &methodIn, const std::vector<GeneralParameterValueNNPtr> &values)
+

Instantiate a Conversion from a vector of GeneralParameterValue.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • methodIn – the operation method.

  • +
  • values – the values.

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr create(const util::PropertyMap &propertiesConversion, const util::PropertyMap &propertiesOperationMethod, const std::vector<OperationParameterNNPtr> &parameters, const std::vector<ParameterValueNNPtr> &values)
+

Instantiate a Conversion and its OperationMethod.

+
+
Parameters
+
    +
  • propertiesConversion – See General properties of the conversion. At minimum the name should be defined.

  • +
  • propertiesOperationMethod – See General properties of the operation method. At minimum the name should be defined.

  • +
  • parameters – the operation parameters.

  • +
  • values – the operation values. Constraint: values.size() == parameters.size()

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createUTM(const util::PropertyMap &properties, int zone, bool north)
+

Instantiate a [Universal Transverse Mercator] (https://proj.org/operations/projections/utm.html) conversion.

+

UTM is a family of conversions, of EPSG codes from 16001 to 16060 for the northern hemisphere, and 17001 to 17060 for the southern hemisphere, based on the Transverse Mercator projection method.

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • zone – UTM zone number between 1 and 60.

  • +
  • north – true for UTM northern hemisphere, false for UTM southern hemisphere.

  • +
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createTransverseMercator(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Transverse Mercator] (https://proj.org/operations/projections/tmerc.html) projection method.

+

This method is defined as [EPSG:9807] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9807)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGaussSchreiberTransverseMercator(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Gauss Schreiber Transverse Mercator] (https://proj.org/operations/projections/gstmerc.html) projection method.

+

This method is also known as Gauss-Laborde Reunion.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createTransverseMercatorSouthOriented(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Transverse Mercator South Orientated] (https://proj.org/operations/projections/tmerc.html) projection method.

+

This method is defined as [EPSG:9808] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9808)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createTwoPointEquidistant(const util::PropertyMap &properties, const common::Angle &latitudeFirstPoint, const common::Angle &longitudeFirstPoint, const common::Angle &latitudeSecondPoint, const common::Angle &longitudeSeconPoint, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Two Point Equidistant] (https://proj.org/operations/projections/tpeqd.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • latitudeFirstPoint – Latitude of first point.

  • +
  • longitudeFirstPoint – Longitude of first point.

  • +
  • latitudeSecondPoint – Latitude of second point.

  • +
  • longitudeSeconPoint – Longitude of second point.

  • +
  • falseEasting – See False Easting

  • +
  • falseNorthing – See False Northing

  • +
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createTunisiaMappingGrid(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the Tunisia Mapping Grid projection method.

+

This method is defined as [EPSG:9816] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9816)

+
+

Note

+

There is currently no implementation of the method formulas in PROJ.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createAlbersEqualArea(const util::PropertyMap &properties, const common::Angle &latitudeFalseOrigin, const common::Angle &longitudeFalseOrigin, const common::Angle &latitudeFirstParallel, const common::Angle &latitudeSecondParallel, const common::Length &eastingFalseOrigin, const common::Length &northingFalseOrigin)
+

Instantiate a conversion based on the [Albers Conic Equal Area] (https://proj.org/operations/projections/aea.html) projection method.

+

This method is defined as [EPSG:9822] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9822)

+
+

Note

+

the order of arguments is conformant with the corresponding EPSG mode and different than OGRSpatialReference::setACEA() of GDAL <= 2.3

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLambertConicConformal_1SP(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Lambert Conic Conformal 1SP] (https://proj.org/operations/projections/lcc.html) projection method.

+

This method is defined as [EPSG:9801] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9801)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLambertConicConformal_2SP(const util::PropertyMap &properties, const common::Angle &latitudeFalseOrigin, const common::Angle &longitudeFalseOrigin, const common::Angle &latitudeFirstParallel, const common::Angle &latitudeSecondParallel, const common::Length &eastingFalseOrigin, const common::Length &northingFalseOrigin)
+

Instantiate a conversion based on the [Lambert Conic Conformal (2SP)] (https://proj.org/operations/projections/lcc.html) projection method.

+

This method is defined as [EPSG:9802] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9802)

+
+

Note

+

the order of arguments is conformant with the corresponding EPSG mode and different than OGRSpatialReference::setLCC() of GDAL <= 2.3

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLambertConicConformal_2SP_Michigan(const util::PropertyMap &properties, const common::Angle &latitudeFalseOrigin, const common::Angle &longitudeFalseOrigin, const common::Angle &latitudeFirstParallel, const common::Angle &latitudeSecondParallel, const common::Length &eastingFalseOrigin, const common::Length &northingFalseOrigin, const common::Scale &ellipsoidScalingFactor)
+

Instantiate a conversion based on the [Lambert Conic Conformal (2SP Michigan)] (https://proj.org/operations/projections/lcc.html) projection method.

+

This method is defined as [EPSG:1051] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1051)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLambertConicConformal_2SP_Belgium(const util::PropertyMap &properties, const common::Angle &latitudeFalseOrigin, const common::Angle &longitudeFalseOrigin, const common::Angle &latitudeFirstParallel, const common::Angle &latitudeSecondParallel, const common::Length &eastingFalseOrigin, const common::Length &northingFalseOrigin)
+

Instantiate a conversion based on the [Lambert Conic Conformal (2SP Belgium)] (https://proj.org/operations/projections/lcc.html) projection method.

+

This method is defined as [EPSG:9803] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9803)

+
+

Note

+

the order of arguments is conformant with the corresponding EPSG mode and different than OGRSpatialReference::setLCCB() of GDAL <= 2.3

+
+
+

Warning

+

The formulas used currently in PROJ are, incorrectly, the ones of the regular LCC_2SP method.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createAzimuthalEquidistant(const util::PropertyMap &properties, const common::Angle &latitudeNatOrigin, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Modified Azimuthal Equidistant] (https://proj.org/operations/projections/aeqd.html) projection method.

+

This method is defined as [EPSG:9832] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9832)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGuamProjection(const util::PropertyMap &properties, const common::Angle &latitudeNatOrigin, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Guam Projection] (https://proj.org/operations/projections/aeqd.html) projection method.

+

This method is defined as [EPSG:9831] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9831)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createBonne(const util::PropertyMap &properties, const common::Angle &latitudeNatOrigin, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Bonne] (https://proj.org/operations/projections/bonne.html) projection method.

+

This method is defined as [EPSG:9827] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9827)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLambertCylindricalEqualAreaSpherical(const util::PropertyMap &properties, const common::Angle &latitudeFirstParallel, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Lambert Cylindrical Equal Area (Spherical)] (https://proj.org/operations/projections/cea.html) projection method.

+

This method is defined as [EPSG:9834] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9834)

+
+

Warning

+

The PROJ cea computation code would select the ellipsoidal form if a non-spherical ellipsoid is used for the base GeographicCRS.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLambertCylindricalEqualArea(const util::PropertyMap &properties, const common::Angle &latitudeFirstParallel, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Lambert Cylindrical Equal Area (ellipsoidal form)] (https://proj.org/operations/projections/cea.html) projection method.

+

This method is defined as [EPSG:9835] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9835)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createCassiniSoldner(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Cassini-Soldner] (https://proj.org/operations/projections/cass.html) projection method.

+

This method is defined as [EPSG:9806] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9806)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEquidistantConic(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Angle &latitudeFirstParallel, const common::Angle &latitudeSecondParallel, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Equidistant Conic] (https://proj.org/operations/projections/eqdc.html) projection method.

+

There is no equivalent in EPSG.

+
+

Note

+

Although not found in EPSG, the order of arguments is conformant with the “spirit” of EPSG and different than OGRSpatialReference::setEC() of GDAL <= 2.3 *

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEckertI(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Eckert I] (https://proj.org/operations/projections/eck1.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEckertII(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Eckert II] (https://proj.org/operations/projections/eck2.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEckertIII(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Eckert III] (https://proj.org/operations/projections/eck3.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEckertIV(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Eckert IV] (https://proj.org/operations/projections/eck4.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEckertV(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Eckert V] (https://proj.org/operations/projections/eck5.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEckertVI(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Eckert VI] (https://proj.org/operations/projections/eck6.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEquidistantCylindrical(const util::PropertyMap &properties, const common::Angle &latitudeFirstParallel, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Equidistant Cylindrical] (https://proj.org/operations/projections/eqc.html) projection method.

+

This is also known as the Equirectangular method, and in the particular case where the latitude of first parallel is 0.

+

This method is defined as [EPSG:1028] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1028)

+
+

Note

+

This is the equivalent OGRSpatialReference::SetEquirectangular2( 0.0, latitudeFirstParallel, falseEasting, falseNorthing ) of GDAL <= 2.3, where the lat_0 / center_latitude parameter is forced to 0.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEquidistantCylindricalSpherical(const util::PropertyMap &properties, const common::Angle &latitudeFirstParallel, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Equidistant Cylindrical (Spherical)] (https://proj.org/operations/projections/eqc.html) projection method.

+

This is also known as the Equirectangular method, and in the particular case where the latitude of first parallel is 0.

+

This method is defined as [EPSG:1029] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1029)

+
+

Note

+

This is the equivalent OGRSpatialReference::SetEquirectangular2( 0.0, latitudeFirstParallel, falseEasting, falseNorthing ) of GDAL <= 2.3, where the lat_0 / center_latitude parameter is forced to 0.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGall(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Gall (Stereographic)] (https://proj.org/operations/projections/gall.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGoodeHomolosine(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Goode Homolosine] (https://proj.org/operations/projections/goode.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createInterruptedGoodeHomolosine(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Interrupted Goode Homolosine] (https://proj.org/operations/projections/igh.html) projection method.

+

There is no equivalent in EPSG.

+
+

Note

+

OGRSpatialReference::SetIGH() of GDAL <= 2.3 assumes the 3 projection parameters to be zero and this is the nominal case.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGeostationarySatelliteSweepX(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &height, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Geostationary Satellite View] (https://proj.org/operations/projections/geos.html) projection method, with the sweep angle axis of the viewing instrument being x.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGeostationarySatelliteSweepY(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &height, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Geostationary Satellite View] (https://proj.org/operations/projections/geos.html) projection method, with the sweep angle axis of the viewing instrument being y.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGnomonic(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Gnomonic] (https://proj.org/operations/projections/gnom.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createHotineObliqueMercatorVariantA(const util::PropertyMap &properties, const common::Angle &latitudeProjectionCentre, const common::Angle &longitudeProjectionCentre, const common::Angle &azimuthInitialLine, const common::Angle &angleFromRectifiedToSkrewGrid, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Hotine Oblique Mercator (Variant A)] (https://proj.org/operations/projections/omerc.html) projection method.

+

This is the variant with the no_uoff parameter, which corresponds to GDAL >=2.3 Hotine_Oblique_Mercator projection. In this variant, the false grid coordinates are defined at the intersection of the initial line and the aposphere (the equator on one of the intermediate surfaces inherent in the method), that is at the natural origin of the coordinate system).

+

This method is defined as [EPSG:9812] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9812)

+
+

Note

+

In the case where azimuthInitialLine = angleFromRectifiedToSkrewGrid = 90deg, this maps to the [Swiss Oblique Mercator] (https://proj.org/operations/projections/somerc.html) formulas.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createHotineObliqueMercatorVariantB(const util::PropertyMap &properties, const common::Angle &latitudeProjectionCentre, const common::Angle &longitudeProjectionCentre, const common::Angle &azimuthInitialLine, const common::Angle &angleFromRectifiedToSkrewGrid, const common::Scale &scale, const common::Length &eastingProjectionCentre, const common::Length &northingProjectionCentre)
+

Instantiate a conversion based on the [Hotine Oblique Mercator (Variant B)] (https://proj.org/operations/projections/omerc.html) projection method.

+

This is the variant without the no_uoff parameter, which corresponds to GDAL >=2.3 Hotine_Oblique_Mercator_Azimuth_Center projection. In this variant, the false grid coordinates are defined at the projection centre.

+

This method is defined as [EPSG:9815] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9815)

+
+

Note

+

In the case where azimuthInitialLine = angleFromRectifiedToSkrewGrid = 90deg, this maps to the [Swiss Oblique Mercator] (https://proj.org/operations/projections/somerc.html) formulas.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createHotineObliqueMercatorTwoPointNaturalOrigin(const util::PropertyMap &properties, const common::Angle &latitudeProjectionCentre, const common::Angle &latitudePoint1, const common::Angle &longitudePoint1, const common::Angle &latitudePoint2, const common::Angle &longitudePoint2, const common::Scale &scale, const common::Length &eastingProjectionCentre, const common::Length &northingProjectionCentre)
+

Instantiate a conversion based on the [Hotine Oblique Mercator Two Point Natural Origin] (https://proj.org/operations/projections/omerc.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLabordeObliqueMercator(const util::PropertyMap &properties, const common::Angle &latitudeProjectionCentre, const common::Angle &longitudeProjectionCentre, const common::Angle &azimuthInitialLine, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Laborde Oblique Mercator] (https://proj.org/operations/projections/labrd.html) projection method.

+

This method is defined as [EPSG:9813] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9813)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createInternationalMapWorldPolyconic(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Angle &latitudeFirstParallel, const common::Angle &latitudeSecondParallel, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [International Map of the World Polyconic] (https://proj.org/operations/projections/imw_p.html) projection method.

+

There is no equivalent in EPSG.

+
+

Note

+

the order of arguments is conformant with the corresponding EPSG mode and different than OGRSpatialReference::SetIWMPolyconic() of GDAL <= 2.3

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createKrovakNorthOriented(const util::PropertyMap &properties, const common::Angle &latitudeProjectionCentre, const common::Angle &longitudeOfOrigin, const common::Angle &colatitudeConeAxis, const common::Angle &latitudePseudoStandardParallel, const common::Scale &scaleFactorPseudoStandardParallel, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Krovak (north oriented)] (https://proj.org/operations/projections/krovak.html) projection method.

+

This method is defined as [EPSG:1041] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1041)

+

The coordinates are returned in the “GIS friendly” order: easting, northing. This method is similar to createKrovak(), except that the later returns projected values as southing, westing, where southing(Krovak) = -northing(Krovak_North) and westing(Krovak) = -easting(Krovak_North).

+
+

Note

+

The current PROJ implementation of Krovak hard-codes colatitudeConeAxis = 30deg17’17.30311” and latitudePseudoStandardParallel = 78deg30’N, which are the values used for the ProjectedCRS S-JTSK (Ferro) / Krovak East North (EPSG:5221). It also hard-codes the parameters of the Bessel ellipsoid typically used for Krovak.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createKrovak(const util::PropertyMap &properties, const common::Angle &latitudeProjectionCentre, const common::Angle &longitudeOfOrigin, const common::Angle &colatitudeConeAxis, const common::Angle &latitudePseudoStandardParallel, const common::Scale &scaleFactorPseudoStandardParallel, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Krovak] (https://proj.org/operations/projections/krovak.html) projection method.

+

This method is defined as [EPSG:9819] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9819)

+

The coordinates are returned in the historical order: southing, westing This method is similar to createKrovakNorthOriented(), except that the later returns projected values as easting, northing, where easting(Krovak_North) = -westing(Krovak) and northing(Krovak_North) = -southing(Krovak).

+
+

Note

+

The current PROJ implementation of Krovak hard-codes colatitudeConeAxis = 30deg17’17.30311” and latitudePseudoStandardParallel = 78deg30’N, which are the values used for the ProjectedCRS S-JTSK (Ferro) / Krovak East North (EPSG:5221). It also hard-codes the parameters of the Bessel ellipsoid typically used for Krovak.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createLambertAzimuthalEqualArea(const util::PropertyMap &properties, const common::Angle &latitudeNatOrigin, const common::Angle &longitudeNatOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Lambert Azimuthal Equal Area] (https://proj.org/operations/projections/laea.html) projection method.

+

This method is defined as [EPSG:9820] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9820)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createMillerCylindrical(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Miller Cylindrical] (https://proj.org/operations/projections/mill.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createMercatorVariantA(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Mercator] (https://proj.org/operations/projections/merc.html) projection method.

+

This is the variant, also known as Mercator (1SP), defined with the scale factor. Note that latitude of natural origin (centerLat) is a parameter, but unused in the transformation formulas.

+

This method is defined as [EPSG:9804] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9804)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createMercatorVariantB(const util::PropertyMap &properties, const common::Angle &latitudeFirstParallel, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Mercator] (https://proj.org/operations/projections/merc.html) projection method.

+

This is the variant, also known as Mercator (2SP), defined with the latitude of the first standard parallel (the second standard parallel is implicitly the opposite value). The latitude of natural origin is fixed to zero.

+

This method is defined as [EPSG:9805] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9805)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createPopularVisualisationPseudoMercator(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Popular Visualisation Pseudo Mercator] (https://proj.org/operations/projections/webmerc.html) projection method.

+

Also known as WebMercator. Mostly/only used for Projected CRS EPSG:3857 (WGS 84 / Pseudo-Mercator)

+

This method is defined as [EPSG:1024] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1024)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createMollweide(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Mollweide] (https://proj.org/operations/projections/moll.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createNewZealandMappingGrid(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [New Zealand Map Grid] (https://proj.org/operations/projections/nzmg.html) projection method.

+

This method is defined as [EPSG:9811] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9811)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createObliqueStereographic(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Oblique Stereographic (Alternative)] (https://proj.org/operations/projections/sterea.html) projection method.

+

This method is defined as [EPSG:9809] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9809)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createOrthographic(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Orthographic] (https://proj.org/operations/projections/ortho.html) projection method.

+

This method is defined as [EPSG:9840] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9840)

+
+

Note

+

Before PROJ 7.2, only the spherical formulation was implemented.

+
+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createAmericanPolyconic(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [American Polyconic] (https://proj.org/operations/projections/poly.html) projection method.

+

This method is defined as [EPSG:9818] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9818)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createPolarStereographicVariantA(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Polar Stereographic (Variant A)] (https://proj.org/operations/projections/stere.html) projection method.

+

This method is defined as [EPSG:9810] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9810)

+

This is the variant of polar stereographic defined with a scale factor.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createPolarStereographicVariantB(const util::PropertyMap &properties, const common::Angle &latitudeStandardParallel, const common::Angle &longitudeOfOrigin, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Polar Stereographic (Variant B)] (https://proj.org/operations/projections/stere.html) projection method.

+

This method is defined as [EPSG:9829] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9829)

+

This is the variant of polar stereographic defined with a latitude of standard parallel.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createRobinson(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Robinson] (https://proj.org/operations/projections/robin.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createSinusoidal(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Sinusoidal] (https://proj.org/operations/projections/sinu.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createStereographic(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Scale &scale, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Stereographic] (https://proj.org/operations/projections/stere.html) projection method.

+

There is no equivalent in EPSG. This method implements the original “Oblique

+

Stereographic” method described in “Snyder’s Map Projections - A Working

+

manual”, which is different from the “Oblique Stereographic (alternative”) method implemented in

+createObliqueStereographic().

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createVanDerGrinten(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Van der Grinten] (https://proj.org/operations/projections/vandg.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createWagnerI(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Wagner I] (https://proj.org/operations/projections/wag1.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createWagnerII(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Wagner II] (https://proj.org/operations/projections/wag2.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createWagnerIII(const util::PropertyMap &properties, const common::Angle &latitudeTrueScale, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Wagner III] (https://proj.org/operations/projections/wag3.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createWagnerIV(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Wagner IV] (https://proj.org/operations/projections/wag4.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createWagnerV(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Wagner V] (https://proj.org/operations/projections/wag5.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createWagnerVI(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Wagner VI] (https://proj.org/operations/projections/wag6.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createWagnerVII(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Wagner VII] (https://proj.org/operations/projections/wag7.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createQuadrilateralizedSphericalCube(const util::PropertyMap &properties, const common::Angle &centerLat, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Quadrilateralized Spherical Cube] (https://proj.org/operations/projections/qsc.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createSphericalCrossTrackHeight(const util::PropertyMap &properties, const common::Angle &pegPointLat, const common::Angle &pegPointLong, const common::Angle &pegPointHeading, const common::Length &pegPointHeight)
+

Instantiate a conversion based on the [Spherical Cross-Track Height] (https://proj.org/operations/projections/sch.html) projection method.

+

There is no equivalent in EPSG.

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • pegPointLat – Peg point latitude.

  • +
  • pegPointLong – Peg point longitude.

  • +
  • pegPointHeading – Peg point heading.

  • +
  • pegPointHeight – Peg point height.

  • +
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createEqualEarth(const util::PropertyMap &properties, const common::Angle &centerLong, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Equal Earth] (https://proj.org/operations/projections/eqearth.html) projection method.

+

This method is defined as [EPSG:1078] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1078)

+
+
Parameters
+
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createVerticalPerspective(const util::PropertyMap &properties, const common::Angle &topoOriginLat, const common::Angle &topoOriginLong, const common::Length &topoOriginHeight, const common::Length &viewPointHeight, const common::Length &falseEasting, const common::Length &falseNorthing)
+

Instantiate a conversion based on the [Vertical Perspective] (https://proj.org/operations/projections/nsper.html) projection method.

+

This method is defined as [EPSG:9838] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9838)

+

The PROJ implementation of the EPSG Vertical Perspective has the current limitations with respect to the method described in EPSG:

    +
  • it is a 2D-only method, ignoring the ellipsoidal height of the point to project.

  • +
  • it has only a spherical development.

  • +
  • the height of the topocentric origin is ignored, and thus assumed to be 0.

  • +
+

+

For completeness, PROJ adds the falseEasting and falseNorthing parameter, which are not described in EPSG. They should usually be set to 0.

+

+
Since

6.3

+
+
+

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • topoOriginLat – Latitude of topocentric origin

  • +
  • topoOriginLong – Longitude of topocentric origin

  • +
  • topoOriginHeight – Ellipsoidal height of topocentric origin. Ignored by PROJ (that is assumed to be 0)

  • +
  • viewPointHeight – Viewpoint height with respect to the topocentric/mapping plane. In the case where topoOriginHeight = 0, this is the height above the ellipsoid surface at topoOriginLat, topoOriginLong.

  • +
  • falseEasting – See False Easting . (not in EPSG)

  • +
  • falseNorthing – See False Northing . (not in EPSG)

  • +
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createPoleRotationGRIBConvention(const util::PropertyMap &properties, const common::Angle &southPoleLatInUnrotatedCRS, const common::Angle &southPoleLongInUnrotatedCRS, const common::Angle &axisRotation)
+

Instantiate a conversion based on the Pole Rotation method, using the conventions of the GRIB 1 and GRIB 2 data formats.

+

Those are mentioned in the Note 2 of https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-1.shtml

+

Several conventions for the pole rotation method exists. The parameters provided in this method are remapped to the PROJ ob_tran operation with:

+

Another implementation of that convention is also in the netcdf-java library: https://github.com/Unidata/netcdf-java/blob/3ce72c0cd167609ed8c69152bb4a004d1daa9273/cdm/core/src/main/java/ucar/unidata/geoloc/projection/RotatedLatLon.java

+

The PROJ implementation of this method assumes a spherical ellipsoid.

+

+
Since

7.0

+
+
+

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • southPoleLatInUnrotatedCRS – Latitude of the point from the unrotated CRS, expressed in the unrotated CRS, that will become the south pole of the rotated CRS.

  • +
  • southPoleLongInUnrotatedCRS – Longitude of the point from the unrotated CRS, expressed in the unrotated CRS, that will become the south pole of the rotated CRS.

  • +
  • axisRotation – The angle of rotation about the new polar axis (measured clockwise when looking from the southern to the northern pole) of the coordinate system, assuming the new axis to have been obtained by first rotating the sphere through southPoleLongInUnrotatedCRS degrees about the geographic polar axis and then rotating through (90 + southPoleLatInUnrotatedCRS) degrees so that the southern pole moved along the (previously rotated) Greenwich meridian.

  • +
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createPoleRotationNetCDFCFConvention(const util::PropertyMap &properties, const common::Angle &gridNorthPoleLatitude, const common::Angle &gridNorthPoleLongitude, const common::Angle &northPoleGridLongitude)
+

Instantiate a conversion based on the Pole Rotation method, using the conventions of the netCDF CF convention for the netCDF format.

+

Those are mentioned in the Note 2 of https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#_rotated_pole

+

Several conventions for the pole rotation method exists. The parameters provided in this method are remapped to the PROJ ob_tran operation with:

+

Another implementation of that convention is also in the netcdf-java library: https://github.com/Unidata/netcdf-java/blob/3ce72c0cd167609ed8c69152bb4a004d1daa9273/cdm/core/src/main/java/ucar/unidata/geoloc/projection/RotatedPole.java

+

The PROJ implementation of this method assumes a spherical ellipsoid.

+

+
Since

8.2

+
+
+

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • gridNorthPoleLatitude – True latitude of the north pole of the rotated grid

  • +
  • gridNorthPoleLongitude – True longitude of the north pole of the rotated grid.

  • +
  • northPoleGridLongitude – Longitude of the true north pole in the rotated grid.

  • +
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createChangeVerticalUnit(const util::PropertyMap &properties, const common::Scale &factor)
+

Instantiate a conversion based on the Change of Vertical Unit method.

+

This method is defined as [EPSG:1069] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1069)

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • factorConversion factor

  • +
+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createChangeVerticalUnit(const util::PropertyMap &properties)
+

Instantiate a conversion based on the Change of Vertical Unit method (without explicit conversion factor)

+

This method is defined as [EPSG:1104] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1104)

+
+
Parameters
+

properties – See General properties of the conversion. If the name is not provided, it is automatically set.

+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createHeightDepthReversal(const util::PropertyMap &properties)
+

Instantiate a conversion based on the Height Depth Reversal method.

+

This method is defined as [EPSG:1068] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1068)

+

+
Since

6.3

+
+
+

+
+
Parameters
+

properties – See General properties of the conversion. If the name is not provided, it is automatically set.

+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createAxisOrderReversal(bool is3D)
+

Instantiate a conversion based on the Axis order reversal method.

+

This swaps the longitude, latitude axis.

+

This method is defined as [EPSG:9843] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9843), or for 3D as [EPSG:9844] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9844)

+
+
Parameters
+

is3D – Whether this should apply on 3D geographicCRS

+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+static ConversionNNPtr createGeographicGeocentric(const util::PropertyMap &properties)
+

Instantiate a conversion based on the Geographic/Geocentric method.

+

This method is defined as [EPSG:9602] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9602),

+
+
Parameters
+

properties – See General properties of the conversion. If the name is not provided, it is automatically set.

+
+
Returns
+

a new Conversion.

+
+
+
+ +
+
+ +
+
+class CoordinateOperation : public osgeo::proj::common::ObjectUsage, public osgeo::proj::io::IPROJStringExportable, public osgeo::proj::io::IJSONExportable
+
+#include <coordinateoperation.hpp>
+

Abstract class for a mathematical operation on coordinates.

+

A mathematical operation:

    +
  • on coordinates that transforms or converts them from one coordinate reference system to another coordinate reference system

  • +
  • or that describes the change of coordinate values within one coordinate reference system due to the motion of the point between one coordinate epoch and another coordinate epoch.

  • +
+ +Many but not all coordinate operations (from CRS A to CRS B) also uniquely define the inverse coordinate operation (from CRS B to CRS A). In some cases, the coordinate operation method algorithm for the inverse coordinate operation is the same as for the forward algorithm, but the signs of some coordinate operation parameter values have to be reversed. In other cases, different algorithms are required for the forward and inverse coordinate operations, but the same coordinate operation parameter values are used. If (some) entirely different parameter values are needed, a different coordinate operation shall be defined.

+

+

Remark

+

Implements CoordinateOperation from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::operation::ConcatenatedOperation, osgeo::proj::operation::SingleOperation

+
+

Public Functions

+
+
+const util::optional<std::string> &operationVersion() const
+

Return the version of the coordinate transformation (i.e. instantiation due to the stochastic nature of the parameters).

+

Mandatory when describing a coordinate transformation or point motion operation, and should not be supplied for a coordinate conversion.

+
+
Returns
+

version or empty.

+
+
+
+ +
+
+const std::vector<metadata::PositionalAccuracyNNPtr> &coordinateOperationAccuracies() const
+

Return estimate(s) of the impact of this coordinate operation on point accuracy.

+

Gives position error estimates for target coordinates of this coordinate operation, assuming no errors in source coordinates.

+
+
Returns
+

estimate(s) or empty vector.

+
+
+
+ +
+
+const crs::CRSPtr sourceCRS() const
+

Return the source CRS of this coordinate operation.

+

This should not be null, expect for of a derivingConversion of a DerivedCRS when the owning DerivedCRS has been destroyed.

+
+
Returns
+

source CRS, or null.

+
+
+
+ +
+
+const crs::CRSPtr targetCRS() const
+

Return the target CRS of this coordinate operation.

+

This should not be null, expect for of a derivingConversion of a DerivedCRS when the owning DerivedCRS has been destroyed.

+
+
Returns
+

target CRS, or null.

+
+
+
+ +
+
+const crs::CRSPtr &interpolationCRS() const
+

Return the interpolation CRS of this coordinate operation.

+
+
Returns
+

interpolation CRS, or null.

+
+
+
+ +
+
+const util::optional<common::DataEpoch> &sourceCoordinateEpoch() const
+

Return the source epoch of coordinates.

+
+
Returns
+

source epoch of coordinates, or empty.

+
+
+
+ +
+
+const util::optional<common::DataEpoch> &targetCoordinateEpoch() const
+

Return the target epoch of coordinates.

+
+
Returns
+

target epoch of coordinates, or empty.

+
+
+
+ +
+
+virtual CoordinateOperationNNPtr inverse() const = 0
+

Return the inverse of the coordinate operation.

+
+
Throws
+

util::UnsupportedOperationException

+
+
+
+ +
+
+virtual std::set<GridDescription> gridsNeeded(const io::DatabaseContextPtr &databaseContext, bool considerKnownGridsAsAvailable) const = 0
+

Return grids needed by an operation.

+
+ +
+
+bool isPROJInstantiable(const io::DatabaseContextPtr &databaseContext, bool considerKnownGridsAsAvailable) const
+

Return whether a coordinate operation can be instantiated as a PROJ pipeline, checking in particular that referenced grids are available.

+
+ +
+
+bool hasBallparkTransformation() const
+

Return whether a coordinate operation has a “ballpark” transformation, that is a very approximate one, due to lack of more accurate transformations.

+

Typically a null geographic offset between two horizontal datum, or a null vertical offset (or limited to unit changes) between two vertical datum. Errors of several tens to one hundred meters might be expected, compared to more accurate transformations.

+
+ +
+
+CoordinateOperationNNPtr normalizeForVisualization() const
+

Return a variation of the current coordinate operation whose axis order is the one expected for visualization purposes.

+
+ +
+
+

Public Static Attributes

+
+
+static const std::string OPERATION_VERSION_KEY
+

Key to set the operation version of a operation::CoordinateOperation.

+

The value is to be provided as a string.

+
+ +
+
+ +
+
+class CoordinateOperationContext
+
+#include <coordinateoperation.hpp>
+

Context in which a coordinate operation is to be used.

+

+

+
+

Public Types

+
+
+enum class SourceTargetCRSExtentUse
+

Specify how source and target CRS extent should be used to restrict candidate operations (only taken into account if no explicit area of interest is specified.

+

Values:

+
+
+enumerator NONE
+

Ignore CRS extent

+
+ +
+
+enumerator BOTH
+

Test coordinate operation extent against both CRS extent.

+
+ +
+
+enumerator INTERSECTION
+

Test coordinate operation extent against the intersection of both CRS extent.

+
+ +
+
+enumerator SMALLEST
+

Test coordinate operation against the smallest of both CRS extent.

+
+ +
+ +
+
+enum class SpatialCriterion
+

Spatial criterion to restrict candidate operations.

+

Values:

+
+
+enumerator STRICT_CONTAINMENT
+

The area of validity of transforms should strictly contain the are of interest.

+
+ +
+
+enumerator PARTIAL_INTERSECTION
+

The area of validity of transforms should at least intersect the area of interest.

+
+ +
+ +
+
+enum class GridAvailabilityUse
+

Describe how grid availability is used.

+

Values:

+
+
+enumerator USE_FOR_SORTING
+

Grid availability is only used for sorting results. Operations where some grids are missing will be sorted last.

+
+ +
+
+enumerator DISCARD_OPERATION_IF_MISSING_GRID
+

Completely discard an operation if a required grid is missing.

+
+ +
+
+enumerator IGNORE_GRID_AVAILABILITY
+

Ignore grid availability at all. Results will be presented as if all grids were available.

+
+ +
+
+enumerator KNOWN_AVAILABLE
+

Results will be presented as if grids known to PROJ (that is registered in the grid_alternatives table of its database) were available. Used typically when networking is enabled.

+
+ +
+ +
+
+enum class IntermediateCRSUse
+

Describe if and how intermediate CRS should be used

+

Values:

+
+
+enumerator ALWAYS
+

Always search for intermediate CRS.

+
+ +
+
+enumerator IF_NO_DIRECT_TRANSFORMATION
+

Only attempt looking for intermediate CRS if there is no direct transformation available.

+
+ +
+
+enumerator NEVER
+
+ +
+ +
+
+

Public Functions

+
+
+const io::AuthorityFactoryPtr &getAuthorityFactory() const
+

Return the authority factory, or null.

+
+ +
+
+const metadata::ExtentPtr &getAreaOfInterest() const
+

Return the desired area of interest, or null.

+
+ +
+
+void setAreaOfInterest(const metadata::ExtentPtr &extent)
+

Set the desired area of interest, or null.

+
+ +
+
+double getDesiredAccuracy() const
+

Return the desired accuracy (in metre), or 0.

+
+ +
+
+void setDesiredAccuracy(double accuracy)
+

Set the desired accuracy (in metre), or 0.

+
+ +
+
+void setAllowBallparkTransformations(bool allow)
+

Set whether ballpark transformations are allowed.

+
+ +
+
+bool getAllowBallparkTransformations() const
+

Return whether ballpark transformations are allowed.

+
+ +
+
+void setSourceAndTargetCRSExtentUse(SourceTargetCRSExtentUse use)
+

Set how source and target CRS extent should be used when considering if a transformation can be used (only takes effect if no area of interest is explicitly defined).

+

The default is CoordinateOperationContext::SourceTargetCRSExtentUse::SMALLEST.

+
+ +
+
+SourceTargetCRSExtentUse getSourceAndTargetCRSExtentUse() const
+

Return how source and target CRS extent should be used when considering if a transformation can be used (only takes effect if no area of interest is explicitly defined).

+

The default is CoordinateOperationContext::SourceTargetCRSExtentUse::SMALLEST.

+
+ +
+
+void setSpatialCriterion(SpatialCriterion criterion)
+

Set the spatial criterion to use when comparing the area of validity of coordinate operations with the area of interest / area of validity of source and target CRS.

+

The default is STRICT_CONTAINMENT.

+
+ +
+
+SpatialCriterion getSpatialCriterion() const
+

Return the spatial criterion to use when comparing the area of validity of coordinate operations with the area of interest / area of validity of source and target CRS.

+

The default is STRICT_CONTAINMENT.

+
+ +
+
+void setUsePROJAlternativeGridNames(bool usePROJNames)
+

Set whether PROJ alternative grid names should be substituted to the official authority names.

+

This only has effect is an authority factory with a non-null database context has been attached to this context.

+

If set to false, it is still possible to obtain later the substitution by using io::PROJStringFormatter::create() with a non-null database context.

+

The default is true.

+
+ +
+
+bool getUsePROJAlternativeGridNames() const
+

Return whether PROJ alternative grid names should be substituted to the official authority names.

+

The default is true.

+
+ +
+
+void setDiscardSuperseded(bool discard)
+

Set whether transformations that are superseded (but not deprecated) should be discarded.

+

The default is true.

+
+ +
+
+bool getDiscardSuperseded() const
+

Return whether transformations that are superseded (but not deprecated) should be discarded.

+

The default is true.

+
+ +
+
+void setGridAvailabilityUse(GridAvailabilityUse use)
+

Set how grid availability is used.

+

The default is USE_FOR_SORTING.

+
+ +
+
+GridAvailabilityUse getGridAvailabilityUse() const
+

Return how grid availability is used.

+

The default is USE_FOR_SORTING.

+
+ +
+
+void setAllowUseIntermediateCRS(IntermediateCRSUse use)
+

Set whether an intermediate pivot CRS can be used for researching coordinate operations between a source and target CRS.

+

Concretely if in the database there is an operation from A to C (or C to A), and another one from C to B (or B to C), but no direct operation between A and B, setting this parameter to ALWAYS/IF_NO_DIRECT_TRANSFORMATION, allow chaining both operations.

+

The current implementation is limited to researching one intermediate step.

+

By default, with the IF_NO_DIRECT_TRANSFORMATION strategy, all potential C candidates will be used if there is no direct transformation.

+
+ +
+
+IntermediateCRSUse getAllowUseIntermediateCRS() const
+

Return whether an intermediate pivot CRS can be used for researching coordinate operations between a source and target CRS.

+

Concretely if in the database there is an operation from A to C (or C to A), and another one from C to B (or B to C), but no direct operation between A and B, setting this parameter to ALWAYS/IF_NO_DIRECT_TRANSFORMATION, allow chaining both operations.

+

The default is IF_NO_DIRECT_TRANSFORMATION.

+
+ +
+
+void setIntermediateCRS(const std::vector<std::pair<std::string, std::string>> &intermediateCRSAuthCodes)
+

Restrict the potential pivot CRSs that can be used when trying to build a coordinate operation between two CRS that have no direct operation.

+
+
Parameters
+

intermediateCRSAuthCodes – a vector of (auth_name, code) that can be used as potential pivot RS

+
+
+
+ +
+
+const std::vector<std::pair<std::string, std::string>> &getIntermediateCRS() const
+

Return the potential pivot CRSs that can be used when trying to build a coordinate operation between two CRS that have no direct operation.

+
+ +
+
+

Public Static Functions

+
+
+static CoordinateOperationContextNNPtr create(const io::AuthorityFactoryPtr &authorityFactory, const metadata::ExtentPtr &extent, double accuracy)
+

Creates a context for a coordinate operation.

+

If a non null authorityFactory is provided, the resulting context should not be used simultaneously by more than one thread.

+

If authorityFactory->getAuthority() is the empty string, then coordinate operations from any authority will be searched, with the restrictions set in the authority_to_authority_preference database table. If authorityFactory->getAuthority() is set to “any”, then coordinate operations from any authority will be searched If authorityFactory->getAuthority() is a non-empty string different of “any”, then coordinate operations will be searched only in that authority namespace.

+
+
Parameters
+
    +
  • authorityFactory – Authority factory, or null if no database lookup is allowed. Use io::authorityFactory::create(context, std::string()) to allow all authorities to be used.

  • +
  • extent – Area of interest, or null if none is known.

  • +
  • accuracy – Maximum allowed accuracy in metre, as specified in or 0 to get best accuracy.

  • +
+
+
Returns
+

a new context.

+
+
+
+ +
+
+ +
+
+class CoordinateOperationFactory
+
+#include <coordinateoperation.hpp>
+

Creates coordinate operations. This factory is capable to find coordinate transformations or conversions between two coordinate reference systems.

+

+

Remark

+

Implements (partially) CoordinateOperationFactory from GeoAPI

+
+

+
+

Public Functions

+
+
+CoordinateOperationPtr createOperation(const crs::CRSNNPtr &sourceCRS, const crs::CRSNNPtr &targetCRS) const
+

Find a CoordinateOperation from sourceCRS to targetCRS.

+

This is a helper of createOperations(), using a coordinate operation context with no authority factory (so no catalog searching is done), no desired accuracy and no area of interest. This returns the first operation of the result set of createOperations(), or null if none found.

+
+
Parameters
+
    +
  • sourceCRS – source CRS.

  • +
  • targetCRS – source CRS.

  • +
+
+
Returns
+

a CoordinateOperation or nullptr.

+
+
+
+ +
+
+std::vector<CoordinateOperationNNPtr> createOperations(const crs::CRSNNPtr &sourceCRS, const crs::CRSNNPtr &targetCRS, const CoordinateOperationContextNNPtr &context) const
+

Find a list of CoordinateOperation from sourceCRS to targetCRS.

+

The operations are sorted with the most relevant ones first: by descending area (intersection of the transformation area with the area of interest, or intersection of the transformation with the area of use of the CRS), and by increasing accuracy. Operations with unknown accuracy are sorted last, whatever their area.

+

When one of the source or target CRS has a vertical component but not the other one, the one that has no vertical component is automatically promoted to a 3D version, where its vertical axis is the ellipsoidal height in metres, using the ellipsoid of the base geodetic CRS.

+
+
Parameters
+
    +
  • sourceCRS – source CRS.

  • +
  • targetCRS – target CRS.

  • +
  • context – Search context.

  • +
+
+
Returns
+

a list

+
+
+
+ +
+
+

Public Static Functions

+
+
+static CoordinateOperationFactoryNNPtr create()
+

Instantiate a CoordinateOperationFactory.

+
+ +
+
+ +
+
+class GeneralOperationParameter : public osgeo::proj::common::IdentifiedObject
+
+#include <coordinateoperation.hpp>
+

Abstract class modelling a parameter value (OperationParameter) or group of parameters.

+

+

Remark

+

Implements GeneralOperationParameter from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::operation::OperationParameter

+
+ +
+
+class GeneralParameterValue : public osgeo::proj::util::BaseObject, public osgeo::proj::io::IWKTExportable, public osgeo::proj::io::IJSONExportable, public osgeo::proj::util::IComparable
+
+#include <coordinateoperation.hpp>
+

Abstract class modelling a parameter value (OperationParameterValue) or group of parameter values.

+

+

Remark

+

Implements GeneralParameterValue from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::operation::OperationParameterValue

+
+ +
+
+struct GridDescription
+
+#include <coordinateoperation.hpp>
+

Grid description.

+
+

Public Members

+
+
+std::string shortName
+

Grid short filename

+
+ +
+
+std::string fullName
+

Grid full path name (if found)

+
+ +
+
+std::string packageName
+

Package name (or empty)

+
+ +
+
+std::string url
+

Grid URL (if packageName is empty), or package URL (or empty)

+
+ +
+
+bool directDownload
+

Whether url can be fetched directly.

+
+ +
+
+bool openLicense
+

Whether the grid is released with an open license.

+
+ +
+
+bool available
+

Whether GRID is available.

+
+ +
+
+ +
+
+class InvalidOperation : public osgeo::proj::util::Exception
+
+#include <coordinateoperation.hpp>
+

Exception that can be thrown when an invalid operation is attempted to be constructed.

+
+ +
+
+class OperationMethod : public osgeo::proj::common::IdentifiedObject, public osgeo::proj::io::IJSONExportable
+
+#include <coordinateoperation.hpp>
+

The method (algorithm or procedure) used to perform the coordinate operation.

+

For a projection method, this contains the name of the projection method and the name of the projection parameters.

+

+

Remark

+

Implements OperationMethod from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const util::optional<std::string> &formula()
+

Return the formula(s) or procedure used by this coordinate operation method.

+

This may be a reference to a publication (in which case use formulaCitation()).

+

Note that the operation method may not be analytic, in which case this attribute references or contains the procedure, not an analytic formula.

+
+
Returns
+

the formula, or empty.

+
+
+
+ +
+
+const util::optional<metadata::Citation> &formulaCitation()
+

Return a reference to a publication giving the formula(s) or procedure used by the coordinate operation method.

+
+
Returns
+

the formula citation, or empty.

+
+
+
+ +
+
+const std::vector<GeneralOperationParameterNNPtr> &parameters()
+

Return the parameters of this operation method.

+
+
Returns
+

the parameters.

+
+
+
+ +
+
+int getEPSGCode()
+

Return the EPSG code, either directly, or through the name.

+
+
Returns
+

code, or 0 if not found

+
+
+
+ +
+
+

Public Static Functions

+
+
+static OperationMethodNNPtr create(const util::PropertyMap &properties, const std::vector<GeneralOperationParameterNNPtr> &parameters)
+

Instantiate a operation method from a vector of GeneralOperationParameter.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • parameters – Vector of GeneralOperationParameterNNPtr.

  • +
+
+
Returns
+

a new OperationMethod.

+
+
+
+ +
+
+static OperationMethodNNPtr create(const util::PropertyMap &properties, const std::vector<OperationParameterNNPtr> &parameters)
+

Instantiate a operation method from a vector of OperationParameter.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • parameters – Vector of OperationParameterNNPtr.

  • +
+
+
Returns
+

a new OperationMethod.

+
+
+
+ +
+
+ +
+
+class OperationParameter : public osgeo::proj::operation::GeneralOperationParameter
+
+#include <coordinateoperation.hpp>
+

The definition of a parameter used by a coordinate operation method.

+

Most parameter values are numeric, but other types of parameter values are possible.

+

+

Remark

+

Implements OperationParameter from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+int getEPSGCode()
+

Return the EPSG code, either directly, or through the name.

+
+
Returns
+

code, or 0 if not found

+
+
+
+ +
+
+

Public Static Functions

+
+
+static OperationParameterNNPtr create(const util::PropertyMap &properties)
+

Instantiate a OperationParameter.

+
+
Parameters
+

properties – See General properties. At minimum the name should be defined.

+
+
Returns
+

a new OperationParameter.

+
+
+
+ +
+
+static const char *getNameForEPSGCode(int epsg_code) noexcept
+

Return the name of a parameter designed by its EPSG code.

+
+
Returns
+

name, or nullptr if not found

+
+
+
+ +
+
+ +
+
+class OperationParameterValue : public osgeo::proj::operation::GeneralParameterValue
+
+#include <coordinateoperation.hpp>
+

A parameter value, ordered sequence of values, or reference to a file of parameter values.

+

This combines a OperationParameter with the corresponding ParameterValue.

+

+

Remark

+

Implements OperationParameterValue from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const OperationParameterNNPtr &parameter()
+

Return the parameter (definition)

+
+
Returns
+

the parameter (definition).

+
+
+
+ +
+
+const ParameterValueNNPtr &parameterValue()
+

Return the parameter value.

+
+
Returns
+

the parameter value.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static OperationParameterValueNNPtr create(const OperationParameterNNPtr &parameterIn, const ParameterValueNNPtr &valueIn)
+

Instantiate a OperationParameterValue.

+
+
Parameters
+
    +
  • parameterIn – Parameter (definition).

  • +
  • valueIn – Parameter value.

  • +
+
+
Returns
+

a new OperationParameterValue.

+
+
+
+ +
+
+ +
+
+class ParameterValue : public osgeo::proj::util::BaseObject, public osgeo::proj::io::IWKTExportable, public osgeo::proj::util::IComparable
+
+#include <coordinateoperation.hpp>
+

The value of the coordinate operation parameter.

+

Most parameter values are numeric, but other types of parameter values are possible.

+

+

Remark

+

Implements ParameterValue from ISO 19111:2019

+
+

+
+

Public Types

+
+
+enum class Type
+

Type of the value.

+

Values:

+
+
+enumerator MEASURE
+

Measure (i.e. value with a unit)

+
+ +
+
+enumerator STRING
+

String

+
+ +
+
+enumerator INTEGER
+

Integer

+
+ +
+
+enumerator BOOLEAN
+

Boolean

+
+ +
+
+enumerator FILENAME
+

Filename

+
+ +
+ +
+
+

Public Functions

+
+
+const Type &type()
+

Returns the type of a parameter value.

+
+
Returns
+

the type.

+
+
+
+ +
+
+const common::Measure &value()
+

Returns the value as a Measure (assumes type() == Type::MEASURE)

+
+
Returns
+

the value as a Measure.

+
+
+
+ +
+
+const std::string &stringValue()
+

Returns the value as a string (assumes type() == Type::STRING)

+
+
Returns
+

the value as a string.

+
+
+
+ +
+
+const std::string &valueFile()
+

Returns the value as a filename (assumes type() == Type::FILENAME)

+
+
Returns
+

the value as a filename.

+
+
+
+ +
+
+int integerValue()
+

Returns the value as a integer (assumes type() == Type::INTEGER)

+
+
Returns
+

the value as a integer.

+
+
+
+ +
+
+bool booleanValue()
+

Returns the value as a boolean (assumes type() == Type::BOOLEAN)

+
+
Returns
+

the value as a boolean.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static ParameterValueNNPtr create(const common::Measure &measureIn)
+

Instantiate a ParameterValue from a Measure (i.e. a value associated with a unit)

+
+
Returns
+

a new ParameterValue.

+
+
+
+ +
+
+static ParameterValueNNPtr create(const char *stringValueIn)
+

Instantiate a ParameterValue from a string value.

+
+
Returns
+

a new ParameterValue.

+
+
+
+ +
+
+static ParameterValueNNPtr create(const std::string &stringValueIn)
+

Instantiate a ParameterValue from a string value.

+
+
Returns
+

a new ParameterValue.

+
+
+
+ +
+
+static ParameterValueNNPtr create(int integerValueIn)
+

Instantiate a ParameterValue from a integer value.

+
+
Returns
+

a new ParameterValue.

+
+
+
+ +
+
+static ParameterValueNNPtr create(bool booleanValueIn)
+

Instantiate a ParameterValue from a boolean value.

+
+
Returns
+

a new ParameterValue.

+
+
+
+ +
+
+static ParameterValueNNPtr createFilename(const std::string &stringValueIn)
+

Instantiate a ParameterValue from a filename.

+
+
Returns
+

a new ParameterValue.

+
+
+
+ +
+
+ +
+
+class PointMotionOperation : public osgeo::proj::operation::SingleOperation
+
+#include <coordinateoperation.hpp>
+

A mathematical operation that describes the change of coordinate values within one coordinate reference system due to the motion of the point between one coordinate epoch and another coordinate epoch.

+

The motion is due to tectonic plate movement or deformation.

+

+

Remark

+

Implements PointMotionOperation from ISO 19111:2019

+
+

+
+ +
+
+class SingleOperation : public virtual osgeo::proj::operation::CoordinateOperation
+
+#include <coordinateoperation.hpp>
+

A single (not concatenated) coordinate operation (CoordinateOperation)

+

+

Remark

+

Implements SingleOperation from ISO 19111:2019

+
+

+

Subclassed by osgeo::proj::operation::Conversion, osgeo::proj::operation::PointMotionOperation, osgeo::proj::operation::Transformation

+
+

Public Functions

+
+
+const std::vector<GeneralParameterValueNNPtr> &parameterValues()
+

Return the parameter values.

+
+
Returns
+

the parameter values.

+
+
+
+ +
+
+const OperationMethodNNPtr &method()
+

Return the operation method associated to the operation.

+
+
Returns
+

the operation method.

+
+
+
+ +
+
+const ParameterValuePtr &parameterValue(const std::string &paramName, int epsg_code = 0) const noexcept
+

Return the parameter value corresponding to a parameter name or EPSG code.

+
+
Parameters
+
    +
  • paramName – the parameter name (or empty, in which case epsg_code should be non zero)

  • +
  • epsg_code – the parameter EPSG code (possibly zero)

  • +
+
+
Returns
+

the value, or nullptr if not found.

+
+
+
+ +
+
+const ParameterValuePtr &parameterValue(int epsg_code) const noexcept
+

Return the parameter value corresponding to a EPSG code.

+
+
Parameters
+

epsg_code – the parameter EPSG code

+
+
Returns
+

the value, or nullptr if not found.

+
+
+
+ +
+
+const common::Measure &parameterValueMeasure(const std::string &paramName, int epsg_code = 0) const noexcept
+

Return the parameter value, as a measure, corresponding to a parameter name or EPSG code.

+
+
Parameters
+
    +
  • paramName – the parameter name (or empty, in which case epsg_code should be non zero)

  • +
  • epsg_code – the parameter EPSG code (possibly zero)

  • +
+
+
Returns
+

the measure, or the empty Measure() object if not found.

+
+
+
+ +
+
+const common::Measure &parameterValueMeasure(int epsg_code) const noexcept
+

Return the parameter value, as a measure, corresponding to a EPSG code.

+
+
Parameters
+

epsg_code – the parameter EPSG code

+
+
Returns
+

the measure, or the empty Measure() object if not found.

+
+
+
+ +
+
+virtual std::set<GridDescription> gridsNeeded(const io::DatabaseContextPtr &databaseContext, bool considerKnownGridsAsAvailable) const override
+

Return grids needed by an operation.

+
+ +
+
+std::list<std::string> validateParameters() const
+

Validate the parameters used by a coordinate operation.

+

Return whether the method is known or not, or a list of missing or extra parameters for the operations recognized by this implementation.

+
+ +
+
+

Public Static Functions

+
+
+static SingleOperationNNPtr createPROJBased(const util::PropertyMap &properties, const std::string &PROJString, const crs::CRSPtr &sourceCRS, const crs::CRSPtr &targetCRS, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies = std::vector<metadata::PositionalAccuracyNNPtr>())
+

Instantiate a PROJ-based single operation.

+
+

Note

+

The operation might internally be a pipeline chaining several operations. The use of the SingleOperation modeling here is mostly to be able to get the PROJ string as a parameter.

+
+
+
Parameters
+
    +
  • properties – Properties

  • +
  • PROJString – the PROJ string.

  • +
  • sourceCRS – source CRS (might be null).

  • +
  • targetCRS – target CRS (might be null).

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

the new instance

+
+
+
+ +
+
+ +
+
+class Transformation : public osgeo::proj::operation::SingleOperation
+
+#include <coordinateoperation.hpp>
+

A mathematical operation on coordinates in which parameters are empirically derived from data containing the coordinates of a series of points in both coordinate reference systems.

+

This computational process is usually “over-determined”, allowing derivation of error (or accuracy) estimates for the coordinate transformation. Also, the stochastic nature of the parameters may result in multiple (different) versions of the same coordinate transformations between the same source and target CRSs. Any single coordinate operation in which the input and output coordinates are referenced to different datums (reference frames) will be a coordinate transformation.

+

+

Remark

+

Implements Transformation from ISO 19111:2019

+
+

+
+

Public Functions

+
+
+const crs::CRSNNPtr &sourceCRS()
+

Return the source crs::CRS of the transformation.

+
+
Returns
+

the source CRS.

+
+
+
+ +
+
+const crs::CRSNNPtr &targetCRS()
+

Return the target crs::CRS of the transformation.

+
+
Returns
+

the target CRS.

+
+
+
+ +
+
+virtual CoordinateOperationNNPtr inverse() const override
+

Return the inverse of the coordinate operation.

+
+
Throws
+

util::UnsupportedOperationException

+
+
+
+ +
+
+TransformationNNPtr substitutePROJAlternativeGridNames(io::DatabaseContextNNPtr databaseContext) const
+

Return an equivalent transformation to the current one, but using PROJ alternative grid names.

+
+ +
+
+

Public Static Functions

+
+
+static TransformationNNPtr create(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const crs::CRSPtr &interpolationCRSIn, const OperationMethodNNPtr &methodIn, const std::vector<GeneralParameterValueNNPtr> &values, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation from a vector of GeneralParameterValue.

+
+
Parameters
+
    +
  • properties – See General properties. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • interpolationCRSIn – Interpolation CRS (might be null)

  • +
  • methodIn – Operation method.

  • +
  • values – Vector of GeneralOperationParameterNNPtr.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr create(const util::PropertyMap &propertiesTransformation, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const crs::CRSPtr &interpolationCRSIn, const util::PropertyMap &propertiesOperationMethod, const std::vector<OperationParameterNNPtr> &parameters, const std::vector<ParameterValueNNPtr> &values, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation and its OperationMethod.

+
+
Parameters
+
    +
  • propertiesTransformation – The General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • interpolationCRSIn – Interpolation CRS (might be null)

  • +
  • propertiesOperationMethod – The General properties of the OperationMethod. At minimum the name should be defined.

  • +
  • parameters – Vector of parameters of the operation method.

  • +
  • values – Vector of ParameterValueNNPtr. Constraint: values.size() == parameters.size()

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createGeocentricTranslations(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, double translationXMetre, double translationYMetre, double translationZMetre, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with Geocentric Translations method.

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • translationXMetre – Value of the Translation_X parameter (in metre).

  • +
  • translationYMetre – Value of the Translation_Y parameter (in metre).

  • +
  • translationZMetre – Value of the Translation_Z parameter (in metre).

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createPositionVector(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, double translationXMetre, double translationYMetre, double translationZMetre, double rotationXArcSecond, double rotationYArcSecond, double rotationZArcSecond, double scaleDifferencePPM, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with Position vector transformation method.

+

This is similar to createCoordinateFrameRotation(), except that the sign of the rotation terms is inverted.

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • translationXMetre – Value of the Translation_X parameter (in metre).

  • +
  • translationYMetre – Value of the Translation_Y parameter (in metre).

  • +
  • translationZMetre – Value of the Translation_Z parameter (in metre).

  • +
  • rotationXArcSecond – Value of the Rotation_X parameter (in arc-second).

  • +
  • rotationYArcSecond – Value of the Rotation_Y parameter (in arc-second).

  • +
  • rotationZArcSecond – Value of the Rotation_Z parameter (in arc-second).

  • +
  • scaleDifferencePPM – Value of the Scale_Difference parameter (in parts-per-million).

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createCoordinateFrameRotation(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, double translationXMetre, double translationYMetre, double translationZMetre, double rotationXArcSecond, double rotationYArcSecond, double rotationZArcSecond, double scaleDifferencePPM, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with Coordinate Frame Rotation method.

+

This is similar to createPositionVector(), except that the sign of the rotation terms is inverted.

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • translationXMetre – Value of the Translation_X parameter (in metre).

  • +
  • translationYMetre – Value of the Translation_Y parameter (in metre).

  • +
  • translationZMetre – Value of the Translation_Z parameter (in metre).

  • +
  • rotationXArcSecond – Value of the Rotation_X parameter (in arc-second).

  • +
  • rotationYArcSecond – Value of the Rotation_Y parameter (in arc-second).

  • +
  • rotationZArcSecond – Value of the Rotation_Z parameter (in arc-second).

  • +
  • scaleDifferencePPM – Value of the Scale_Difference parameter (in parts-per-million).

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createTimeDependentPositionVector(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, double translationXMetre, double translationYMetre, double translationZMetre, double rotationXArcSecond, double rotationYArcSecond, double rotationZArcSecond, double scaleDifferencePPM, double rateTranslationX, double rateTranslationY, double rateTranslationZ, double rateRotationX, double rateRotationY, double rateRotationZ, double rateScaleDifference, double referenceEpochYear, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with Time Dependent position vector transformation method.

+

This is similar to createTimeDependentCoordinateFrameRotation(), except that the sign of the rotation terms is inverted.

+

This method is defined as [EPSG:1053] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1053)

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • translationXMetre – Value of the Translation_X parameter (in metre).

  • +
  • translationYMetre – Value of the Translation_Y parameter (in metre).

  • +
  • translationZMetre – Value of the Translation_Z parameter (in metre).

  • +
  • rotationXArcSecond – Value of the Rotation_X parameter (in arc-second).

  • +
  • rotationYArcSecond – Value of the Rotation_Y parameter (in arc-second).

  • +
  • rotationZArcSecond – Value of the Rotation_Z parameter (in arc-second).

  • +
  • scaleDifferencePPM – Value of the Scale_Difference parameter (in parts-per-million).

  • +
  • rateTranslationX – Value of the rate of change of X-axis translation (in metre/year)

  • +
  • rateTranslationY – Value of the rate of change of Y-axis translation (in metre/year)

  • +
  • rateTranslationZ – Value of the rate of change of Z-axis translation (in metre/year)

  • +
  • rateRotationX – Value of the rate of change of X-axis rotation (in arc-second/year)

  • +
  • rateRotationY – Value of the rate of change of Y-axis rotation (in arc-second/year)

  • +
  • rateRotationZ – Value of the rate of change of Z-axis rotation (in arc-second/year)

  • +
  • rateScaleDifference – Value of the rate of change of scale difference (in PPM/year)

  • +
  • referenceEpochYear – Parameter reference epoch (in decimal year)

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createTimeDependentCoordinateFrameRotation(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, double translationXMetre, double translationYMetre, double translationZMetre, double rotationXArcSecond, double rotationYArcSecond, double rotationZArcSecond, double scaleDifferencePPM, double rateTranslationX, double rateTranslationY, double rateTranslationZ, double rateRotationX, double rateRotationY, double rateRotationZ, double rateScaleDifference, double referenceEpochYear, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with Time Dependent Position coordinate frame rotation transformation method.

+

This is similar to createTimeDependentPositionVector(), except that the sign of the rotation terms is inverted.

+

This method is defined as [EPSG:1056] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1056)

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • translationXMetre – Value of the Translation_X parameter (in metre).

  • +
  • translationYMetre – Value of the Translation_Y parameter (in metre).

  • +
  • translationZMetre – Value of the Translation_Z parameter (in metre).

  • +
  • rotationXArcSecond – Value of the Rotation_X parameter (in arc-second).

  • +
  • rotationYArcSecond – Value of the Rotation_Y parameter (in arc-second).

  • +
  • rotationZArcSecond – Value of the Rotation_Z parameter (in arc-second).

  • +
  • scaleDifferencePPM – Value of the Scale_Difference parameter (in parts-per-million).

  • +
  • rateTranslationX – Value of the rate of change of X-axis translation (in metre/year)

  • +
  • rateTranslationY – Value of the rate of change of Y-axis translation (in metre/year)

  • +
  • rateTranslationZ – Value of the rate of change of Z-axis translation (in metre/year)

  • +
  • rateRotationX – Value of the rate of change of X-axis rotation (in arc-second/year)

  • +
  • rateRotationY – Value of the rate of change of Y-axis rotation (in arc-second/year)

  • +
  • rateRotationZ – Value of the rate of change of Z-axis rotation (in arc-second/year)

  • +
  • rateScaleDifference – Value of the rate of change of scale difference (in PPM/year)

  • +
  • referenceEpochYear – Parameter reference epoch (in decimal year)

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createTOWGS84(const crs::CRSNNPtr &sourceCRSIn, const std::vector<double> &TOWGS84Parameters)
+

Instantiate a transformation from TOWGS84 parameters.

+

This is a helper of createPositionVector() with the source CRS being the GeographicCRS of sourceCRSIn, and the target CRS being EPSG:4326

+
+
Parameters
+
    +
  • sourceCRSIn – Source CRS.

  • +
  • TOWGS84Parameters – The vector of 3 double values (Translation_X,_Y,_Z) or 7 double values (Translation_X,_Y,_Z, Rotation_X,_Y,_Z, Scale_Difference) passed to createPositionVector()

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createNTv2(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const std::string &filename, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with NTv2 method.

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • filename – NTv2 filename.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createMolodensky(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, double translationXMetre, double translationYMetre, double translationZMetre, double semiMajorAxisDifferenceMetre, double flattingDifference, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with Molodensky method.

+

+This method is defined as [EPSG:9604] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9604)

+

See also

+

createAbridgedMolodensky() for a related method.

+
+

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • translationXMetre – Value of the Translation_X parameter (in metre).

  • +
  • translationYMetre – Value of the Translation_Y parameter (in metre).

  • +
  • translationZMetre – Value of the Translation_Z parameter (in metre).

  • +
  • semiMajorAxisDifferenceMetre – The difference between the semi-major axis values of the ellipsoids used in the target and source CRS (in metre).

  • +
  • flattingDifference – The difference between the flattening values of the ellipsoids used in the target and source CRS.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createAbridgedMolodensky(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, double translationXMetre, double translationYMetre, double translationZMetre, double semiMajorAxisDifferenceMetre, double flattingDifference, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with Abridged Molodensky method.

+

+This method is defined as [EPSG:9605] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9605)

+

See also

+

createdMolodensky() for a related method.

+
+

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • translationXMetre – Value of the Translation_X parameter (in metre).

  • +
  • translationYMetre – Value of the Translation_Y parameter (in metre).

  • +
  • translationZMetre – Value of the Translation_Z parameter (in metre).

  • +
  • semiMajorAxisDifferenceMetre – The difference between the semi-major axis values of the ellipsoids used in the target and source CRS (in metre).

  • +
  • flattingDifference – The difference between the flattening values of the ellipsoids used in the target and source CRS.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Throws
+

InvalidOperation

+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createGravityRelatedHeightToGeographic3D(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const crs::CRSPtr &interpolationCRSIn, const std::string &filename, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation from GravityRelatedHeight to Geographic3D.

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • interpolationCRSIn – Interpolation CRS. (might be null)

  • +
  • filename – GRID filename.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createVERTCON(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const std::string &filename, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with method VERTCON.

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • filename – GRID filename.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createLongitudeRotation(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const common::Angle &offset)
+

Instantiate a transformation with method Longitude rotation.

+

This method is defined as [EPSG:9601] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9601)

    +
  • +
+

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • offset – Longitude offset to add.

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createGeographic2DOffsets(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const common::Angle &offsetLat, const common::Angle &offsetLon, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with method Geographic 2D offsets.

+

This method is defined as [EPSG:9619] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9619)

    +
  • +
+

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • offsetLat – Latitude offset to add.

  • +
  • offsetLon – Longitude offset to add.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createGeographic3DOffsets(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const common::Angle &offsetLat, const common::Angle &offsetLon, const common::Length &offsetHeight, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with method Geographic 3D offsets.

+

This method is defined as [EPSG:9660] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9660)

    +
  • +
+

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • offsetLat – Latitude offset to add.

  • +
  • offsetLon – Longitude offset to add.

  • +
  • offsetHeight – Height offset to add.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createGeographic2DWithHeightOffsets(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const common::Angle &offsetLat, const common::Angle &offsetLon, const common::Length &offsetHeight, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with method Geographic 2D with height offsets.

+

This method is defined as [EPSG:9618] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9618)

    +
  • +
+

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • offsetLat – Latitude offset to add.

  • +
  • offsetLon – Longitude offset to add.

  • +
  • offsetHeight – Geoid undulation to add.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createVerticalOffset(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const common::Length &offsetHeight, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation with method Vertical Offset.

+

This method is defined as [EPSG:9616] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::9616)

    +
  • +
+

+
+
Parameters
+
    +
  • properties – See General properties of the Transformation. At minimum the name should be defined.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • offsetHeight – Geoid undulation to add.

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

new Transformation.

+
+
+
+ +
+
+static TransformationNNPtr createChangeVerticalUnit(const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const common::Scale &factor, const std::vector<metadata::PositionalAccuracyNNPtr> &accuracies)
+

Instantiate a transformation based on the Change of Vertical Unit method.

+

This method is defined as [EPSG:1069] (https://www.epsg-registry.org/export.htm?gml=urn:ogc:def:method:EPSG::1069)

+
+
Parameters
+
    +
  • properties – See General properties of the conversion. If the name is not provided, it is automatically set.

  • +
  • sourceCRSIn – Source CRS.

  • +
  • targetCRSIn – Target CRS.

  • +
  • factorConversion factor

  • +
  • accuracies – Vector of positional accuracy (might be empty).

  • +
+
+
Returns
+

a new Transformation.

+
+
+
+ +
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/development/reference/cpp/util.html b/development/reference/cpp/util.html new file mode 100644 index 00000000..36f51bd9 --- /dev/null +++ b/development/reference/cpp/util.html @@ -0,0 +1,688 @@ + + + + + + + util namespace — PROJ 9.0.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

util namespace

+
+
+namespace osgeo::proj::util
+

A set of base types from ISO 19103, GeoAPI and other PROJ specific classes.

+

osgeo.proj.util namespace.

+
+

Typedefs

+
+
+using BaseObjectPtr = std::shared_ptr<BaseObject>
+

Shared pointer of BaseObject.

+
+ +
+
+using BoxedValuePtr = std::shared_ptr<BoxedValue>
+

Shared pointer of BoxedValue.

+
+ +
+
+using BoxedValueNNPtr = util::nn<BoxedValuePtr>
+

Non-null shared pointer of BoxedValue.

+
+ +
+
+using ArrayOfBaseObjectPtr = std::shared_ptr<ArrayOfBaseObject>
+

Shared pointer of ArrayOfBaseObject.

+
+ +
+
+using ArrayOfBaseObjectNNPtr = util::nn<ArrayOfBaseObjectPtr>
+

Non-null shared pointer of ArrayOfBaseObject.

+
+ +
+
+using LocalNamePtr = std::shared_ptr<LocalName>
+

Shared pointer of LocalName.

+
+ +
+
+using LocalNameNNPtr = util::nn<LocalNamePtr>
+

Non-null shared pointer of LocalName.

+
+ +
+
+using NameSpacePtr = std::shared_ptr<NameSpace>
+

Shared pointer of NameSpace.

+
+ +
+
+using NameSpaceNNPtr = util::nn<NameSpacePtr>
+

Non-null shared pointer of NameSpace.

+
+ +
+
+using GenericNamePtr = std::shared_ptr<GenericName>
+

Shared pointer of GenericName.

+
+ +
+
+using GenericNameNNPtr = util::nn<GenericNamePtr>
+

Non-null shared pointer of GenericName.

+
+ +
+
+
+class ArrayOfBaseObject : public osgeo::proj::util::BaseObject
+
+#include <util.hpp>
+

Array of BaseObject.

+
+

Public Functions

+
+
+void add(const BaseObjectNNPtr &obj)
+

Adds an object to the array.

+
+
Parameters
+

obj – the object to add.

+
+
+
+ +
+
+

Public Static Functions

+
+
+static ArrayOfBaseObjectNNPtr create()
+

Instantiate a ArrayOfBaseObject.

+
+
Returns
+

a new ArrayOfBaseObject.

+
+
+
+ +
+
+ +
+
+class BaseObject
+
+#include <util.hpp>
+

Class that can be derived from, to emulate Java’s Object behavior.

+

Subclassed by osgeo::proj::common::IdentifiedObject, osgeo::proj::common::Measure, osgeo::proj::common::ObjectDomain, osgeo::proj::common::UnitOfMeasure, osgeo::proj::metadata::Citation, osgeo::proj::metadata::Extent, osgeo::proj::metadata::GeographicExtent, osgeo::proj::metadata::Identifier, osgeo::proj::metadata::PositionalAccuracy, osgeo::proj::metadata::TemporalExtent, osgeo::proj::metadata::VerticalExtent, osgeo::proj::operation::GeneralParameterValue, osgeo::proj::operation::ParameterValue, osgeo::proj::util::ArrayOfBaseObject, osgeo::proj::util::BoxedValue, osgeo::proj::util::GenericName

+
+ +
+
+struct BaseObjectNNPtr : public util::nn<BaseObjectPtr>
+
+#include <util.hpp>
+

Non-null shared pointer of BaseObject.

+
+ +
+
+class BoxedValue : public osgeo::proj::util::BaseObject
+
+#include <util.hpp>
+

Encapsulate standard datatypes in an object.

+
+

Public Functions

+
+
+BoxedValue(const char *stringValueIn)
+

Constructs a BoxedValue from a string.

+
+ +
+
+BoxedValue(const std::string &stringValueIn)
+

Constructs a BoxedValue from a string.

+
+ +
+
+BoxedValue(int integerValueIn)
+

Constructs a BoxedValue from an integer.

+
+ +
+
+BoxedValue(bool booleanValueIn)
+

Constructs a BoxedValue from a boolean.

+
+ +
+
+ +
+
+class CodeList
+
+#include <util.hpp>
+

Abstract class to define an enumeration of values.

+

Subclassed by osgeo::proj::cs::AxisDirection, osgeo::proj::datum::RealizationMethod

+
+

Public Functions

+
+
+inline const std::string &toString()
+

Return the CodeList item as a string.

+
+ +
+
+inline operator std::string()
+

Return the CodeList item as a string.

+
+ +
+
+ +
+
+class Exception : public std::exception
+
+#include <util.hpp>
+

Root exception class.

+

Subclassed by osgeo::proj::crs::InvalidCompoundCRSException, osgeo::proj::io::FactoryException, osgeo::proj::io::FormattingException, osgeo::proj::io::ParsingException, osgeo::proj::operation::InvalidOperation, osgeo::proj::util::InvalidValueTypeException, osgeo::proj::util::UnsupportedOperationException

+
+

Public Functions

+
+
+virtual const char *what() const noexcept override
+

Return the exception text.

+
+ +
+
+ +
+
+class GenericName : public osgeo::proj::util::BaseObject
+
+#include <util.hpp>
+

A sequence of identifiers rooted within the context of a namespace.

+

+

+

Subclassed by osgeo::proj::util::LocalName

+
+

Public Functions

+
+
+virtual const NameSpacePtr scope() const = 0
+

Return the scope of the object, possibly a global one.

+
+ +
+
+virtual std::string toString() const = 0
+

Return the LocalName as a string.

+
+ +
+
+virtual GenericNameNNPtr toFullyQualifiedName() const = 0
+

Return a fully qualified name corresponding to the local name.

+

The namespace of the resulting name is a global one.

+
+ +
+
+ +
+
+class IComparable
+
+#include <util.hpp>
+

Interface for an object that can be compared to another.

+

Subclassed by osgeo::proj::common::IdentifiedObject, osgeo::proj::common::ObjectDomain, osgeo::proj::metadata::Extent, osgeo::proj::metadata::GeographicExtent, osgeo::proj::metadata::TemporalExtent, osgeo::proj::metadata::VerticalExtent, osgeo::proj::operation::GeneralParameterValue, osgeo::proj::operation::ParameterValue

+
+

Public Types

+
+
+enum class Criterion
+

Comparison criterion.

+

Values:

+
+
+enumerator STRICT
+

All properties are identical.

+
+ +
+
+enumerator EQUIVALENT
+

The objects are equivalent for the purpose of coordinate operations. They can differ by the name of their objects, identifiers, other metadata. Parameters may be expressed in different units, provided that the value is (with some tolerance) the same once expressed in a common unit.

+
+ +
+
+enumerator EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS
+

Same as EQUIVALENT, relaxed with an exception that the axis order of the base CRS of a DerivedCRS/ProjectedCRS or the axis order of a GeographicCRS is ignored. Only to be used with DerivedCRS/ProjectedCRS/GeographicCRS

+
+ +
+ +
+
+

Public Functions

+
+
+bool isEquivalentTo(const IComparable *other, Criterion criterion = Criterion::STRICT, const io::DatabaseContextPtr &dbContext = nullptr) const
+

Returns whether an object is equivalent to another one.

+
+
Parameters
+
    +
  • other – other object to compare to

  • +
  • criterion – comparison criterion.

  • +
  • dbContext – Database context, or nullptr.

  • +
+
+
Returns
+

true if objects are equivalent.

+
+
+
+ +
+
+ +
+
+class InvalidValueTypeException : public osgeo::proj::util::Exception
+
+#include <util.hpp>
+

Exception thrown when an invalid value type is set as the value of a key of a PropertyMap.

+
+ +
+
+class LocalName : public osgeo::proj::util::GenericName
+
+#include <util.hpp>
+

Identifier within a NameSpace for a local object.

+

Local names are names which are directly accessible to and maintained by a NameSpace within which they are local, indicated by the scope.

+

+

+
+

Public Functions

+
+
+virtual const NameSpacePtr scope() const override
+

Return the scope of the object, possibly a global one.

+
+ +
+
+virtual std::string toString() const override
+

Return the LocalName as a string.

+
+ +
+
+virtual GenericNameNNPtr toFullyQualifiedName() const override
+

Return a fully qualified name corresponding to the local name.

+

The namespace of the resulting name is a global one.

+
+ +
+
+ +
+
+class NameFactory
+
+#include <util.hpp>
+

Factory for generic names.

+

+

+
+

Public Static Functions

+
+
+static NameSpaceNNPtr createNameSpace(const GenericNameNNPtr &name, const PropertyMap &properties)
+

Instantiate a NameSpace.

+
+
Parameters
+
    +
  • name – name of the namespace.

  • +
  • properties – Properties. Allowed keys are “separator” and “separator.head”.

  • +
+
+
Returns
+

a new NameFactory.

+
+
+
+ +
+
+static LocalNameNNPtr createLocalName(const NameSpacePtr &scope, const std::string &name)
+

Instantiate a LocalName.

+
+
Parameters
+
    +
  • scope – scope.

  • +
  • name – string of the local name.

  • +
+
+
Returns
+

a new LocalName.

+
+
+
+ +
+
+static GenericNameNNPtr createGenericName(const NameSpacePtr &scope, const std::vector<std::string> &parsedNames)
+

Instantiate a GenericName.

+
+
Parameters
+
    +
  • scope – scope.

  • +
  • parsedNames – the components of the name.

  • +
+
+
Returns
+

a new GenericName.

+
+
+
+ +
+
+ +
+
+class NameSpace
+
+#include <util.hpp>
+

A domain in which names given by strings are defined.

+

+

+
+

Public Functions

+
+
+bool isGlobal() const
+

Returns whether this is a global namespace.

+
+ +
+
+const GenericNamePtr &name() const
+

Returns the name of this namespace.

+
+ +
+
+ +
+
+template<class T>
class optional
+
+#include <util.hpp>
+

Loose transposition of [std::optional] (https://en.cppreference.com/w/cpp/utility/optional) available from C++17.

+
+

Public Functions

+
+
+inline const T *operator->() const
+

Returns a pointer to the contained value.

+
+ +
+
+inline const T &operator*() const
+

Returns a reference to the contained value.

+
+ +
+
+inline explicit operator bool() const noexcept
+

Return whether the optional has a value

+
+ +
+
+inline bool has_value() const noexcept
+

Return whether the optional has a value

+
+ +
+
+ +
+
+class PropertyMap
+
+#include <util.hpp>
+

Wrapper of a std::map<std::string, BaseObjectNNPtr>

+
+

Public Functions

+
+
+PropertyMap &set(const std::string &key, const BaseObjectNNPtr &val)
+

Set a BaseObjectNNPtr as the value of a key.

+
+ +
+
+PropertyMap &set(const std::string &key, const char *val)
+

Set a string as the value of a key.

+
+ +
+
+PropertyMap &set(const std::string &key, const std::string &val)
+

Set a string as the value of a key.

+
+ +
+
+PropertyMap &set(const std::string &key, int val)
+

Set a integer as the value of a key.

+
+ +
+
+PropertyMap &set(const std::string &key, bool val)
+

Set a boolean as the value of a key.

+
+ +
+
+PropertyMap &set(const std::string &key, const std::vector<std::string> &array)
+

Set a vector of strings as the value of a key.

+
+ +
+
+ +
+
+class UnsupportedOperationException : public osgeo::proj::util::Exception
+
+#include <util.hpp>
+

Exception Thrown to indicate that the requested operation is not supported.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file -- cgit v1.2.3