|
PROJ C++ API
|
Unit of measure. More...
#include <common.hpp>


Public Types | |
| enum | Type { Type::UNKNOWN, Type::NONE, Type::ANGULAR, Type::LINEAR, Type::SCALE, Type::TIME, Type::PARAMETRIC } |
| Type of unit of measure. More... | |
Public Member 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 () PROJ_PURE_DECL |
| Return the name of the unit of measure. | |
| double | conversionToSI () PROJ_PURE_DECL |
| Return the conversion factor to the unit of the International System of Units of the same Type. More... | |
| Type | type () PROJ_PURE_DECL |
| Return the type of the unit of measure. | |
| const std::string & | codeSpace () PROJ_PURE_DECL |
| Return the code space of the unit of measure. More... | |
| const std::string & | code () PROJ_PURE_DECL |
| Return the code of the unit of measure. More... | |
| bool | operator== (const UnitOfMeasure &other) PROJ_PURE_DECL |
| bool | operator!= (const UnitOfMeasure &other) PROJ_PURE_DECL |
Static Public 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 |
| Part-sper-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 | 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. | |
Unit of measure.
This is a mutable object.
|
strong |
Type of unit of measure.
| Enumerator | |
|---|---|
| UNKNOWN |
Unknown unit of measure |
| NONE |
No unit of measure |
| ANGULAR |
Angular unit of measure |
| LINEAR |
Linear unit of measure |
| SCALE |
Scale unit of measure |
| TIME |
Time unit of measure |
| PARAMETRIC |
Parametric unit of measure |
| const std::string & osgeo::proj::common::UnitOfMeasure::code | ( | ) |
Return the code of the unit of measure.
| const std::string & osgeo::proj::common::UnitOfMeasure::codeSpace | ( | ) |
Return the code space of the unit of measure.
For example "EPSG"
| double osgeo::proj::common::UnitOfMeasure::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)
| bool osgeo::proj::common::UnitOfMeasure::operator!= | ( | const UnitOfMeasure & | other | ) |
Returns whether two units of measures are different.
The comparison is based on the name.
| bool osgeo::proj::common::UnitOfMeasure::operator== | ( | const UnitOfMeasure & | other | ) |
Returns whether two units of measures are equal.
The comparison is based on the name.
1.8.11