Class UnknownCoordinateSystemClass
[ClassInterface(ClassInterfaceType.None)]
[Guid("B286C06B-0879-11D2-AACA-00C04FA33C20")]
public class UnknownCoordinateSystemClass : UnknownCoordinateSystem, ISpatialReference2GEN, IESRISpatialReferenceGEN, IUnknownCoordinateSystem, IClone, ICompareCoordinateSystems, IPersistStream, IPersist, ISpatialReference2, ISpatialReference, ISpatialReferenceInfo, ISpatialReference4, IESRISpatialReference, ISupportErrorInfo, IControlPrecision2, IControlPrecision, ISpatialReferenceTolerance, ISpatialReferenceResolution, IConstructUnknownCoordinateSystem
- Inheritance
-
UnknownCoordinateSystemClass
- Implements
- Inherited Members
Constructors
UnknownCoordinateSystemClass()
public UnknownCoordinateSystemClass()
Explicit Interface Implementations
Abbreviation
The abbreviated name of this spatial reference component.
virtual string Abbreviation { get; }
Returns
Alias
The alias of this spatial reference component.
virtual string Alias { get; }
Returns
ApplyPrecision(ref WKSPoint[], ref double[], ref double[])
Applies the measure and z value precisions.
virtual void ApplyPrecision(ref WKSPoint[] Points, ref double[] ms, ref double[] zs)
Parameters
ApplyPrecision(int, ref WKSPoint, ref double, ref double)
Applies the measure and z value precisions.
virtual void ApplyPrecision(int cPoints, ref WKSPoint Points, ref double ms, ref double zs)
Parameters
ApplyXYPrecision(ref WKSPoint[])
Applies the XY precision.
virtual void ApplyXYPrecision(ref WKSPoint[] Points)
Parameters
PointsWKSPoint[]
ApplyXYPrecision(int, ref WKSPoint)
Applies the XY precision.
virtual void ApplyXYPrecision(int cPoints, ref WKSPoint Points)
Parameters
Remarks
The cPoints value is the number of points to which you wish to apply the XY precision (1/resolution). A WKSPoint is a structure that contains the X and Y values of a coordinate pair.
Assign(IClone)
Assigns the properties of src to the receiver.
virtual void Assign(IClone src)
Parameters
srcIClone
Changed()
Notify this object that some of its parts have changed (parameter values, z unit, etc.).
virtual void Changed()
Clone()
Clones the receiver and assigns the result to *clone.
virtual IClone Clone()
Returns
ConstructFromEnvelope(IEnvelope)
Constructs the smallest, high precision, standard UCS that will completely contain the specified envelope.
virtual void ConstructFromEnvelope(IEnvelope pEnvelope)
Parameters
pEnvelopeIEnvelope
ConstructFromHorizon()
Defines the XY resolution and domain extent of this spatial reference based on the extent of its horizon. Low precision SRs will have minimum resolution of 1/10mm in current units.
virtual void ConstructFromHorizon()
Remarks
ConstructFromHorizon defines a domain extent and resolution sufficient to cover the horizon of a given coordinate system for high precision spatial references. For low-precision spatial references the domain extent is centered on the horizon center. It does not define an extent for the Z- or M-domains; for these use methods available on ISpatialReference.
Projected Coordinate Systems
For a high precision ProjectedCoordinateSystem (PCS), ConstructFromHorizon defines the domain extent to be a square completely covering, and slightly larger than, the horizon extent of the PCS (which is an arbitrary rectangle). The scale factor (1/precision) is chosen to fit this domain.
For a low precision PCS, the center of the domain extent is aligned with the center of the horizon extent and expanded to achieve a target resolution of 1mm.
The example below lists high and low precision extents for WGS 1984 UTM Zone 11N.
| Name | Low Precision ProjectedCoordinateSystem | High Precision ProjectedCoordinateSystem |
|---|---|---|
| MinX | -573,741.824 | -5,120,900.0 |
| MinY | -1,073,741.824 | -9,998,100.0 |
| MaxX | 1,573,741.823 | 14,875,300.0 |
| MaxY | 1,073,741.823 | 9,998,100.0 |
| Resolution | 0.001 | 2.2 x 10^-9 |
Geographic Coordinate Systems
For a high precision GeographicCoordinateSystem (GCS), ConstructFromHorizon produces the square domain (-400, -400, 400, 400) (expressed in the units of the SR).
For a low precision GCS the upper right hand corner is adjusted to achieve a default resolution of 1/500 of an arc-second.
| Name | Low Precision GeographicCoordinateSystem | High Precision GeographicCoordinateSystem |
|---|---|---|
| MinX | -400 | -400 |
| MinY | -400 | -400 |
| MaxX | 793.046469444444 | 400 |
| MaxY | 793.046469444444 | 400 |
| Resolution | 5.55555555555556E-07 (1/500 arc-second) | 8.8 x 10^-14 |
Unknown Coordinate Systems
For an UnknownCoordinateSystem (UCS), the "horizon" is defined to be a square that produces a resolution of 1 millimeter for a low precision UCS or 1/10 mm for a high precision UCS.
The example below lists high and low precision extents for an UnknownCoordinateSystem.
| Name | Low Precision UnknownCoordinateSystem | High Precision UnknownCoordinateSystem |
|---|---|---|
| MinX | -1,073,741.8245 | -450,359,962,737.05 |
| MinY | -1,073,741.8245 | -450,359,962,737.05 |
| MaxX | 1,073,741.8225 | 450,359,962,737.049 |
| MaxY | 1,073,741.8225 | 450,359,962,737.049 |
| Resolution | 0.001 | 0.0001 |
ESRISpatialReferenceSize
The number of bytes required to hold the persistant representation of this spatial reference component.
virtual int ESRISpatialReferenceSize { get; }
Returns
ExportToESRISpatialReference(out string, out int)
Exports this spatial reference component to a buffer.
virtual void ExportToESRISpatialReference(out string str, out int cBytesWrote)
Parameters
FactoryCode
The factory code of the spatial reference.
virtual int FactoryCode { get; }
Returns
Remarks
The factory code is an integer identifier that is unique by projection engine object type, such as a projected coordinate system. You can use a factory code in the ISpatialReferenceFactory::CreateProjectedCoordinateSystem method for example. If you create a custom projected coordinate system, the factory code is zero.
GetClassID(out Guid)
virtual void GetClassID(out Guid pClassID)
Parameters
pClassIDGuid
GetDomain(ref double, ref double, ref double, ref double)
Get the domain extent.
virtual void GetDomain(ref double XMin, ref double XMax, ref double YMin, ref double YMax)
Parameters
GetFalseOriginAndUnits(ref double, ref double, ref double)
Get the false origin and units.
virtual void GetFalseOriginAndUnits(ref double falseX, ref double falseY, ref double xyUnits)
Parameters
GetMDomain(ref double, ref double)
Get the measure domain extent.
virtual void GetMDomain(ref double outMMin, ref double outMMax)
Parameters
GetMFalseOriginAndUnits(ref double, ref double)
Get the measure false origin and units.
virtual void GetMFalseOriginAndUnits(ref double falseM, ref double mUnits)
Parameters
GetSizeMax(out _ULARGE_INTEGER)
virtual void GetSizeMax(out _ULARGE_INTEGER pcbSize)
Parameters
pcbSize_ULARGE_INTEGER
GetZDomain(ref double, ref double)
Get the Z domain extent.
virtual void GetZDomain(ref double outZMin, ref double outZMax)
Parameters
GetZFalseOriginAndUnits(ref double, ref double)
Get the Z false origin and units.
virtual void GetZFalseOriginAndUnits(ref double falseZ, ref double zUnits)
Parameters
HasMPrecision()
Returns true when m-value precision information has been defined.
virtual bool HasMPrecision()
Returns
HasXYPrecision()
Returns true when (x,y) precision information has been defined.
virtual bool HasXYPrecision()
Returns
HasZPrecision()
Returns true when z-value precision information has been defined.
virtual bool HasZPrecision()
Returns
IControlPrecision2_UsePrecision
virtual bool IControlPrecision2_UsePrecision { get; set; }
Returns
IESRISpatialReference_ESRISpatialReferenceSize
The number of bytes required to hold the persistant representation of this spatial reference component.
virtual int IESRISpatialReference_ESRISpatialReferenceSize { get; }
Returns
IESRISpatialReference_ExportToESRISpatialReference(out string, out int)
Exports this spatial reference component to a buffer.
virtual void IESRISpatialReference_ExportToESRISpatialReference(out string str, out int cBytesWrote)
Parameters
IESRISpatialReference_ImportFromESRISpatialReference(string, out int)
Defines this spatial reference component from the specified ESRISpatialReference buffer.
virtual void IESRISpatialReference_ImportFromESRISpatialReference(string str, out int cBytesRead)
Parameters
IPersistStream_GetClassID(out Guid)
virtual void IPersistStream_GetClassID(out Guid pClassID)
Parameters
pClassIDGuid
ISpatialReference2_Abbreviation
virtual string ISpatialReference2_Abbreviation { get; }
Returns
ISpatialReference2_Alias
virtual string ISpatialReference2_Alias { get; }
Returns
ISpatialReference2_Changed()
virtual void ISpatialReference2_Changed()
ISpatialReference2_FactoryCode
virtual int ISpatialReference2_FactoryCode { get; }
Returns
ISpatialReference2_GetDomain(out double, out double, out double, out double)
virtual void ISpatialReference2_GetDomain(out double XMin, out double XMax, out double YMin, out double YMax)
Parameters
ISpatialReference2_GetFalseOriginAndUnits(out double, out double, out double)
virtual void ISpatialReference2_GetFalseOriginAndUnits(out double falseX, out double falseY, out double xyUnits)
Parameters
ISpatialReference2_GetMDomain(out double, out double)
virtual void ISpatialReference2_GetMDomain(out double outMMin, out double outMMax)
Parameters
ISpatialReference2_GetMFalseOriginAndUnits(out double, out double)
virtual void ISpatialReference2_GetMFalseOriginAndUnits(out double falseM, out double mUnits)
Parameters
ISpatialReference2_GetZDomain(out double, out double)
virtual void ISpatialReference2_GetZDomain(out double outZMin, out double outZMax)
Parameters
ISpatialReference2_GetZFalseOriginAndUnits(out double, out double)
virtual void ISpatialReference2_GetZFalseOriginAndUnits(out double falseZ, out double zUnits)
Parameters
ISpatialReference2_HasMPrecision()
virtual bool ISpatialReference2_HasMPrecision()
Returns
ISpatialReference2_HasXYPrecision()
virtual bool ISpatialReference2_HasXYPrecision()
Returns
ISpatialReference2_HasZPrecision()
virtual bool ISpatialReference2_HasZPrecision()
Returns
ISpatialReference2_IsMPrecisionEqual(ISpatialReference)
Returns true if the measure precisions of the two spatial references are the same.
virtual bool ISpatialReference2_IsMPrecisionEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
Remarks
The IClone::IsEqual method for PCSs and GCSs compares only the projection information (projection, spheroid, projected units, etc.). It does not compare any properties related to the coordinate grid definition for the spatial references.
Use the ISpatialReference2.IsXY/Z/MPrecisionEqual methods to compare coordinate grid information.
Use the ISpatialReferenceTolerance.IsXY/Z/MToleranceEqual methods to compare the various cluster tolerances for the spatial references.
ISpatialReference2_IsPrecisionEqual(ISpatialReference, out bool)
virtual void ISpatialReference2_IsPrecisionEqual(ISpatialReference otherSR, out bool IsPrecisionEqual)
Parameters
otherSRISpatialReferenceIsPrecisionEqualbool
ISpatialReference2_IsXYPrecisionEqual(ISpatialReference)
Returns true if the XY precisions of the two spatial references are the same.
virtual bool ISpatialReference2_IsXYPrecisionEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
Remarks
The IClone::IsEqual method for PCSs and GCSs compares only the projection information (projection, spheroid, projected units, etc.). It does not compare any properties related to the coordinate grid definition for the spatial references.
Use the ISpatialReference2.IsXY/Z/MPrecisionEqual methods to compare coordinate grid information.
Use the ISpatialReferenceTolerance.IsXY/Z/MToleranceEqual methods to compare the various cluster tolerances for the spatial references.
ISpatialReference2_IsZPrecisionEqual(ISpatialReference)
Returns true if the Z precisions of the two spatial references are the same.
virtual bool ISpatialReference2_IsZPrecisionEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
Remarks
The IClone::IsEqual method for PCSs and GCSs compares only the projection information (projection, spheroid, projected units, etc.). It does not compare any properties related to the coordinate grid definition for the spatial references.
Use the ISpatialReference2.IsXY/Z/MPrecisionEqual methods to compare coordinate grid information.
Use the ISpatialReferenceTolerance.IsXY/Z/MToleranceEqual methods to compare the various cluster tolerances for the spatial references.
ISpatialReference2_Name
virtual string ISpatialReference2_Name { get; }
Returns
ISpatialReference2_PrecisionExImpl
virtual long ISpatialReference2_PrecisionExImpl { get; }
Returns
ISpatialReference2_PrecisionImpl
virtual long ISpatialReference2_PrecisionImpl { get; }
Returns
ISpatialReference2_Remarks
virtual string ISpatialReference2_Remarks { get; }
Returns
ISpatialReference2_SetDomain(double, double, double, double)
virtual void ISpatialReference2_SetDomain(double XMin, double XMax, double YMin, double YMax)
Parameters
ISpatialReference2_SetFalseOriginAndUnits(double, double, double)
virtual void ISpatialReference2_SetFalseOriginAndUnits(double falseX, double falseY, double xyUnits)
Parameters
ISpatialReference2_SetMDomain(double, double)
virtual void ISpatialReference2_SetMDomain(double inMMin, double inMMax)
Parameters
ISpatialReference2_SetMFalseOriginAndUnits(double, double)
virtual void ISpatialReference2_SetMFalseOriginAndUnits(double falseM, double mUnits)
Parameters
ISpatialReference2_SetZDomain(double, double)
virtual void ISpatialReference2_SetZDomain(double inZMin, double inZMax)
Parameters
ISpatialReference2_SetZFalseOriginAndUnits(double, double)
virtual void ISpatialReference2_SetZFalseOriginAndUnits(double falseZ, double zUnits)
Parameters
ISpatialReference2_SpatialReferenceImpl
virtual long ISpatialReference2_SpatialReferenceImpl { get; }
Returns
ISpatialReference2_ZCoordinateUnit
virtual ILinearUnit ISpatialReference2_ZCoordinateUnit { get; set; }
Returns
ISpatialReferenceInfo_Abbreviation
The abbreviated name of this spatial reference component.
virtual string ISpatialReferenceInfo_Abbreviation { get; }
Returns
ISpatialReferenceInfo_Alias
The alias of this spatial reference component.
virtual string ISpatialReferenceInfo_Alias { get; }
Returns
ISpatialReferenceInfo_FactoryCode
The factory code (WKID) of the spatial reference.
virtual int ISpatialReferenceInfo_FactoryCode { get; }
Returns
Remarks
The factory code is an integer identifier that is unique by projection engine object type, such as a projected coordinate system. You can use a factory code in the ISpatialReferenceFactory::CreateProjectedCoordinateSystem method for example. If you create a custom projected coordinate system, the factory code is zero.
ISpatialReferenceInfo_Name
The name of this spatial reference component.
virtual string ISpatialReferenceInfo_Name { get; }
Returns
ISpatialReferenceInfo_Remarks
The comment string of this spatial reference component.
virtual string ISpatialReferenceInfo_Remarks { get; }
Returns
ISpatialReference_Abbreviation
virtual string ISpatialReference_Abbreviation { get; }
Returns
ISpatialReference_Alias
virtual string ISpatialReference_Alias { get; }
Returns
ISpatialReference_Changed()
Notify this object that some of its parts have changed (parameter values, z unit, etc.).
virtual void ISpatialReference_Changed()
ISpatialReference_FactoryCode
virtual int ISpatialReference_FactoryCode { get; }
Returns
ISpatialReference_GetDomain(out double, out double, out double, out double)
The XY domain extent.
virtual void ISpatialReference_GetDomain(out double XMin, out double XMax, out double YMin, out double YMax)
Parameters
Remarks
The GetDomain and SetDomain methods are used to set and get the square domain extent of a coordinate system. The domain extent is different than the valid area of a coordinate system. The domain extent is an arbitrary square used to delimit valid coordinates for a spatial reference system and determine their resolution. It is possible that the domain extent is larger than the usable area of a coordinate system (a UTM zone, for example). A small domain extent gives you finer resolution coordinates over a smaller area. A larger domain extent lets you represent features over a larger geographic area but with coarser resolution.
//This code example shows how to get the xy domain extent of a dataset.
private void GetSpatialReferenceProperties(IFeatureClass featureClass)
{
IGeoDataset geoDataset = featureClass as IGeoDataset;
//get access to SpatialReference through IGeoDataset
ISpatialReference spatialReference = geoDataset.SpatialReference;
//get the xy domain extent of the dataset
double xMin;
double xMax;
double yMin;
double yMax;
spatialReference.GetDomain(out xMin, out xMax, out yMin, out yMax);
System.Windows.Forms.MessageBox.Show(xMin + ", " + xMax + ", " + yMin + ", " + yMax);
}
'This code example shows how to get the xy domain extent of a dataset.
'This example assumes that a valid workspace object has already been established.
Sub GetDomain_Example(ByVal pWorkspace As IWorkspace)
Dim pFeatWS As IFeatureWorkspace
pFeatWS = pWorkspace
Dim pFeatDS As IFeatureDataset
pFeatDS = pFeatWS.OpenFeatureDataset("railroad")
Dim pGeoDataset As IGeoDataset
pGeoDataset = pFeatDS
'get access to SpatialReference through IGeoDataset
Dim pSpatRef As ISpatialReference
pSpatRef = pGeoDataset.SpatialReference
Dim dXmax As Double
Dim dYmax As Double
Dim dXmin As Double
Dim dYmin As Double
'get the xy domain extent of the dataset
pSpatRef.GetDomain(dXmin, dXmax, dYmin, dYmax)
Debug.Print(dXmin & ", ", dXmax & ", " & dYmin, ", " & dYmax)
End Sub
ISpatialReference_GetFalseOriginAndUnits(out double, out double, out double)
Get the false origin and units.
virtual void ISpatialReference_GetFalseOriginAndUnits(out double falseX, out double falseY, out double xyUnits)
Parameters
Remarks
Use this function to retrieve the following information about the spatial reference of the geometry:
falseX: XMin of the domain.
falseY: YMin of the domain.
XYUnits: Precision of the domain.
//This code example shows how to get the false origin and units
of a dataset
private void GetFalseOriginAndUnits(IFeatureClass featureClass)
{
IGeoDataset geoDataset = featureClass as
IGeoDataset;
//get access to SpatialReference through
IGeoDataset
ISpatialReference spatialReference =
geoDataset.SpatialReference;
//get the false origin and units of the
dataset
double falseX;
double falseY;
double xyUnits;
spatialReference.GetFalseOriginAndUnits(out
falseX, out falseY, out xyUnits);
System.Windows.Forms.MessageBox.Show(falseX + ",
" + falseY + ", " + xyUnits);
}
'This code example shows how to get the false
origin and units of a dataset.
'This example assumes that a valid workspace
object has already 'been established.
Sub GetFalseOriginAndUnits_Example(ByVal
pWorkspace As IWorkspace)
Dim pFeatWS As
IFeatureWorkspace
pFeatWS = pWorkspace
Dim pFeatDS As
IFeatureDataset
pFeatDS =
pFeatWS.OpenFeatureDataset("railroad")
Dim pGeoDataset As
IGeoDataset
pGeoDataset =
pFeatDS
'get access to
SpatialReference through IGeoDataset
Dim pSpatRef As
ISpatialReference
pSpatRef =
pGeoDataset.SpatialReference
'declare variables
that will be used to store the
'false origin and units
of the dataset
Dim dFalseX As
Double
Dim dFalseY As
Double
Dim dXYUnits As
Double
'get the false origin
and units of the dataset
pSpatRef.GetFalseOriginAndUnits(dFalseX, dFalseY, dXYUnits)
Debug.Print(dFalseX
& ", " & dFalseY & ", " & dXYUnits)
End Sub
ISpatialReference_GetMDomain(out double, out double)
The measure domain extent.
virtual void ISpatialReference_GetMDomain(out double outMMin, out double outMMax)
Parameters
ISpatialReference_GetMFalseOriginAndUnits(out double, out double)
Get the measure false origin and units.
virtual void ISpatialReference_GetMFalseOriginAndUnits(out double falseM, out double mUnits)
Parameters
ISpatialReference_GetZDomain(out double, out double)
The Z domain extent.
virtual void ISpatialReference_GetZDomain(out double outZMin, out double outZMax)
Parameters
ISpatialReference_GetZFalseOriginAndUnits(out double, out double)
Get the Z false origin and units.
virtual void ISpatialReference_GetZFalseOriginAndUnits(out double falseZ, out double zUnits)
Parameters
ISpatialReference_HasMPrecision()
Returns true when m-value precision information has been defined.
virtual bool ISpatialReference_HasMPrecision()
Returns
ISpatialReference_HasXYPrecision()
Returns true when (x,y) precision information has been defined.
virtual bool ISpatialReference_HasXYPrecision()
Returns
ISpatialReference_HasZPrecision()
Returns true when z-value precision information has been defined.
virtual bool ISpatialReference_HasZPrecision()
Returns
ISpatialReference_IsPrecisionEqual(ISpatialReference, out bool)
Returns TRUE when the precision information for the two spatial references is the same.
virtual void ISpatialReference_IsPrecisionEqual(ISpatialReference otherSR, out bool IsPrecisionEqual)
Parameters
otherSRISpatialReferenceIsPrecisionEqualbool
Remarks
The IClone::IsEqual method implementation for spatial references only compares the coordinate system (projection information) portion of the spatial reference. If, in addition, you need to verify that the coordinate grid portions of the spatial references are equal, apply this method after IsEqual. The XY, Z, or M domain and resolution (precision) values, as well as the XY, Z and M cluster tolerances are compared.
ISpatialReference_Name
virtual string ISpatialReference_Name { get; }
Returns
ISpatialReference_PrecisionExImpl
An opaque reference to the precision information (including z/m awareness) implementation for this spatial reference.
virtual long ISpatialReference_PrecisionExImpl { get; }
Returns
Remarks
This property is for internal use only.
ISpatialReference_PrecisionImpl
An opaque reference to the precision information implementation for this spatial reference.
virtual long ISpatialReference_PrecisionImpl { get; }
Returns
Remarks
This property is for internal use only.
ISpatialReference_Remarks
virtual string ISpatialReference_Remarks { get; }
Returns
ISpatialReference_SetDomain(double, double, double, double)
The XY domain extent.
virtual void ISpatialReference_SetDomain(double XMin, double XMax, double YMin, double YMax)
Parameters
Remarks
The xy domain must be square. If you set a wider X or Y extent, it will take precedence. For example, let's say you set these values:
XMin = -180
XMax = 180
YMin = -90
YMax = 90
If you then query the values with GetDomain, you will see that the YMax value is 270. That is because the X extent is 360, so the Y extent must also be 360. The minimum x and y values are always maintained.
When creating a new spatial reference with a projected or geographic coordinate system, the recommended method for defining the XY Domain is ISpatialReferenceResolution::ConstructFromHorizon, followed by ISpatialReferenceResolution::SetDefaultXYResolution and ISpatialReferenceTolerance::SetDefaultXYTolerance. These methods produce a valid domain that covers the valid coordinate range for the coordinate system and reasonable resolution and tolerance values. The default XY tolerance value is 1 mm or its equivalent based on the coordinate system's unit of measure. The default XY resolution value is 0.1 mm or its equivalent. Tolerance values must be at least two times as large as the resolution value.
private void SetSpatialReferenceProperties(IFeatureClass featureClass)
{
IGeoDataset geoDataset = featureClass as IGeoDataset;
//get access to SpatialReference through IGeoDataset
ISpatialReference spatialReference = geoDataset.SpatialReference;
//set the xy domain extent for the dataset
spatialReference.SetDomain(10000, 90000, 10000, 90000);
}
ISpatialReference_SetFalseOriginAndUnits(double, double, double)
Set the false origin and units.
virtual void ISpatialReference_SetFalseOriginAndUnits(double falseX, double falseY, double xyUnits)
Parameters
Remarks
When creating a new spatial reference with a projected or geographic coordinate system, the recommended method for defining the XY Domain is ISpatialReferenceResolution::ConstructFromHorizon.
private void SetSpatialReferenceProperties(IFeatureClass featureClass)
{
IGeoDataset geoDataset = featureClass as IGeoDataset;
//get access to SpatialReference through IGeoDataset
ISpatialReference spatialReference = geoDataset.SpatialReference;
//set the false origin and units for the coverage where the
//falseX, falseY, and xyUnits numeric expressions are double
spatialReference.SetFalseOriginAndUnits(475006.096654, 3759312.190404, 124999.999883);
}
ISpatialReference_SetMDomain(double, double)
The measure domain extent.
virtual void ISpatialReference_SetMDomain(double inMMin, double inMMax)
Parameters
ISpatialReference_SetMFalseOriginAndUnits(double, double)
Set the measure false origin and units.
virtual void ISpatialReference_SetMFalseOriginAndUnits(double falseM, double mUnits)
Parameters
ISpatialReference_SetZDomain(double, double)
The Z domain extent.
virtual void ISpatialReference_SetZDomain(double inZMin, double inZMax)
Parameters
ISpatialReference_SetZFalseOriginAndUnits(double, double)
Set the Z false origin and units.
virtual void ISpatialReference_SetZFalseOriginAndUnits(double falseZ, double zUnits)
Parameters
ISpatialReference_SpatialReferenceImpl
SpatialReferenceImpl.
virtual long ISpatialReference_SpatialReferenceImpl { get; }
Returns
Remarks
This property is for internal use only.
ISpatialReference_ZCoordinateUnit
The unit for the Z coordinate.
virtual ILinearUnit ISpatialReference_ZCoordinateUnit { get; set; }
Returns
IUnknownCoordinateSystem_Abbreviation
virtual string IUnknownCoordinateSystem_Abbreviation { get; }
Returns
IUnknownCoordinateSystem_Alias
virtual string IUnknownCoordinateSystem_Alias { get; }
Returns
IUnknownCoordinateSystem_Changed()
virtual void IUnknownCoordinateSystem_Changed()
IUnknownCoordinateSystem_FactoryCode
virtual int IUnknownCoordinateSystem_FactoryCode { get; }
Returns
IUnknownCoordinateSystem_GetDomain(out double, out double, out double, out double)
virtual void IUnknownCoordinateSystem_GetDomain(out double XMin, out double XMax, out double YMin, out double YMax)
Parameters
IUnknownCoordinateSystem_GetFalseOriginAndUnits(out double, out double, out double)
virtual void IUnknownCoordinateSystem_GetFalseOriginAndUnits(out double falseX, out double falseY, out double xyUnits)
Parameters
IUnknownCoordinateSystem_GetMDomain(out double, out double)
virtual void IUnknownCoordinateSystem_GetMDomain(out double outMMin, out double outMMax)
Parameters
IUnknownCoordinateSystem_GetMFalseOriginAndUnits(out double, out double)
virtual void IUnknownCoordinateSystem_GetMFalseOriginAndUnits(out double falseM, out double mUnits)
Parameters
IUnknownCoordinateSystem_GetZDomain(out double, out double)
virtual void IUnknownCoordinateSystem_GetZDomain(out double outZMin, out double outZMax)
Parameters
IUnknownCoordinateSystem_GetZFalseOriginAndUnits(out double, out double)
virtual void IUnknownCoordinateSystem_GetZFalseOriginAndUnits(out double falseZ, out double zUnits)
Parameters
IUnknownCoordinateSystem_HasMPrecision()
virtual bool IUnknownCoordinateSystem_HasMPrecision()
Returns
IUnknownCoordinateSystem_HasXYPrecision()
virtual bool IUnknownCoordinateSystem_HasXYPrecision()
Returns
IUnknownCoordinateSystem_HasZPrecision()
virtual bool IUnknownCoordinateSystem_HasZPrecision()
Returns
IUnknownCoordinateSystem_IsPrecisionEqual(ISpatialReference, out bool)
virtual void IUnknownCoordinateSystem_IsPrecisionEqual(ISpatialReference otherSR, out bool IsPrecisionEqual)
Parameters
otherSRISpatialReferenceIsPrecisionEqualbool
IUnknownCoordinateSystem_Name
virtual string IUnknownCoordinateSystem_Name { get; }
Returns
IUnknownCoordinateSystem_PrecisionExImpl
virtual long IUnknownCoordinateSystem_PrecisionExImpl { get; }
Returns
IUnknownCoordinateSystem_PrecisionImpl
virtual long IUnknownCoordinateSystem_PrecisionImpl { get; }
Returns
IUnknownCoordinateSystem_Remarks
virtual string IUnknownCoordinateSystem_Remarks { get; }
Returns
IUnknownCoordinateSystem_SetDomain(double, double, double, double)
virtual void IUnknownCoordinateSystem_SetDomain(double XMin, double XMax, double YMin, double YMax)
Parameters
IUnknownCoordinateSystem_SetFalseOriginAndUnits(double, double, double)
virtual void IUnknownCoordinateSystem_SetFalseOriginAndUnits(double falseX, double falseY, double xyUnits)
Parameters
IUnknownCoordinateSystem_SetMDomain(double, double)
virtual void IUnknownCoordinateSystem_SetMDomain(double inMMin, double inMMax)
Parameters
IUnknownCoordinateSystem_SetMFalseOriginAndUnits(double, double)
virtual void IUnknownCoordinateSystem_SetMFalseOriginAndUnits(double falseM, double mUnits)
Parameters
IUnknownCoordinateSystem_SetZDomain(double, double)
virtual void IUnknownCoordinateSystem_SetZDomain(double inZMin, double inZMax)
Parameters
IUnknownCoordinateSystem_SetZFalseOriginAndUnits(double, double)
virtual void IUnknownCoordinateSystem_SetZFalseOriginAndUnits(double falseZ, double zUnits)
Parameters
IUnknownCoordinateSystem_SpatialReferenceImpl
virtual long IUnknownCoordinateSystem_SpatialReferenceImpl { get; }
Returns
IUnknownCoordinateSystem_ZCoordinateUnit
virtual ILinearUnit IUnknownCoordinateSystem_ZCoordinateUnit { get; set; }
Returns
ImportFromESRISpatialReference(string, out int)
Defines this spatial reference component from the specified ESRISpatialReference buffer.
virtual void ImportFromESRISpatialReference(string str, out int cBytesRead)
Parameters
InterfaceSupportsErrorInfo(ref Guid)
virtual void InterfaceSupportsErrorInfo(ref Guid riid)
Parameters
riidGuid
IsDirty()
virtual void IsDirty()
IsEqual(IClone)
Indicates if the receiver and other have the same properties.
virtual bool IsEqual(IClone other)
Parameters
otherIClone
Returns
IsEqualLeftLongitude(ISpatialReference, bool)
For geographic coordinate systems, this version of IsEqual includes considers their left longitude properties. Same as IsEqual for projected coordinate systems.
virtual bool IsEqualLeftLongitude(ISpatialReference other, bool compareVCS)
Parameters
otherISpatialReferencecompareVCSbool
Returns
IsEqualNoVCS(ISpatialReference)
Compares spatial references without considering any vertical coordinate system that may be associated with the spatial reference.
virtual bool IsEqualNoVCS(ISpatialReference other)
Parameters
otherISpatialReference
Returns
IsHighPrecision
TRUE if a high precision integer grid is being used to round coordinate values. The scale factors of the spatial reference are re-scaled when this property is changed.
virtual bool IsHighPrecision { get; set; }
Returns
IsIdentical(IClone)
Indicates if the receiver and other are the same object.
virtual bool IsIdentical(IClone other)
Parameters
otherIClone
Returns
IsMPrecisionEqual(ISpatialReference)
Returns true if the measure precisions of the two spatial references are the same.
virtual bool IsMPrecisionEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
IsMToleranceEqual(ISpatialReference)
Returns true if the measure tolerances of the two spatial references are the same.
virtual bool IsMToleranceEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
Remarks
IsMToleranceEqual will return True if both Spatial Reference MTolerances are undefined (NaN) or if they are both defined and numerically equal.
Note that the IClone::IsEqual method on spatial references does not consider coordinate grid or tolerance properties. It only looks at the coordinate system part (i.e. projection information) of the spatial reference.
IsPrecisionEqual(ISpatialReference, ref bool)
Returns TRUE when the precision information for the two spatial references is the same.
virtual void IsPrecisionEqual(ISpatialReference otherSR, ref bool IsPrecisionEqual)
Parameters
otherSRISpatialReferenceIsPrecisionEqualbool
IsXYPrecisionEqual(ISpatialReference)
Returns true if the XY precisions of the two spatial references are the same.
virtual bool IsXYPrecisionEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
IsXYToleranceEqual(ISpatialReference)
Returns true if the XY tolerances of the two spatial references are the same.
virtual bool IsXYToleranceEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
Remarks
IsXYToleranceEqual will return True if both Spatial Reference XYTolerances are undefined (NaN) or if they are both defined and numerically equal.
Note that the IClone::IsEqual method on spatial references does not consider coordinate grid or tolerance properties. It only looks at the coordinate system part (i.e. projection information) part of the spatial reference.
IsZPrecisionEqual(ISpatialReference)
Returns true if the Z precisions of the two spatial references are the same.
virtual bool IsZPrecisionEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
IsZToleranceEqual(ISpatialReference)
Returns true if the Z tolerances of the two spatial references are the same.
virtual bool IsZToleranceEqual(ISpatialReference otherSR)
Parameters
otherSRISpatialReference
Returns
Remarks
IsZToleranceEqual will return True if both Spatial Reference Z Tolerances are undefined (NaN)or if they are both defined and numerically equal.
Note that the IClone::IsEqual method on spatial references does not consider coordinate grid or tolerance properties. It only looks at the coordinate system part (i.e. projection information) part of the spatial reference.
Load(IStream)
virtual void Load(IStream pstm)
Parameters
pstmIStream
MResolution
The M, or measure, resolution of this spatial reference.
virtual double MResolution { get; set; }
Returns
Remarks
MResolution resizes the existing grid about its center to accommodate the new resolution specified. This property provides finer control for specifying the resolution than does ISpatialReferenceResolution::SetDefaultMResolution. The default MResolution is defined as 0.001 units for high and low precision spatial references.
The default value for MResolution is NaN for a new spatial reference. If the MResolution is not well-defined (MResolution is NaN), calls to ISpatialReference::SetMDomain or ISpatialReference::SetMFalseOriginAndUnits will set the MResolution to the minimum allowable value (2.0/mUnits). If the MResolution was already defined, these methods will not alter the MResolution.
MTolerance
The tolerance used to determine equality of M values.
virtual double MTolerance { get; set; }
Returns
Remarks
The MTolerance method establishes or retrieves the value for the MTolerance of the spatial reference. Setting the MTolerance using this property provides finer control than SetDefaultMTolerance or SetMinimumMTolerance.
The minimum allowable MTolerance is 2.0 * MResolution. To ensure that the MTolerance specified is valid, use MToleranceValid after setting the MTolerance using this property.
The MTolerance is undefined (NaN) by default.
MToleranceValid
Returns true if the M tolerance is well defined (not NaN) and >= the minimum M tolerance.
virtual esriSRToleranceEnum MToleranceValid { get; }
Returns
Remarks
The MToleranceValid property determines if the current M tolerance associated with the spatial reference is valid. A M Tolerance is considered valid when it is well-defined (not NaN) and the M tolerance is greater than or equal to the minimum M tolerance. The minimum allowable MTolerance is 2.0 * MResolution.
To ensure that the MTolerance specified is valid, call MToleranceValid after calling ISpatialReferenceTolerance::MTolerance.
Name
The name of this spatial reference component.
virtual string Name { get; }
Returns
PrecisionExImpl
An opaque reference to the precision information (including z/m awareness) implementation for this spatial reference.
virtual long PrecisionExImpl { get; }
Returns
PrecisionImpl
An opaque reference to the precision information implementation for this spatial reference.
virtual long PrecisionImpl { get; }
Returns
Remarks
The comment string of this spatial reference component.
virtual string Remarks { get; }
Returns
Save(IStream, int)
virtual void Save(IStream pstm, int fClearDirty)
Parameters
SetDefaultMResolution()
Sets the m coordinate grid resolution to 1 mm for a low precision spatial reference or 1/10 mm for a high precision spatial reference.
virtual void SetDefaultMResolution()
Remarks
This method behaves analogously to the SetDefaultXYResolution method, but operates on the linear m coordinate grid. For a high-precision spatial reference the default MResolution is 0.0001 units; for a low-precision spatial reference the default MResolution is 0.001 units.
SetDefaultMTolerance()
Sets the default tolerance used to determine equality of M values (2.0 * m resolution).
virtual void SetDefaultMTolerance()
Remarks
The SetDefaultMTolerance method establishes the default value for the M tolerance. The default value is 0.001 units.
The minimum allowable MTolerance is 2.0 * MResolution.
If the value specified by SetDefaultMTolerance is not greater than or equal to 2.0 * MResolution, the MTolerance will be set at 2.0 * MResolution.
The following code snippet illustrates the required steps to set the default M tolerance for a new SpatialReference.
ISpatialReferenceFactory3 spatialReferenceFactory =
new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory3;
ISpatialReference spatialRef = spatialReferenceFactory.CreateSpatialReference(23033);
if (spatialRef == null)
return;
ISpatialReferenceResolution spatialRefResolution = spatialRef as ISpatialReferenceResolution;
// Set the domain extent to a default range based on the target resolution
spatialRefResolution.SetDefaultMResolution();
ISpatialReferenceTolerance spatialRefTolerance = spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetDefaultMTolerance();
SetDefaultXYResolution()
defaults: PCS(hi): 1/10 mm; PCS(lo): 1 mm; GCS(hi): 1/10,000 arc-second; GCS(lo): 1/500 arc-second; UCS(hi): 1/10 mm (assumed); UCS(lo): 1 mm (assumed).
virtual void SetDefaultXYResolution()
Remarks
SetDefaultXYResolution recalculates the maximum x and y coordinates for the domain of the spatial reference in order to achieve a target resolution of 1 millimeter for low precision ProjectedCoordinateSystems or 1/10 millimeter for high precision. For high precision GeographicCoordinateSystems, the target resolution is 1/10,000 of an arc-second and the low precision target resolution is 1/500 of an arc-second. For UnknownCoordinateSystems, the high precision target resolution is 1/10 millimeter and the low precision target resolution is 1 millimeter. Resolutions are listed here in metric units but are converted to the units of the spatial reference by these methods.
Use the ISpatialReferenceResolution::XYResolution(False) property to specify the target resolution in units defined by the spatial reference.
SetDefaultXYTolerance()
Sets the default cluster tolerance used to control point coalescing in the X and Y dimensions (the equivalent of 1 mm in the current spatial reference units).
virtual void SetDefaultXYTolerance()
Remarks
SetDefaultXYTolerance establishes the default value for the XY tolerance, taking into account the current units of the spatial reference. Any established tolerance will not be changed automatically if the units of the spatial reference are changed. For a ProjectedCoordinateSystem or an UnknownCoordinateSystem, the default tolerance is 1 mm (expressed in the units of the spatial reference) or 2.0 * XYResolution, whichever is larger. For a GeographicCoordinateSystem, it is the angle subtending 1 mm at the equator, or 2.0 * XYResolution, whichever is larger.
The minimum allowable XYTolerance is 2.0 * XYResolution.
If the value specified by SetDefaultXYTolerance is not greater than or equal to 2.0 * XYResolution, the XYTolerance will be set at 2.0 * XYResolution.
A file-based data source, such as shapefiles, CAD and SDC, that has an UnknownCoordinateSystem and that has an X coordinate data extent that falls between +/-400, will use a tolerance in degrees corresponding to 1mm along the equator (8.98315284119522E-09 degrees).
public void SetDefaultXYToleranceExample()
{
//The following code example creates a new projected coordinate system,
//defines the domainextent and default resolution, and sets the default XYTolerance.
// use activator class with SpatialReferenceEnvironment singleton
Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");
System.Object obj = Activator.CreateInstance(factoryType);
ISpatialReferenceFactory3 spatialReferenceFactory = obj as ISpatialReferenceFactory3;
ISpatialReference spatialRef = spatialReferenceFactory.CreateSpatialReference(32610);
ISpatialReference projectedCoordinateSystem = spatialReferenceFactory.CreateProjectedCoordinateSystem(32610);
IControlPrecision2 controlPrecision = projectedCoordinateSystem as IControlPrecision2;
controlPrecision.IsHighPrecision = true;
ISpatialReferenceResolution spatialReferenceResolution = projectedCoordinateSystem as ISpatialReferenceResolution;
spatialReferenceResolution.ConstructFromHorizon();
ISpatialReferenceTolerance spatialReferenceTolerance = projectedCoordinateSystem as ISpatialReferenceTolerance;
spatialReferenceTolerance.SetDefaultXYTolerance();
}
'The following code example creates a new projected coordinate system,
'defines the domain extent and default resolution, and sets the default XYTolerance.
Dim pSpatialReferenceFactory As ISpatialReferenceFactory3
pSpatialReferenceFactory = New SpatialReferenceEnvironment
Dim pSpatialReference As ISpatialReference
pSpatialReference = pSpatialReferenceFactory.CreateProjectedCoordinateSystem(32610)
Dim pControlPrecision As IControlPrecision2
pControlPrecision = pSpatialReference
pControlPrecision.IsHighPrecision = True
Dim pSRRes As ISpatialReferenceResolution
pSRRes = pSpatialReference
pSRRes.ConstructFromHorizon()
Dim pSRTolerance As ISpatialReferenceTolerance
pSRTolerance = pSpatialReference
pSRTolerance.SetDefaultXYTolerance()
SetDefaultZResolution()
Sets the z coordinate grid resolution to 1 mm for a low precision spatial reference or 1/10 mm for a high precision spatial reference.
virtual void SetDefaultZResolution()
Remarks
This method behaves analogously to the SetDefaultXYResolution method, but operates on the linear z coordinate grid. For a high-precision spatial reference the default ZResolution is 0.0001 meters (expressed in the units defined by the VCS if applicable); for a low-precision spatial reference the default ZResolution is 0.001 units.
SetDefaultZTolerance()
Sets the default value for the Z cluster tolerance used to control point coalescing strictly along the Z axis (the equivalent of 1 mm in the current vertical coordinate system units).
virtual void SetDefaultZTolerance()
Remarks
The SetDefaultZTolerance method establishes the default value for the ZTolerance. Any established tolerance will not automatically be changed by changing the units of the spatial reference. The default value is 1mm (scaled to whatever units are associated with the spatial reference's vertical coordinate system).
The minimum allowable ZTolerance is 2.0 * ZResolution.
The following code snippet illustrates the required steps to set the default Z tolerance for a new SpatialReference.
ISpatialReferenceFactory3
spatialReferenceFactory =
new
SpatialReferenceEnvironmentClass()
as ISpatialReferenceFactory3;
ISpatialReference
spatialRef =
spatialReferenceFactory.CreateSpatialReference(23033);
if (spatialRef ==
null)
return;
ISpatialReferenceResolution spatialRefResolution = spatialRef as ISpatialReferenceResolution;
// Set the domain
extent to a default range based on the target
resolution
spatialRefResolution.SetDefaultZResolution();
ISpatialReferenceTolerance spatialRefTolerance = spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetDefaultZTolerance();
SetDomain(double, double, double, double)
Set the xy domain extent.
virtual void SetDomain(double XMin, double XMax, double YMin, double YMax)
Parameters
SetFalseOriginAndUnits(double, double, double)
Set the false origin and units.
virtual void SetFalseOriginAndUnits(double falseX, double falseY, double xyUnits)
Parameters
SetMDomain(double, double)
Set the measure domain extent.
virtual void SetMDomain(double inMMin, double inMMax)
Parameters
SetMFalseOriginAndUnits(double, double)
Set the measure false origin and units.
virtual void SetMFalseOriginAndUnits(double falseM, double mUnits)
Parameters
SetMinimumMTolerance()
Sets the minimum tolerance (i.e., pre 9.2) used to determine equality of M values (2.0 * m resolution).
virtual void SetMinimumMTolerance()
Remarks
The SetMinimumMTolerance method sets the tolerance to the value of the spatial reference's grid resolution (or 2.0 * M resolution). Setting the MTolerance using this method provides a mechanism to maintain backward compatibility with ArcGIS 9.1 geometric and relational operators. At 9.1 and before, this is the only tolerance value used by measure or linear referencing aware operations in the geometry system.
The following code snippet illustrates the required steps to set the minimum M tolerance for a new SpatialReference.
ISpatialReferenceFactory3 spatialReferenceFactory =
new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory3;
ISpatialReference spatialRef = spatialReferenceFactory.CreateSpatialReference(23033);
if (spatialRef == null)
return;
ISpatialReferenceResolution spatialRefResolution = spatialRef as ISpatialReferenceResolution;
// Set the domain extent to a default range based on the target resolution
spatialRefResolution.SetDefaultMResolution();
ISpatialReferenceTolerance spatialRefTolerance = spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetMinimumMTolerance();
SetMinimumXYTolerance()
Sets the xy cluster tolerance to be 2.0 * resolution. Use this value for compatibility with pre-9.2 topological and relational operators.
virtual void SetMinimumXYTolerance()
Remarks
The SetMinimumXYTolerance method sets the tolerance to the value of the spatial reference's grid resolution (or 2.0 * XYResolution). Setting the XYTolerance using this method provides a mechanism to maintain backward compatibility with ArcGIS 9.1 geometric and relational operators. At version 9.1 and before, this is the only tolerance value used by geometric and relational operators.
private void SetMinimumXYTolerance()
{
// use activator class with SpatialReferenceEnvironment singleton
Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");
System.Object obj = Activator.CreateInstance(factoryType);
ISpatialReferenceFactory3 spatialReferenceFactory = obj as ISpatialReferenceFactory3;
ISpatialReference spatialReference = spatialReferenceFactory.CreateSpatialReference(32610);
if (spatialReference == null)
return;
ISpatialReferenceResolution spatialRefResolution = spatialReference as ISpatialReferenceResolution;
try
{
// 9.3 releases and earlier did not set the domain, resolution or
// Set the domain extent based on the SpatialReference horizon.
spatialRefResolution.ConstructFromHorizon();
spatialRefResolution.SetDefaultXYResolution();
}
catch (Exception ex)
{
throw new NullReferenceException(ex.Message);
}
ISpatialReferenceTolerance spatialRefTolerance =
spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetMinimumXYTolerance();
}
SetMinimumZTolerance()
Sets the minimum value for the Z cluster tolerance (i.e., pre 9.2) used to control point coalescing strictly along the Z axis (the equivalent of 1 mm in the current vertical coordinate system units).
virtual void SetMinimumZTolerance()
Remarks
The SetMinimumZTolerance method sets the ZTolerance to 2.0 * z resolution. Setting the ZTolerance using this method provides a mechanism to maintain backward compatibility with ArcGIS 9.1 geometric and relational operators. At 9.1 and before, this is the only tolerance value used by the geometric and relational operators.
The ZResolution should be defined before calling SetMinimumZTolerance.
The following code snippet illustrates the required steps to set the default Z tolerance for a new SpatialReference.
ISpatialReferenceFactory3 spatialReferenceFactory =
new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory3;
ISpatialReference spatialRef = spatialReferenceFactory.CreateSpatialReference(23033);
if (spatialRef == null)
return;
ISpatialReferenceResolution spatialRefResolution = spatialRef as ISpatialReferenceResolution;
// Set the domain extent to a default range based on the target resolution
spatialRefResolution.SetDefaultZResolution();
ISpatialReferenceTolerance spatialRefTolerance = spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetMinimumZTolerance();
SetZDomain(double, double)
Set the z domain extent.
virtual void SetZDomain(double inZMin, double inZMax)
Parameters
SetZFalseOriginAndUnits(double, double)
Set the Z false origin and units.
virtual void SetZFalseOriginAndUnits(double falseZ, double zUnits)
Parameters
SpatialReferenceImpl
SpatialReferenceImpl.
virtual long SpatialReferenceImpl { get; }
Returns
UsePrecision
Returns TRUE if the precision information can be used for snapping.
virtual bool UsePrecision { get; set; }
Returns
XYResolution[bool]
The XY resolution (distance in SR units between distinguishable grid points) of this spatial reference. Reported in meters for PCS/UCS and degrees for GCS when bStandardUnits is true or in current units of SR when it is false.
virtual double XYResolution[bool bStandardUnits] { get; set; }
Parameters
bStandardUnitsbool
Returns
Remarks
XYResolution determines the distinguishable distance between two points in horizontal (XY) space. It is the inverse of the scale factor.
XYResolution can be expressed in standard units or units defined by the spatial reference. For ProjectedCoordinateSystems and UnknownCoordinateSystems the standard unit is expressed in meters; for GeographicCoordinateSystems the standard unit is expressed in degrees.
The default XYResolution for ProjectedCoordinateSystems and UnknownCoordinateSystems is either 1 mm (low-precision spatial reference) or 0.1 mm (high-precision spatial reference). For GeographicCoordinateSystems the default XYResolution is 1/500 arc-second (low-precision spatial reference) or 1/10000 arc-second (high-precision spatial reference). The precision of a spatial reference is determined using IControlPrecision2::IsHighPrecision. At ArcGIS 9.2 all spatial references are created using high precision by default.
Altering this property preserves the current false origin of the spatial reference if it has already been defined. Otherwise, the ConstructFromHorizon method is used to define a false origin.
Use ISpatialReferenceResolution::XYResolution(False) to return or set the XYResolution in the units defined as part of the spatial reference.
The default value for XYResolution is NaN (not-a-number) for a new spatial reference. If the XYResolution has not been set previously, calls to ISpatialReference::SetDomain or ISpatialReference::SetFalseOriginAndUnits will set the XYResolution to the minimum allowable value (2.0/XYunits).
XYTolerance
The xy tolerance used to control point coalescing in the X and Y dimensions.
virtual double XYTolerance { get; set; }
Returns
Remarks
The XYTolerance property is the planar cluster tolerance associated with a spatial reference that will be used by geometric and relational operators. It has the same meaning as the cluster tolerance parameter presented in other parts of ArcGIS, including topology and Geoprocessing. The default value is 1mm (scaled to whatever units are associated with the spatial reference) for ProjectedCoordinateSystems and UnknownCoordinateSystems, and the angle corresponding to 1mm along the equator for geographic coordinate systems.
Setting the XYTolerance using this property provides finer control than SetDefaultXYTolerance or SetMinimumXYTolerance.
The minimum allowable XYTolerance is 2.0 * XYResolution. XYTolerance is undefined (NaN) by after creating a spatial reference. Operations on the spatial reference that define its coordinate grid will set the tolerance to its minimum value if its currently NaN. The tolerance is not modified if the grid resolution changes. To ensure that the XYTolerance specified is valid, use XYToleranceValid.
XYToleranceValid
Returns esriSRToleranceOK if the XY tolerance is well defined (not NaN) and >= the minimum XY tolerance.
virtual esriSRToleranceEnum XYToleranceValid { get; }
Returns
Remarks
The xy grid resolution of a spatial reference can be altered independantly of the XYTolerance. Use this method to ensure that the current XYTolerance is defined and not less than the minimum legal value (2.0 * XYResolution).
ZCoordinateUnit
The unit for the Z coordinate.
virtual ILinearUnit ZCoordinateUnit { get; set; }
Returns
ZResolution[bool]
The Z resolution (height/depth distance between distinguishable grid points) of this spatial reference. Reported in meters when bStandardUnits is true or in current units of SR when it is false.
virtual double ZResolution[bool bStandardUnits] { get; set; }
Parameters
bStandardUnitsbool
Returns
Remarks
ZResolution resizes the existing grid about its center to achieve a target resolution of 1mm for low precision spatial references or 1/10 mm for high precision. This property provides finer control for specifying the resolution than does ISpatialReferenceResolution::SetDefaultZResolution. The default ZResolution is defined in standard units as 0.1 mm for high and low precision spatial references, or 1 mm for low precision spatial references. For ProjectedCoordinateSystems and GeographicCoordinateSystems, that default value is scaled to whatever units are associated with the spatial reference's VerticalCoordinateSystem property.
Use ISpatialReferenceResolution::ZResolution(False) to specify or retrieve the Z resolution in units defined by the vertical coordinate system.
The default value for ZResolution is NaN for a new spatial reference. If the ZResolution is not well-defined (ZResolution is NaN), calls to ISpatialReference::SetZDomain or ISpatialReference::SetZFalseOriginAndUnits will set the ZResolution to the minimum allowable value (2.0/zUnits). If the ZResolution was already defined, these methods will not alter the ZResolution.
ZToXYFactor
Conversion factor from Z units to XY units.
virtual double ZToXYFactor { get; }
Returns
ZTolerance
The tolerance used to control point coalescing strictly along the Z axis.
virtual double ZTolerance { get; set; }
Returns
Remarks
The ZTolerance property controls clustering of the z-values of coordinates. It currently is used only in the context of the topology validation operation. It is expressed in the spatial reference's vertical coordinate system units. Setting the ZTolerance using this property provides finer control than SetDefaultZTolerance or SetMinimumZTolerance.
The minimum allowable ZTolerance is 2 * ZResolution (defined by ISpatialReferenceResolution::ZResolution). To ensure that the ZTolerance specified is valid, use ZToleranceValid after setting the ZTolerance using this property.
The ZTolerance is undefined (NaN) by default. Methods that define the z coordinate grid will set the z tolerance to the minimum value if it isn't currently defined
ZToleranceValid
Returns true if the Z tolerance is well defined (not NaN) and >= the minimum Z tolerance.
virtual esriSRToleranceEnum ZToleranceValid { get; }
Returns
Remarks
ZToleranceValid determines if the current ZTolerance associated with the spatial reference is valid. A ZTolerance is considered valid when it is well defined (not NaN) and the Z tolerance is greater than or equal to the minimum ZTolerance. The minimum allowable ZTolerance is 2.0 * ZResolution.
To ensure that the ZTolerance specified is valid, call ZToleranceValid after calling ISpatialReferenceTolerance::ZTolerance.