ESRI.ArcGIS.Mobile
SpatialReference Class
Members  Example  See Also  Send Feedback
ESRI.ArcGIS.Mobile.SpatialReferences Namespace : SpatialReference Class

Abstract class for spatial reference systems which contains projection information and methods for converting coordinates.

Object Model





Syntax

Visual Basic (Declaration) 
Public MustInherit Class SpatialReference 
C# 
public abstract class SpatialReference 

Example

An example shows how to transform coordinate between WGS84 and the map's projected coordinate system.
C#Copy Code
// Create a spatial reference object from mobile service 
SpatialReference spatialReference = mobileService1.SpatialReference; 
// specify input latitude and longitude 
double lat = 40.115054; 
double lon = -82.927062; 
// Transform coordinate from WGS84 to coordinate based on this spatial reference 
Coordinate coordinate = spatialReference.FromWgs84(lon, lat); 
    
Another example shows how to transform coordinate based on this spatial reference to WGS84.
C#Copy Code
// Create a spatial reference object from mobile service 
SpatialReference spatialReference = mobileService.SpatialReference; 
// specify input X and Y coordinates 
double x = 6220900; 
double y = 2300141; 
// Transform coordinate from map's coordinate system to WGS84. 
Coordinate coordinate = spatialReference.ToWgs84(x, y); 
    

Remarks

The spatialreference class provides access to the string defining the coordinate system, the current geotransformation, and a collection of supported geotransformations as well.
Used by the map control, it is always defined by the ArcGIS Server and the map that is served to the client.
The user directly uses spatial reference to create and manipulate features however spatial reference settings cannot be modified outside the server.

A built-in projection support is available in the client to enable GPS users to transform WGS84 and other feeds to the map's projected coordinate system.
Most projections such as Cylindrical, Conformal, Mercator and Stereographic are supported, e.g. lambert conformal conic, transverse mercator, albers, mercator, double stereographic, and oblique mercator. Note that Grid based projection is not supported.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.Mobile.SpatialReferences.SpatialReference
      ESRI.ArcGIS.Mobile.SpatialReferences.GeographicCoordinateSystem
      ESRI.ArcGIS.Mobile.SpatialReferences.ProjectedCoordinateSystem

Requirements

Namespace: ESRI.ArcGIS.Mobile.SpatialReferences

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

Assembly: ESRI.ArcGIS.Mobile (in ESRI.ArcGIS.Mobile.dll)

See Also