Represents a unit of measure for a value type (scale, length or angle).
sealed class
|
UnitOfMeasure
|
extends
|
GeoObject
|
See also:
GeoRegistryThe configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<UnitOfMeasure>
|
||
value
|
|
The configurator object. |
The configurator object for this type.
public
static
readonly
field
|
ConfigType
|
||
type
|
IConfigurator<UnitOfMeasureType>
|
Serialization information about this type.
public
static
readonly
field
|
SerialId
|
||
type
|
ISerialTypeInfo
|
Returns the configuration value that describes this object.
public
override
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
overrides
|
GeoObject.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
Angle value: 0.0002908882086657213
public
static
readonly
field
|
ArcMinute
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.AngleAngle value: 0.000004848136811095355
public
static
readonly
field
|
ArcSecond
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.AngleAngle value: 0.0174532925199433
public
static
readonly
field
|
Degree
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.AngleLength value: 0.3048
public
static
readonly
field
|
Foot
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.LengthAngle value: 0.01570796326794895
public
static
readonly
field
|
Grad
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.AngleLength value: 1000.0
public
static
readonly
field
|
Kilometre
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.LengthLength value: 1.0
public
static
readonly
field
|
Metre
|
||
type
|
UnitOfMeasure
|
Remarks:
This is the default unit.
See also:
UnitOfMeasureType.LengthScale value: 1E-9
public
static
readonly
field
|
PartsPerBillion
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.ScaleScale value: 1E-6
public
static
readonly
field
|
PartsPerMillion
|
||
type
|
UnitOfMeasure
|
See also:
UnitOfMeasureType.ScaleAngle in radians: 2 * PI
public
static
readonly
field
|
Radian
|
||
type
|
UnitOfMeasure
|
Remarks:
This is the default unit.
See also:
UnitOfMeasureType.AngleScale value: 1.0
public
static
readonly
field
|
Unity
|
||
type
|
UnitOfMeasure
|
Remarks:
This is the default unit.
See also:
UnitOfMeasureType.Scale
public
property
|
IsDefault
{
get
}
|
||
type
|
bool
|
||
value
|
The human-readable name of this object.
public
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
|
The object name. | |
inherited
|
GeoObject.Name
|
The
value
of
1
in
this
unit,
expressed
in
the
unit
type's
default
unit.
public
property
|
One
{
get
}
|
||
type
|
float64
|
||
value
|
The default value. |
Returns the serial type of this object.
public
property
|
SerialType
{
get
}
|
||
type
|
ISerialTypeInfo
|
||
value
|
|
The serial type. | |
inherited
|
SerializableBase.SerialType
|
Returns the serial data version.
public
virtual
property
|
SerialVersion
{
get
}
|
||
type
|
int32
|
||
value
|
|
The serial data version tag. | |
inherited
|
SerializableBase.SerialVersion
|
Remarks:
An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.
See also:
ISerializable.SerializeThe type of this geo object.
public
property
|
Type
{
get
}
|
||
type
|
GeoObjectType
|
||
value
|
The geo object type. | ||
inherited
|
GeoObject.Type
|
The type of this unit (e.g. length or angle).
public
property
|
UnitType
{
get
}
|
||
type
|
UnitOfMeasureType
|
||
value
|
The unit type. |
Creates a new instance of UnitOfMeasure.
public
constructor
|
UnitOfMeasure
(float64 one,
UnitOfMeasureType type,
string name = null)
|
||
params
|
one
|
The
value
of
1
in
this
unit,
expressed
in
the
unit
type
type's
standard
unit.
|
|
type
|
The type of this unit (e.g. length or angle). | ||
name
|
Human-readable
name
of
the
geo
object.
If
empty
or
null,
UserDefined
will
be
used
instead.
Defaults
to
null .
|
Returns the default unit for the given type.
[Pure]
|
||||
public
static
method
|
Default
(UnitOfMeasureType type)
|
|||
type
|
UnitOfMeasure
|
|||
params
|
type
|
The unit type. | ||
returns
|
|
The default unit. |
Initializes the state of this object from the given data stream.
public
override
method
|
Deserialize
(int32 serialVersion,
ISerializer data)
|
||
type
|
ISerializable
|
||
params
|
serialVersion
|
[>=1]
|
The serial data version. |
data
|
[not-null]
|
The serial data stream. | |
returns
|
|
The
deserialized
object.
This
will
typically
be
this ,
but
in
some
circumstances,
another
instance
may
be
returned
(e.g.
singletons).
|
|
overrides
|
GeoObject.Deserialize
|
Remarks:
The Deserialize method will be called immediately after the object has been instantiated via its default constructor.
The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).
See also:
ISerializable.SerializeCompares this object with the given one.
[Pure]
|
||||
public
override
method
|
Equals
(IGeoObject other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
overrides
|
GeoObject.Equals
|
Compares this object with the given one.
[Pure]
|
||||
public
override
sealed
method
|
Equals
(object other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
inherited
|
GeoObject.Equals
|
Converts the given value to this unit.
[Pure]
|
||||
public
method
|
From
(float64 value,
UnitOfMeasure unit = null)
|
|||
type
|
float64
|
|||
params
|
value
|
The value, given in unit s. | ||
unit
|
The
value
unit.
If
null
the
default
unit
will
be
used.
Defaults
to
null .
|
|||
returns
|
The converted value, in this unit. |
[Pure]
|
||||
public
override
sealed
method
|
GetHashCode
()
|
|||
type
|
int32
|
|||
inherited
|
GeoObject.GetHashCode
|
Serializes the current state of this object to the given data stream.
public
override
method
|
Serialize
(ISerializer data)
|
||
params
|
data
|
[not-null]
|
The serial data stream. |
overrides
|
GeoObject.Serialize
|
See also:
ISerializable.DeserializeConverts a value to the given unit.
[Pure]
|
||||
public
method
|
To
(float64 value,
UnitOfMeasure unit = null)
|
|||
type
|
float64
|
|||
params
|
value
|
The value, given in this unit. | ||
unit
|
The
unit
to
convert
to.
If
null
the
default
unit
will
be
used.
Defaults
to
null .
|
|||
returns
|
The converted value, in given unit s. |
[Pure]
|
||||
public
override
sealed
method
|
ToString
()
|
|||
type
|
string
|
|||
inherited
|
GeoObject.ToString
|