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

Numeric value associated with a UnitOfMeasure. More...

#include <common.hpp>

Inheritance diagram for osgeo::proj::common::Measure:
Inheritance graph
[legend]
Collaboration diagram for osgeo::proj::common::Measure:
Collaboration graph
[legend]

Public Member Functions

 Measure (double valueIn=0.0, const UnitOfMeasure &unitIn=UnitOfMeasure())
 Instanciate a Measure.
 
const UnitOfMeasureunit () PROJ_CONST_DECL
 Return the unit of the Measure.
 
double getSIValue () PROJ_CONST_DECL
 Return the value of the Measure, after conversion to the corresponding unit of the International System.
 
double value () PROJ_CONST_DECL
 Return the value of the measure, expressed in the unit()
 
double convertToUnit (const UnitOfMeasure &otherUnit) PROJ_CONST_DECL
 Return the value of this measure expressed into the provided unit.
 
bool operator== (const Measure &other) PROJ_CONST_DECL
 Return whether two measures are equal. More...
 
bool isEquivalentTo (const Measure &other, util::IComparable::Criterion criterion=util::IComparable::Criterion::STRICT) const
 Returns whether an object is equivalent to another one. More...
 

Detailed Description

Numeric value associated with a UnitOfMeasure.

Member Function Documentation

bool osgeo::proj::common::Measure::isEquivalentTo ( const Measure other,
util::IComparable::Criterion  criterion = util::IComparable::Criterion::STRICT 
) const

Returns whether an object is equivalent to another one.

Parameters
otherother object to compare to
criterioncomparaison criterion.
Returns
true if objects are equivalent.
bool osgeo::proj::common::Measure::operator== ( const Measure other)

Return whether two measures are equal.

The comparison is done both on the value and the unit.


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