PROJ C++ API
Public Member Functions | Static Public Member Functions | List of all members
osgeo::proj::crs::BoundCRS Class Referencefinal

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

#include <crs.hpp>

Inheritance diagram for osgeo::proj::crs::BoundCRS:
Inheritance graph
[legend]
Collaboration diagram for osgeo::proj::crs::BoundCRS:
Collaboration graph
[legend]

Public Member Functions

const CRSNNPtrbaseCRS () PROJ_CONST_DECL
 Return the base CRS. More...
 
CRSNNPtr baseCRSWithCanonicalBoundCRS () const
 Return a shallow clone of the base CRS that points to a shallow clone of this BoundCRS. More...
 
const CRSNNPtrhubCRS () PROJ_CONST_DECL
 Return the target / hub CRS. More...
 
const operation::TransformationNNPtrtransformation () PROJ_CONST_DECL
 Return the transformation to the hub RS. More...
 
bool isEquivalentTo (const util::IComparable *other, util::IComparable::Criterion criterion=util::IComparable::Criterion::STRICT) const override
 Returns whether an object is equivalent to another one. More...
 
CRSNNPtr shallowClone () const override
 Return a shallow clone of this object.
 
- Public Member Functions inherited from osgeo::proj::crs::CRS
GeodeticCRSPtr extractGeodeticCRS () const
 Return the GeodeticCRS of the CRS. More...
 
GeographicCRSPtr extractGeographicCRS () const
 Return the GeographicCRS of the CRS. More...
 
VerticalCRSPtr extractVerticalCRS () const
 Return the VerticalCRS of the CRS. More...
 
CRSNNPtr createBoundCRSToWGS84IfPossible (io::DatabaseContextPtr dbContext) const
 Returns potentially a BoundCRS, with a transformation to EPSG:4326, wrapping this CRS. More...
 
CRSNNPtr stripVerticalComponent () const
 Returns a CRS whose coordinate system does not contain a vertical component. More...
 
const BoundCRSPtrcanonicalBoundCRS () PROJ_CONST_DECL
 Return the BoundCRS potentially attached to this CRS. More...
 
- Public Member Functions inherited from osgeo::proj::common::ObjectUsage
const std::vector< ObjectDomainNNPtr > & domains () PROJ_CONST_DECL
 Return the domains of the object.
 
- Public Member Functions inherited from osgeo::proj::common::IdentifiedObject
const metadata::IdentifierNNPtrname () PROJ_CONST_DECL
 Return the name of the object. More...
 
const std::string & nameStr () PROJ_CONST_DECL
 Return the name of the object. More...
 
const std::vector< metadata::IdentifierNNPtr > & identifiers () PROJ_CONST_DECL
 Return the identifier(s) of the object. More...
 
const std::vector< util::GenericNameNNPtr > & aliases () PROJ_CONST_DECL
 Return the alias(es) of the object.
 
const std::string & remarks () PROJ_CONST_DECL
 Return the remarks.
 
bool isDeprecated () PROJ_CONST_DECL
 Return whether the object is deprecated. More...
 
std::string alias () PROJ_CONST_DECL
 Return the (first) alias of the object as a string. More...
 
int getEPSGCode () PROJ_CONST_DECL
 Return the EPSG code. More...
 
bool isEPSG (int code) PROJ_CONST_DECL
 Return whether the object has a identifiers() in the EPSG code space.
 
- Public Member Functions inherited from osgeo::proj::io::IWKTExportable
std::string exportToWKT (WKTFormatter *formatter) const
 
- Public Member Functions inherited from osgeo::proj::io::IPROJStringExportable
std::string exportToPROJString (PROJStringFormatter *formatter) const
 Builds a PROJ string representation. More...
 

Static Public Member Functions

static BoundCRSNNPtr create (const CRSNNPtr &baseCRSIn, const CRSNNPtr &hubCRSIn, const operation::TransformationNNPtr &transformationIn)
 Instanciate a BoundCRS from a base CRS, a hub CRS and a transformation. More...
 
static BoundCRSNNPtr createFromTOWGS84 (const CRSNNPtr &baseCRSIn, const std::vector< double > &TOWGS84Parameters)
 Instanciate a BoundCRS from a base CRS and TOWGS84 parameters. More...
 
