LengthUnit Class
Defines a length unit.
NuGet/Assembly: Carmenta.Engine.5.16.2.nupkg (in the CECore assembly)
Syntax
public class LengthUnit : ResourceObject
Remarks
A LengthUnit object can be used when defining a map Projection or a ScaleBar, or in some other contexts. Most modern map projections use the meter. When a projection is said to use the foot, you should be careful, since it might be the international Foot defined in 1959, or the UsSurveyFoot, or some other kind of foot. (In fact, there is also a non-standard meter, the German legal meter that is used in Namibia.)
The EPSG database, https://epsg.org, contains many definitions of length units. Only the most common of these are available as predefined instances of LengthUnit, but the others can be created via the general constructor.
There is one kind of projection, the equidistant cylindrical, whose projected coordinates are sometimes expressed in a linear unit, and sometimes in an angular unit. To support both variants, there is one class EquidistantCylindricalProjection that takes a LengthUnit, and another class EquidistantCylindricalAngularProjection that takes an AngleUnit.
Inheritance Hierarchy
System.Object (not available in C#)
EngineObject
ResourceObject
LengthUnit
Platforms
Windows, Linux, Android
LengthUnit Members
The LengthUnit type has the following members.
Constructors
Name | Description |
---|---|
LengthUnit | Creates a new LengthUnit. |
Properties
Name | Description |
---|---|
Abbreviation | Gets the abbreviation for the length unit. |
Gets the LengthUnit that represents a centimeter. | |
Gets the LengthUnit that represents an international foot. | |
Gets the LengthUnit that represents an international inch. | |
InMeters | Gets the length unit expressed in meters. |
IsDisposed | Gets a value that tells whether the current LengthUnit has been disposed. Inherited from EngineObject |
Gets the LengthUnit that represents a kilometer. | |
Gets the LengthUnit that represents a meter. | |
Gets the LengthUnit that represents an international mile. | |
Gets the LengthUnit that represents a millimeter. | |
Name | Gets or sets the name of the LengthUnit. Inherited from ResourceObject |
NativeHandle | Gets the native Carmenta Engine kernel object the current LengthUnit represents. Inherited from EngineObject |
Gets the LengthUnit that represents a nautical mile. | |
IUserProperties.UserProperties | Gets the AttributeSet that contains the user properties. Inherited from IUserProperties |
Gets the LengthUnit that represents a US survey foot. | |
Gets the LengthUnit that represents an international yard. |
Methods
Name | Description |
---|---|
Clone | Creates a copy of an object. Inherited from EngineObject |
Dispose | Releases the reference to the native Carmenta Engine kernel instance the EngineObject represents. Inherited from EngineObject |
Equals | Determines whether this instance is equal to another. Inherited from EngineObject |
FromMeter | Converts a distance in meters to this LengthUnit. |
ToMeter | Converts a distance in this LengthUnit to meters. |