Class Diagram of the ESRI.ArcGIS.Mobile.SpatialReferences namespace


The SpatialReferences namespace, contains the classes used to project map data.



Go to the Mobile Diagram Go to the Mobile Diagram Go to the Mobile Diagram Provides access to members that control a SpatialReference related to the MobileService. Provides access to geographic coordinate system. Provides access to projected coordination system. Convert coordinates from one spatial reference to another spatial reference Defines a GeoTransformation list of parameters used for converting coordinates between a Geographical Cordinate System and another Geographical Coordinate System. Represents the spatial reference units.

While their are many methods added to support the new functionality for conversion, they all follow a similar development pattern.

	//conversion for MGRS (Military Grid Reference System).

      SpatialReference sr = SpatialReference.CreateWgs84SpatialReference();

      // Converts a coordinate into a military grid string using default arguments
      Coordinate c = new Coordinate(2, 17);
      string mgrs = sr.ToMgrs(c);

      // Converts a collection of coordinates into military grid strings
      IList coordinates = new Coordinate[] { c };
      IList mgrsList = sr.ToMgrs(5, true, coordinates);

      // Converts a mgrs string as coordinate
      c = sr.FromMgrs(mgrs);

      // Converts a collection of mgrs strings as coordinates
      coordinates = sr.FromMgrs(mgrsList);