This document is archived and information here might be outdated. Recommended version. |
Provides access to additional members that control a SpatialReference. Note: the ISpatialReference2 interface has been superseded by ISpatialReference3. Please consider using the more recent version.
Extends the ISpatialReference interface by adding functions to compare precision (resolution) of two spatial references, and round off coordinate data to the current resolution.
Name | Description | |
---|---|---|
Abbreviation | The abbreviated name of this spatial reference component. | |
Alias | The alias of this spatial reference component. | |
ApplyPrecision | Applies the measure and z value precisions. | |
ApplyXYPrecision | Applies the XY precision. | |
Changed | Notify this object that some of its parts have changed (parameter values, z unit, etc.). | |
FactoryCode | The factory code (WKID) of the spatial reference. | |
GetDomain | The XY domain extent. | |
GetFalseOriginAndUnits | Get the false origin and units. | |
GetMDomain | The measure domain extent. | |
GetMFalseOriginAndUnits | Get the measure false origin and units. | |
GetZDomain | The Z domain extent. | |
GetZFalseOriginAndUnits | Get the Z false origin and units. | |
HasMPrecision | Returns true when m-value precision information has been defined. | |
HasXYPrecision | Returns true when (x,y) precision information has been defined. | |
HasZPrecision | Returns true when z-value precision information has been defined. | |
IsMPrecisionEqual | Returns true if the measure precisions of the two spatial references are the same. | |
IsPrecisionEqual | Returns TRUE when the precision information for the two spatial references is the same. | |
IsXYPrecisionEqual | Returns true if the XY precisions of the two spatial references are the same. | |
IsZPrecisionEqual | Returns true if the Z precisions of the two spatial references are the same. | |
Name | The name of this spatial reference component. | |
PrecisionExImpl | An opaque reference to the precision information (including z/m awareness) implementation for this spatial reference. | |
PrecisionImpl | An opaque reference to the precision information implementation for this spatial reference. | |
Remarks | The comment string of this spatial reference component. | |
SetDomain | The XY domain extent. | |
SetFalseOriginAndUnits | Set the false origin and units. | |
SetMDomain | The measure domain extent. | |
SetMFalseOriginAndUnits | Set the measure false origin and units. | |
SetZDomain | The Z domain extent. | |
SetZFalseOriginAndUnits | Set the Z false origin and units. | |
SpatialReferenceImpl | SpatialReferenceImpl. | |
ZCoordinateUnit | The unit for the Z coordinate. |
Interfaces | Description |
---|---|
ISpatialReference | Provides access to members that control a SpatialReference. |
ISpatialReferenceInfo | Provides access to members that control the properties common to all components of a spatial reference system. |
Classes | Description |
---|---|
GeographicCoordinateSystem | Creates a geographic coordinate system. |
ProjectedCoordinateSystem | Creates a projected coordinate system. |
UnknownCoordinateSystem | Creates an unknown coordinate system. |
public static bool CompareSpatialRefs2(ISpatialReference2 sourceSR, ISpatialReference2 targetSR)
{
IClone sClone = sourceSR as IClone;
IClone tClone = targetSR as IClone;
// first level test compares the coordinate system component
if (!sClone.IsEqual(tClone))
return false;
// Can also check just Horizontal Coordinate System equality
bool SREqual = true;
ICompareCoordinateSystems compare = sourceSR as ICompareCoordinateSystems;
compare.IsEqualNoVCS(targetSR, ref SREqual);
if (!SREqual)
return false;
return true;
}