static BoundCRSNNPtr createFromNadgrids (const CRSNNPtr &baseCRSIn, const std::string &filename)
 Instanciate a BoundCRS from a base CRS and nadgrids parameters. More...
 
- Static Public Member Functions inherited from osgeo::proj::common::IdentifiedObject
static IdentifiedObjectNNPtr create (const util::PropertyMap &properties)
 Instanciate a new IdentifiedObject. More...
 

Additional Inherited Members

- Public Types inherited from osgeo::proj::util::IComparable
enum  Criterion { Criterion::STRICT, Criterion::EQUIVALENT }
 Comparison criterion. More...
 
- Static Public Attributes inherited from osgeo::proj::common::ObjectUsage
static const std::string SCOPE_KEY
 Key to set the scope of a common::ObjectUsage. More...
 
static const std::string DOMAIN_OF_VALIDITY_KEY
 Key to set the domain of validity of a common::ObjectUsage. More...
 
static const std::string OBJECT_DOMAIN_KEY
 Key to set the object domain(s) of a common::ObjectUsage. More...
 
- Static Public Attributes inherited from osgeo::proj::common::IdentifiedObject
static const std::string NAME_KEY
 Key to set the name of a common::IdentifiedObject. More...
 
static const std::string IDENTIFIERS_KEY
 Key to set the identifier(s) of a common::IdentifiedObject. More...
 
static const std::string ALIAS_KEY
 Key to set the alias(es) of a common::IdentifiedObject. More...
 
static const std::string REMARKS_KEY
 Key to set the remarks of a common::IdentifiedObject. More...
 
static const std::string DEPRECATED_KEY
 Key to set the deprecation flag of a common::IdentifiedObject. More...
 

Detailed Description

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.

Note
Contrary to other CRS classes of this package, there is no ISO 19111:2018 modelling of a BoundCRS.
Remarks
Implements BoundCRS from WKT2 standard

Member Function Documentation

const CRSNNPtr & osgeo::proj::crs::BoundCRS::baseCRS ( )

Return the base CRS.

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

Returns
the base CRS.
CRSNNPtr osgeo::proj::crs::BoundCRS::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.
BoundCRSNNPtr osgeo::proj::crs::BoundCRS::create ( const CRSNNPtr baseCRSIn,
const CRSNNPtr hubCRSIn,
const operation::TransformationNNPtr transformationIn 
)
static

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

Parameters
baseCRSInbase CRS.
hubCRSInhub CRS.
transformationIntransformation from base CRS to hub CRS.
Returns
new BoundCRS.
BoundCRSNNPtr osgeo::proj::crs::BoundCRS::createFromNadgrids ( const CRSNNPtr baseCRSIn,
const std::string &  filename 
)
static

Instanciate a BoundCRS from a base CRS and nadgrids parameters.

Parameters
baseCRSInbase CRS.
filenameHorizontal grid filename
Returns
new BoundCRS.
BoundCRSNNPtr osgeo::proj::crs::BoundCRS::createFromTOWGS84 ( const CRSNNPtr baseCRSIn,
const std::vector< double > &  TOWGS84Parameters 
)
static

Instanciate a BoundCRS from a base CRS and TOWGS84 parameters.

Parameters
baseCRSInbase CRS.
TOWGS84Parametersa vector of 3 or 7 double values representing WKT1 TOWGS84 parameter.
Returns
new BoundCRS.
const CRSNNPtr & osgeo::proj::crs::BoundCRS::hubCRS ( )

Return the target / hub CRS.

Returns
the hub CRS.
bool osgeo::proj::crs::BoundCRS::isEquivalentTo ( const util::IComparable other,
util::IComparable::Criterion  criterion = util::IComparable::Criterion::STRICT 
) const
overridevirtual

Returns whether an object is equivalent to another one.

Parameters
otherother object to compare to
criterioncomparaison criterion.
Returns
true if objects are equivalent.

Reimplemented from osgeo::proj::common::ObjectUsage.

const operation::TransformationNNPtr & osgeo::proj::crs::BoundCRS::transformation ( )

Return the transformation to the hub RS.

Returns
transformation.

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