LuciadCPillar 2023.1.04
|
Class to format points as MGRS or UTM/UPS coordinates. More...
#include <luciad/grids/mgrs/MgrsFormat.h>
Classes | |
class | Builder |
Builder for creating luciad::MgrsFormat . More... | |
Public Member Functions | |
MgrsFormat (const MgrsFormat &other) | |
MgrsFormat (MgrsFormat &&other) noexcept | |
~MgrsFormat () | |
Builder | asBuilder () const |
Creates a new builder initialized with all the properties of this style. More... | |
luciad::expected< std::string, ErrorInfo > | format (const Point &lonLatPoint) const |
Formats the given point or the given (lon,lat) pair as an MGRS or UTM/UPS coordinate string. More... | |
std::string | getCoordinateSeparator () const |
Gets the string to separate the zone/grid letters and the coordinates. More... | |
MgrsFormatType | getFormatType () const |
Gets the luciad::MgrsFormatType used to format an MGRS or UTM/UPS string. More... | |
MgrsFormatPrecision | getPrecision () const |
Gets the luciad::MgrsFormatPrecision used to format an MGRS or UTM/UPS string. More... | |
std::string | getZoneSeparator () const |
Gets the string to separate the zone/grid letters and the coordinates. More... | |
MgrsFormat & | operator= (const MgrsFormat &other) noexcept |
MgrsFormat & | operator= (MgrsFormat &&other) noexcept |
luciad::expected< Point, ErrorInfo > | parse (const std::string &coordinateString) const |
Parses the given MGRS or UTM/UPS coordinate string into a point with WGS84 lon lat coordinates. More... | |
Static Public Member Functions | |
static Builder | newBuilder () |
Creates a new builder with the default values. More... | |
Class to format points as MGRS or UTM/UPS coordinates.
This class offers methods to format coordinates into either UTM MGRS, UPS MGRS, UTM or UPS notation. The UTM MGRS and UTM notations are used for coordinates within the UTM latitude bounds. For points in the polar regions, outside the UTM latitude bounds, the UPS MGRS and UPS notations are used.
Construction of this class is done through the Builder
design pattern mechanism.
Example usage:
luciad::MgrsFormat::MgrsFormat | ( | const MgrsFormat & | other | ) |
|
noexcept |
luciad::MgrsFormat::~MgrsFormat | ( | ) |
Builder luciad::MgrsFormat::asBuilder | ( | ) | const |
Creates a new builder initialized with all the properties of this style.
luciad::expected< std::string, ErrorInfo > luciad::MgrsFormat::format | ( | const Point & | lonLatPoint | ) | const |
Formats the given point or the given (lon,lat) pair as an MGRS or UTM/UPS coordinate string.
lonLatPoint | the point to be formatted. The reference of the point must be WGS84. |
std::string luciad::MgrsFormat::getCoordinateSeparator | ( | ) | const |
Gets the string to separate the zone/grid letters and the coordinates.
MgrsFormatType luciad::MgrsFormat::getFormatType | ( | ) | const |
Gets the luciad::MgrsFormatType
used to format an MGRS or UTM/UPS string.
MgrsFormatPrecision luciad::MgrsFormat::getPrecision | ( | ) | const |
Gets the luciad::MgrsFormatPrecision
used to format an MGRS or UTM/UPS string.
std::string luciad::MgrsFormat::getZoneSeparator | ( | ) | const |
Gets the string to separate the zone/grid letters and the coordinates.
|
static |
Creates a new builder with the default values.
|
noexcept |
|
noexcept |
luciad::expected< Point, ErrorInfo > luciad::MgrsFormat::parse | ( | const std::string & | coordinateString | ) | const |
Parses the given MGRS or UTM/UPS coordinate string into a point with WGS84 lon lat coordinates.
coordinateString | a MGRS coordinate string |