Frequently asked question

Convert units for use in Military Analyst Geodesy API

Last Published: April 25, 2020

Answer

Military Analyst's Geodesy API accepts units in meters. All other units must be converted to meters before use. The conversion is done using the IUnitConverter interface in the esriSystem library. For example, to convert 10 meters to nautical miles:

Code:
Dim k As IUnitConverter
Set k = New UnitConverter
Dim j As Double

j = k.ConvertUnits(10, esriMeters, esriNauticalMiles)

Other units for conversion are:

Code:
esriUnknownUnits 0 Unknown
esriInches 1 Inches
esriPoints 2 Points
esriFeet 3 Feet
esriYards 4 Yards
esriMiles 5 Miles
esriNauticalMiles 6 Nautical miles
esriMillimeters 7 Millimeters
esriCentimeters 8 Centimeters
esriMeters 9 Meters
esriKilometers 10 Kilometers
esriDecimalDegrees 11 Decimal degrees
esriDecimeters 12 Decimeters
esriUnitsLast 13 Internal use only


To convert from US Survey feet, instead of the default International Feet, multiply by 1200/3937 to obtain meters. Input the results into the function above.

Article ID: 000008994

Software:
  • ArcMap 9 x
  • ArcGIS Engine 9 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options