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


IGeometryServer.FindUnitsByWKT Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryServer Interface > IGeometryServer.FindUnitsByWKT Method
ArcGIS Developer Help

IGeometryServer.FindUnitsByWKT Method

Defines a unit object based upon its well known text string.

[Visual Basic .NET]
Public Function FindUnitsByWKT ( _
    ByVal wkt As String _
) As IUnit
[C#]
public IUnit FindUnitsByWKT (
    string wkt
);
[C++]
HRESULT FindUnitsByWKT(
  BSTR wkt
);
[C++]
Parameters
wkt 

wkt is a parameter of type BSTR

Product Availability

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

Remarks

Finds a predefined linear or angular unit of measure based on its well known text string (WKT). The Unit returned is often used in other Geometry service methods such as Buffer. 

Here are some examples of WKT strings for linear and angular units.

U.S. Survey Foot:

UNIT["Foot_US",0.3048006096012192,AUTHORITY["EPSG",9003]]

Arc-minute:

UNIT["Minute",0.0002908882086657216,AUTHORITY["EPSG",9103]]

Creating custom units

You can create a custom unit in ArcObjects by using the ImportFromESRISpatialReference method on an existing linear or angular unit object. Web service clients can do this by creating a LinearUnit or AngularUnit value first and then assigning the WKT string to the WKT property of the value. The example script in this topic illustrates the former approach and the example provided in the IGeometryServer topic illustrates the latter.

See Also

IGeometryServer Interface