private static ISpatialReference CreateSpatialReference(esriSRGeoCSType coordinateSystem) { ISpatialReferenceFactory sRefFactory = new SpatialReferenceEnvironmentClass(); ISpatialReferenceResolution sRefResolution = sRefFactory.CreateGeographicCoordinateSystem(Convert.ToInt32(coordinateSystem)) as ISpatialReferenceResolution; sRefResolution.ConstructFromHorizon(); ((ISpatialReferenceTolerance) sRefResolution).SetDefaultXYTolerance(); return sRefResolution as ISpatialReference; }
/// <summary> /// 创建地理坐标系 /// </summary> /// <param name="gcsType"></param> /// <returns></returns> static public ISpatialReference CreateGeographicCoordinateSystem(esriSRGeoCSType gcsType) { return(CreateGeographicCoordinateSystem((int)gcsType)); }
/// <summary> /// crea una GeographicCoordinateSystem da una esriSRGeoCSType /// </summary> /// <param name="gcs">parametro esriSRGeoCSType</param> /// <returns>restituisce GeographicCoordinateSystem</returns> internal static IGeographicCoordinateSystem CreateGeographicCoordinateSystem(esriSRGeoCSType gcs) { return(CreateGeographicCoordinateSystem((int)gcs)); }