예제 #1
0
        /// <summary> Conversion of a PTV-internal Mercator distance into a WGS distance. </summary>
        /// <param name="distance">Distance given in PTV-internal Mercator format.</param>
        /// <returns>Distance given in pixel format.</returns>
        public static double PtvMercatorToWGS(double distance)
        {
            var point1 = new System.Windows.Point(0, 0);

            point1 = GeoTransform.PtvMercatorToWGS(point1);
            var point2 = new System.Windows.Point(distance, 0);

            point2 = GeoTransform.PtvMercatorToWGS(point2);
            return(Math.Abs(point1.X - point2.X));
        }
예제 #2
0
 /// <summary> Conversion of a pixel coordinate into WGS format. </summary>
 /// <param name="mapView">Map object needed for pixel (resolution) information.</param>
 /// <param name="canvas">Canvas object needed for the current scale information.</param>
 /// <param name="point">Point containing pixel coordinates.</param>
 /// <returns>Point containing WGS coordinates.</returns>
 public static System.Windows.Point CanvasToWgs(this MapView mapView, UIElement canvas, System.Windows.Point point)
 {
     return(GeoTransform.PtvMercatorToWGS(CanvasToPtvMercator(mapView, canvas, point)));
 }