diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-13 15:32:24 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-13 15:32:24 +0100 |
| commit | 6cac8e03056db41a8314756c16507ef39bd78e0a (patch) | |
| tree | 289ef385e8679bec6bd3ffa95926bdf28fab08d4 /src/coordinatesystem.cpp | |
| parent | 990d88b09839876598c954230ca66fb2604f7545 (diff) | |
| download | PROJ-6cac8e03056db41a8314756c16507ef39bd78e0a.tar.gz PROJ-6cac8e03056db41a8314756c16507ef39bd78e0a.zip | |
Add helpers to create polar cartesian CS
Diffstat (limited to 'src/coordinatesystem.cpp')
| -rw-r--r-- | src/coordinatesystem.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/coordinatesystem.cpp b/src/coordinatesystem.cpp index 2305e6c4..b274f583 100644 --- a/src/coordinatesystem.cpp +++ b/src/coordinatesystem.cpp @@ -947,6 +947,54 @@ CartesianCS::createNorthingEasting(const common::UnitOfMeasure &unit) { // --------------------------------------------------------------------------- +/** \brief Instanciate a CartesianCS, north-pole centered, + * with a Easting (first) South-Oriented and + * Northing (second) South-Oriented axis. + * + * @param unit Linear unit of the axes. + * @return a new CartesianCS. + */ +CartesianCSNNPtr CartesianCS::createNorthPoleEastingSouthNorthingSouth( + const common::UnitOfMeasure &unit) { + return create(util::PropertyMap(), + CoordinateSystemAxis::create( + util::PropertyMap().set(IdentifiedObject::NAME_KEY, + AxisName::Easting), + AxisAbbreviation::E, AxisDirection::SOUTH, unit, + Meridian::create(common::Angle(90))), + CoordinateSystemAxis::create( + util::PropertyMap().set(IdentifiedObject::NAME_KEY, + AxisName::Northing), + AxisAbbreviation::N, AxisDirection::SOUTH, unit, + Meridian::create(common::Angle(180)))); +} + +// --------------------------------------------------------------------------- + +/** \brief Instanciate a CartesianCS, south-pole centered, + * with a Easting (first) North-Oriented and + * Northing (second) North-Oriented axis. + * + * @param unit Linear unit of the axes. + * @return a new CartesianCS. + */ +CartesianCSNNPtr CartesianCS::createSouthPoleEastingNorthNorthingNorth( + const common::UnitOfMeasure &unit) { + return create(util::PropertyMap(), + CoordinateSystemAxis::create( + util::PropertyMap().set(IdentifiedObject::NAME_KEY, + AxisName::Easting), + AxisAbbreviation::E, AxisDirection::NORTH, unit, + Meridian::create(common::Angle(90))), + CoordinateSystemAxis::create( + util::PropertyMap().set(IdentifiedObject::NAME_KEY, + AxisName::Northing), + AxisAbbreviation::N, AxisDirection::NORTH, unit, + Meridian::create(common::Angle(0)))); +} + +// --------------------------------------------------------------------------- + /** \brief Instanciate a CartesianCS with the three geocentric axes. * * @param unit Liinear unit of the axes. |
