Good morning everyone! I would like to ask if there is a way to define my coordinates, taking into account that I don't know their coordinates system. Is there a way to determine it? All I have is an xls file. Thank you very much for your collaboration!
public static IPoint GetLatLngPointsFromMapPoints(this IActiveView view, IMapControl4 map, double controlX, double controlY) { var mapPoint = new PointClass(); mapPoint.SpatialReference = map.SpatialReference; mapPoint.PutCoords(controlX, controlY); if (mapPoint.SpatialReference.Name == "Unknown") { mapPoint.SpatialReference = view.ScreenDisplay.DisplayTransformation.ToMapPoint(0, 0).SpatialReference; } if (double.IsNaN(mapPoint.Z)) { mapPoint.Z = 0; } if (mapPoint.SpatialReference.Name == "Unknown") { return null; } var spatialRefFactory = new SpatialReferenceEnvironment(); var geoCoordSystem = spatialRefFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984); mapPoint.Project(geoCoordSystem); return mapPoint; }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.