PROJ C++ API
Public Member Functions | List of all members
osgeo::proj::io::IPROJStringExportable Class Reference

Interface for an object that can be exported to a PROJ string. More...

#include <io.hpp>

Inheritance diagram for osgeo::proj::io::IPROJStringExportable:
Inheritance graph
[legend]

Public Member Functions

std::string exportToPROJString (PROJStringFormatter *formatter) const
 Builds a PROJ string representation. More...
 

Detailed Description

Interface for an object that can be exported to a PROJ string.

Member Function Documentation

std::string osgeo::proj::io::IPROJStringExportable::exportToPROJString ( PROJStringFormatter formatter) const

Builds a PROJ string representation.

  • For PROJStringFormatter::Convention::PROJ_5 (the default), return strings that generally express PROJ.5 pipelines.

    • For a crs::GeographicCRS, returns a string expressing the transformation from geographic coordinates expressed in radian with longitude, latitude order, and with respect to the international reference meridian, into geographic coordinates expressed in the units and axis order of the CRS, taking into account its prime meridian.
    • For a geocentric crs::GeodeticCRS, returns a string expressing the transformation from geographic coordinates expressed in radian with longitude, latitude order, and with respect to the international reference meridian, into geocentric coordinates.
    • For a crs::ProjectedCRS / crs::DerivedGeographicCRS / crs::DerivedProjectedCRS, returns a string expressing the transformation from the base CRS to the CRS
    • For a crs::BoundCRS, throws a FormattingException.
    • For operation::CoordinateTransformations, returns a PROJ pipeline.

  • For PROJStringFormatter::Convention::PROJ_4, format a string compatible with the OGRSpatialReference::exportToProj4() of GDAL <=2.3.

    • 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
formatterPROJ string formatter.
Returns
a PROJ string.
Exceptions
FormattingException

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