Solved! Go to Solution.
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; }
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!