Exemple #1
0
 /// <summary>
 /// Creates a new instance of GlobalPosition for a position on the surface of
 /// the reference ellipsoid.
 /// </summary>
 /// <param name="coordinates">The coordinates.</param>
 public GlobalPosition(GlobalCoordinates coordinates)
     : this(coordinates, 0.0)
 {
 }
Exemple #2
0
 /// <summary>
 /// Creates a new instance of GlobalPosition.
 /// </summary>
 /// <param name="coordinates">coordinates on the reference ellipsoid.</param>
 /// <param name="elevation">elevation, in meters, above the reference ellipsoid.</param>
 public GlobalPosition(GlobalCoordinates coordinates, double elevation)
 {
     Coordinates = coordinates;
     Elevation   = elevation;
 }
        /// <summary>
        /// Convert coordinates to an XY position on a Mercator map
        /// </summary>
        /// <param name="coordinates">The coordinates on the globe</param>
        /// <returns>An array of two doubles, the first is X, the second Y</returns>
        public double[] GlobalCoordinatesToXy(GlobalCoordinates coordinates)
        {
            var e = ToEuclidian(coordinates);

            return(new[] { e.X, e.Y });
        }
Exemple #4
0
 /// <summary>
 /// Get the globally unique Mesh number of a location given by
 /// latitude and longitude.
 /// </summary>
 /// <param name="coord">The location to convert</param>
 /// <returns>The mesh number to which the location belongs</returns>
 public long MeshNumber(GlobalCoordinates coord)
 {
     return(MeshNumber((UtmCoordinate)Projection.ToEuclidian(coord)));
 }
 /// <summary>
 /// Get the Mercator scale factor for the given point
 /// </summary>
 /// <param name="point">The point</param>
 /// <returns>The scale factor</returns>
 public override double ScaleFactor(GlobalCoordinates point)
 {
     return(ScaleFactor(point.Latitude.Degrees));
 }