IUnitConverter Interface

Provides access to members used for converting units.

Description

The IUnitConverter interface provides methods for converting values between different units of measure, and converting units to strings.

Members

Name Description
Method ConvertUnits Convert Esri units.
Method EsriUnitsAsString Convert Esri unit enumerations to strings.

IUnitConverter.ConvertUnits Method

Convert Esri units.

Public Function ConvertUnits ( _
    ByVal dValue As Double, _
    ByVal inUnits As esriUnits, _
    ByVal outUnits As esriUnits _
) As Double
public double ConvertUnits (
    double dValue,
    esriUnits inUnits,
    esriUnits outUnits
);

Description

Converts the specified numeric data value from one unit of measure to another unit of measure.

Remarks

If the input unit is meters and the output unit is decimal degrees, IUnitConverter converts the distance in meters along the equator to the equivalent number of decimal degrees. For example, if the distance in meters is half the circumference of the earth at the equator, IUnitConverter will return 180 decimal degrees.

IUnitConverter.EsriUnitsAsString Method

Convert Esri unit enumerations to strings.

Public Function EsriUnitsAsString ( _
    ByVal units As esriUnits, _
    ByVal appearance As esriCaseAppearance, _
    ByVal bPlural As Boolean _
) As String
public string EsriUnitsAsString (
    esriUnits units,
    esriCaseAppearance appearance,
    bool bPlural
);

Description

Converts the specified units to a string. Specify the case (eg. lower or upper case) of the string and whether the string specifies a single unit or many unit(s).

The EsriUnitsAsString method is useful for providing text to the user interface.

Classes that implement IUnitConverter

Classes Description
UnitConverter Helper CoClass to convert units.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.