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


IGeometryServer.FindSRByWKT 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.FindSRByWKT Method
ArcGIS Developer Help

IGeometryServer.FindSRByWKT Method

Defines a spatial reference object based upon its well known text string (WKT) and optionally a WKT for a vertical datum. The resolution and xy tolerances are either computed from the sr horizon or set to defaults. The output sr is always high precision.

[Visual Basic .NET]
Public Function FindSRByWKT ( _
    ByVal wkt As String, _
    ByVal WKT_Z As String, _
    ByVal bDefaultXYResolution As Boolean, _
    ByVal bDefaultXYTolerance As Boolean _
) As ISpatialReference
[C#]
public ISpatialReference FindSRByWKT (
    string wkt,
    string WKT_Z,
    bool bDefaultXYResolution,
    bool bDefaultXYTolerance
);
[C++]
HRESULT FindSRByWKT(
  BSTR wkt,
  BSTR WKT_Z,
  VARIANT_BOOL bDefaultXYResolution,
  VARIANT_BOOL bDefaultXYTolerance
);
[C++]
Parameters
wkt 

wkt is a parameter of type BSTR WKT_Z
WKT_Z is a parameter of type BSTR bDefaultXYResolution
bDefaultXYResolution is a parameter of type bool bDefaultXYTolerance
bDefaultXYTolerance is a parameter of type bool

Product Availability

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

Remarks

Finds a predefined spatial reference based on its OGC/EPSG definition string, otherwise known as its well-known text string (WKT).   The text string contains individual parameters of a spatial reference.  A valid spatial reference for a geographic coordinate system (GEOGCS) may appears as follows:

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

 

Note the nested structure of parameters includes a datum, spheriod, prime meridian, and angular unit.    

A valid spatial reference for a projected coordinate system (PROJCS) may appears as follows:


PROJCS["World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]]


Note the nested structure of parameters includes a geographic coordinate system (GEOGCS), a projection, and a set of projection parameters such as false easting, false northing, and standard parallel.  

If WKT_Z is specified and not empty, then a vertical coordinate system will be created and associated with the horizontal coordinate system.  The definition string can be generated from ArcObjects using the ExportToESRISpatialReference method on a PCS or GCS. The boolean parameters are as described for FindSRByWKID.

See Also

IGeometryServer Interface