![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
Compare(SpatialReference) Method | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.SpatialReference Namespace > SpatialReference Class > Compare Method : Compare(SpatialReference) Method |
- otherSpatialReference
Visual Basic (Declaration) | |
---|---|
Public Overloads Function Compare( _ ByVal otherSpatialReference As SpatialReference _ ) As Boolean |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As SpatialReference Dim otherSpatialReference As SpatialReference Dim value As Boolean value = instance.Compare(otherSpatialReference) |
C# | |
---|---|
public bool Compare( SpatialReference otherSpatialReference ) |
Parameters
- otherSpatialReference
Return Value
Boolean value that is true for equality, false for unequality. The example below compares a newly constructed SpatialReference with the MapView's SpatialReference. The code assumes an existing MapView object.
C# | ![]() |
---|---|
ESRI.ArcGIS.ADF.IMS.SpatialReference newSpRef = new ESRI.ArcGIS.ADF.IMS.SpatialReference(54030); bool areSameSpatialRef = newSpRef.Compare(mapView.SpatialReference); |
Visual Basic | ![]() |
---|---|
Dim newSpRef As New _ ESRI.ArcGIS.ADF.IMS.SpatialReference(54030) Dim areSameSpatialRef As Boolean = _ newSpRef.Compare(mapView.SpatialReference) |
This method compares the ID values or definition strings for the CoordinateSystem and DatumTransformation of the current and input SpatialReferences. The method returns true if both CoordinateSystem and DatumTranformation values are the same. Each of the CoordinateSystem properties and DatumTransformation and properties must use the same SpatialReferenceInfo type (DefinitionSpatialReferenceInfo or IDSpatialReferenceInfo). The method does not convert between definition string and ID. For example, if one SpatialReference has a coordinate system based on the WGS84 ID of 4326, and the other uses the definition string for WGS84, this method will return false.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family