This document is archived and information here might be outdated.  Recommended version.


IDistanceConverter.GetValue Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > ID > IDistanceConverter Interface > IDistanceConverter.GetValue Method
ArcGIS Developer Help

IDistanceConverter.GetValue Method

Converts the string value to a double.

[Visual Basic .NET]
Public Function GetValue ( _
    ByVal val As String, _
    ByVal pUnits As ISpatialReference _
) As Double
[C#]
public double GetValue (
    string val,
    ISpatialReference pUnits
);

Product Availability

Available with ArcGIS Desktop.

Remarks

GetValue returns a Double value that is a converted distance from the input string. The input string is formatted that combines a distance value and a suffix abbreviation of the distance units. A spatial reference is used to determine the output distance units.

The following list of suffixes can be used:

Metric Units:

Distance Units Abbrev. Meters per Unit Description
Kilometer km 1000 1000 meters exactly
Meter m 1 International meter.
Millimeter mm 0.001 1/1000 meters exactly

Imperial or international units:

Distance Units Abbrev. Meters per Unit Description
Foot ft 0.3048 Standard foot in the US. Also known as international foot or imperial foot that was used in most non-US countries before the metric system.
Mile mi 1609.344 Also referred to a statute mile, equal to 5280 international feet.
Nautical mile nm 1852 The nautical mile is a unit of distance used primarily in sea and in aviation.
Chain ch 20.1168 66 international feet.
Yard yd 0.9144 Three international feet.
Rod rd 5.0292 1/4 chain or 16.5 international feet.
Link lk 0.201168 1/100 international chain or 66/100 international feet.
Inch in 0.0254 1/12 of an international foot.
US survey units:
Distance Units Abbrev. Meters per Unit Description
Survey foot ftus ~0.3048006 The US survey foot is used in the State Plane Coordinate Systems. An exact conversion is accomplished by multiplying US survey feet by the fraction 1200/3937.
Survey mile mius ~1609.347219 5280 survey feet.
Survey chain chus ~20.116840 66 survey feet.
Survey rod rdus ~5.029210 1/4 survey chain.
Survey link lkus ~0.201168 1/100 survey chain.
Survey yard ydus ~0.914402 3 survey feet.

See Also

IDistanceConverter Interface