com.esri.arcgis.system
Interface IUnitConverter

All Superinterfaces:
Serializable
All Known Implementing Classes:
UnitConverter

public interface IUnitConverter
extends Serializable

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 double convertUnits(double dValue, int inUnits, int outUnits)
          Convert Esri units.
 String esriUnitsAsString(int units, int appearance, boolean bPlural)
          Convert Esri unit enumerations to strings.
 

Method Detail

convertUnits

double convertUnits(double dValue,
                    int inUnits,
                    int outUnits)
                    throws IOException,
                           AutomationException
Convert Esri units.

Description

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
dValue - The dValue (in)
inUnits - A com.esri.arcgis.system.esriUnits constant (in)
outUnits - A com.esri.arcgis.system.esriUnits constant (in)
Returns:
The outValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esriUnitsAsString

String esriUnitsAsString(int units,
                         int appearance,
                         boolean bPlural)
                         throws IOException,
                                AutomationException
Convert Esri unit enumerations to strings.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
units - A com.esri.arcgis.system.esriUnits constant (in)
appearance - A com.esri.arcgis.system.esriCaseAppearance constant (in)
bPlural - The bPlural (in)
Returns:
The sUnitString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.