Defines a spatial reference object based upon its well known identifier (WKID) and optionally a WKID for a vertical datum. The resolution and xy tolerances are either computed from the sr horizon or set to defaults. 'authority' is typically either 'EPSG' or 'E???
[Visual Basic 6.0] Function FindSRByWKID(
ByVal authority As String, _
ByVal WKID As Long, _
ByVal WKID_Z As Long, _
ByVal bDefaultXYResolution As Boolean, _
ByVal bDefaultXYTolerance As Boolean _
) As ISpatialReference
[Visual Basic .NET] Public Function FindSRByWKID ( _ ByVal authority As String, _ ByVal WKID As Integer, _ ByVal WKID_Z As Integer, _ ByVal bDefaultXYResolution As Boolean, _ ByVal bDefaultXYTolerance As Boolean _ ) As ISpatialReference
[C#] public ISpatialReference FindSRByWKID ( string authority, int WKID, int WKID_Z, bool bDefaultXYResolution, bool bDefaultXYTolerance );
[Java] public ISpatialReference findSRByWKID ( String authority, int WKID, int WKID_Z, Boolean bDefaultXYResolution, Boolean bDefaultXYTolerance ) throws IOException, AutomationException
[C++] HRESULT FindSRByWKID( BSTR authority, long WKID, long WKID_Z, VARIANT_BOOL bDefaultXYResolution, VARIANT_BOOL bDefaultXYTolerance, ISpatialReference** ppSR );
Parameters
authority
authority is a parameter of type BSTR
WKID
WKID is a parameter of type long
WKID_Z
WKID_Z is a parameter of type long
bDefaultXYResolution
bDefaultXYResolution is a parameter of type VARIANT_BOOL
bDefaultXYTolerance
bDefaultXYTolerance is a parameter of type VARIANT_BOOL
ppSR [out, retval]
ppSR is a parameter of type ISpatialReference
Returns a predefined, high precision spatial reference based on its OGP/EPSG Well Known Identifier (WKID, aka “factory code”). Valid WKIDs are listed below. If WKID_Z > -1, then a vertical coordinate system will be created and associated with the horizontal coordinate system.
AuthorityName is usually "EPSG" or "ESRI", but can also be an arbitrary string. It can also be the empty string if you want the default authority name associated with the new spatial reference. Clients can associate their own authority names with factory codes that are currently associated with the EPSG or ESRI authority names, because only the WKID is used to create the spatial reference. Here are the current rules for mapping WKID ranges to default authority names:
• A WKID in the EPSG code range (1000 – 32768) will result in an AUTHORITY name of “EPSG”, and the version will be the current EPSG version used (currently “6.12”).
• A WKID in the ESRI code range (33000 – 199999) will result in an AUTHORITY name of “ESRI”, and the version will be the current PE library version (currently “9.3”).
• A WKID in the user (objedit) range (200000 – 209199) will result in an AUTHORITY name of “CUSTOM”, with no version associated with it. This name is specified by the OGC.
For web service clients of the geometry server, the returned WKT (well known text) element of the spatial reference will have an “AUTHORITY’ tag in it, containing the default or the client-specified authority name and the specified WKID.
If bDefaultXYResolution is true, then the xy coordinate grid resolution will be set to its default value (see SetDefaultXYResolution for details). If it is false, the finest possible resolution that covers the horizon of the spatial reference will be used (see ConstructFromHorizon for details).
If bDefaultXYTolerance is true, then the default xy tolerance of 1mm will be used (see SetDefaultXYTolerance for details). If it is false, then the minimum xy tolerance will be used (2.0 * xy coordinate grid resolution).
Lists of the valid WKIDs for predefined Projected Coordinate Systems can be found here:
esriSRProjCS2Type, esriSRProjCS3Type, esriSRProjCS4Type, esriSRProjCSType
Lists of the valid WKIDs for predefined Geographic Coordinate Systems can be found here:
esriSRGeoCS2Type, esriSRGeoCS3Type, esriSRGeoCSType