UnitOfMeasure

Description

[ShutdownSurvive]
sealed class Tinman.Terrain.Georef.UnitOfMeasure

Derived from

GeoObject abstract

Represents a unit of measure for a value type (scale, length or angle).

See also

GeoRegistry

Public / Constants

Arc​Minute


public static readonly attribute ArcMinute → (UnitOfMeasure)

Angle value: 0.0002908882086657216 radians per unit

Arc​Second


public static readonly attribute ArcSecond → (UnitOfMeasure)

Angle value: 4.84813681109536E-6 radians per unit

Degree


public static readonly attribute Degree → (UnitOfMeasure)

Angle value: 0.017453292519943295 radians per unit

Foot


public static readonly attribute Foot → (UnitOfMeasure)

Length value: 0.3048 metres per unit

Grad


public static readonly attribute Grad → (UnitOfMeasure)

Angle value: 0.015707963267948967 radians per unit

Kilometre


public static readonly attribute Kilometre → (UnitOfMeasure)

Length value: 1000.0 metres per unit

Metre


public static readonly attribute Metre → (UnitOfMeasure)

Length value: 1.0 metres per unit

This is the default unit.

Parts​Per​Billion


public static readonly attribute PartsPerBillion → (UnitOfMeasure)

Scale value: 1E-9

Parts​Per​Million


public static readonly attribute PartsPerMillion → (UnitOfMeasure)

Scale value: 1E-6

Radian


public static readonly attribute Radian → (UnitOfMeasure)

Angle value: 1.0 radians per unit

This is the default unit.

Unity


public static readonly attribute Unity → (UnitOfMeasure)

Scale value: 1.0

This is the default unit.

Public / Constructors

Unit​Of​Measure


public constructor UnitOfMeasure → (3)

one in : float64

The value of 1 in this unit, expressed in the unit type type in's standard unit.

type in : UnitOfMeasureType

The type of this unit (e.g. length or angle).

name opt : string = null

Human-readable name of the geo object. If empty or null, GeoObject.UserDefined will be used instead.

Creates a new instance of UnitOfMeasure.

Public / Methods

Default


[Pure]
public static method Default → (1)

type in : UnitOfMeasureType

The unit type.

returns → UnitOfMeasure

The default unit.

Returns the default unit for the given type.

From


[Pure]
public method From → (2)

value in : float64

The value, given in unit opts.

unit opt : UnitOfMeasure = null

The value unit. If null the default unit will be used.

returns → float64

The converted value, in this unit.

Converts the given value to this unit.

To


[Pure]
public method To → (2)

value in : float64

The value, given in this unit.

unit opt : UnitOfMeasure = null

The unit to convert to. If null the default unit will be used.

returns → float64

The converted value, in given unit opts.

Converts a value to the given unit.

Public / Attributes

Is​Default


public attribute IsDefault → (get)

value : bool

true if this unit of measure is the default one,
false if not.

Is this unit of measure the default one for its type?

One


public attribute One → (get)

value : float64

The default value.

The value of 1 in this unit, expressed in the unit type’s default unit.

Unit​Type


public attribute UnitType → (get)

value : UnitOfMeasureType

The unit type.

The type of this unit (e.g. length or angle).

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<UnitOfMeasure>

[not-null]
The configurator object.

The configurator object for this type.

Config​Type


public static attribute ConfigType → (get)

value : IConfigurator<UnitOfMeasureType>

[not-null]
The configurator object.

The configurator object for this type.

Serialization

Serial​Id


public static readonly attribute SerialId → (ISerialTypeInfo)

Serialization information about this type.