ArcObjects Library Reference (DefenseSolutions)  

ICoordinateTool.ConvertLocation Method

Converts input coordinates, in IPoint, DMS, UTM, or MGRS formats, from one datum to another.

ERROR: Syntax information about ICoordinateTool.ConvertLocation may not be in D:\ArcGIS\DotNet\ESRI.ArcGIS.DefenseSolutions.dll

[C++]
HRESULT ConvertLocation(
  VARIANT vValue,
  Long iFormat,
  VARIANT vFromDatum,
  VARIANT vToDatum,
  IPoint** pointWGS84,
  IPoint** pointDatum,
  BSTR* strDMS,
  BSTR* strUTM,
  BSTR* strMGRS
);
[C++]

Parameters

vValue [in]   vValue is a parameter of type VARIANT iFormat [in]   iFormat is a parameter of type Long vFromDatum [in]   vFromDatum is a parameter of type VARIANT vToDatum [in]   vToDatum is a parameter of type VARIANT pointWGS84 [in, out]

  pointWGS84 is a parameter of type IPoint

pointDatum [in, out]

  pointDatum is a parameter of type IPoint

strDMS [in, out]   strDMS is a parameter of type BSTR strUTM [in, out]   strUTM is a parameter of type BSTR strMGRS [in, out]   strMGRS is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine and ArcGIS Desktop.

Description

See the table below for a more detailed description of the ConvertLocation parameters.
Parameter                                                                             Description
vValue The input coordinates of the type specified by the iFormat value. The input coordinates must follow a specific format, depending on the coordinate type. See the following examples - DMS: 594200.00N/0101160.00E; UTM: 567536,6618612,32,N; MGRS: 32VNM6753618612.
iFormat The input coordinate type, where 1 = IPoint (decimal degrees), 2 = DMS, 3 = UTM, and 4 = MGRS.
vFromDatum The datum of the input coordinates. The value passed into this parameter can either be a string representing the name of the datum, or a long representing the index of the datum in the coordinate tool's datum list. Both the datum names and the indices can be determined by using the ICoordinateTool::GetDatumList method.
vToDatum The datum of the output coordinates. See the description of vFromDatum for details.
pWGSPoint The output IPoint with x/y coordinates in WGS1984 datum.
pOutPoint The output IPoint with x/y coordinates in the datum specified by the vToDatum parameter.
sDMS The DMS coordinates in the vToDatum.
sUTM The UTM coordinates in the vToDatum.
sMGRS The MGRS coordinates in the vToDatum.

See Also

ICoordinateTool Interface | ICoordinateTool.GetDatumList Method