2012-11-22 21:42:29 +01:00
|
|
|
|
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
2012-05-04 12:52:20 +02:00
|
|
|
|
// Copyright © 2012 Clemens Fischer
|
|
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
2012-12-09 22:18:31 +01:00
|
|
|
|
#if NETFX_CORE
|
2012-11-22 21:42:29 +01:00
|
|
|
|
using Windows.Foundation;
|
|
|
|
|
|
#else
|
2012-04-25 22:02:53 +02:00
|
|
|
|
using System.Windows;
|
2012-11-22 21:42:29 +01:00
|
|
|
|
#endif
|
2012-04-25 22:02:53 +02:00
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2012-11-26 19:17:12 +01:00
|
|
|
|
/// Defines a normal cylindrical projection. Latitude and longitude values in degrees are
|
|
|
|
|
|
/// transformed to cartesian coordinates with origin at latitude = 0 and longitude = 0.
|
2012-04-25 22:02:53 +02:00
|
|
|
|
/// Longitude values are transformed identically to x values in the interval [-180 .. 180].
|
2012-11-26 19:17:12 +01:00
|
|
|
|
/// Latitude values in the interval [-MaxLatitude .. MaxLatitude] are transformed to y values in
|
|
|
|
|
|
/// the interval [-180 .. 180] according to the actual projection, e.g. the Mercator projection.
|
2012-04-25 22:02:53 +02:00
|
|
|
|
/// </summary>
|
2012-05-04 12:52:20 +02:00
|
|
|
|
public abstract class MapTransform
|
2012-04-25 22:02:53 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the absolute value of the minimum and maximum latitude that can be transformed.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public abstract double MaxLatitude { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2012-05-04 12:52:20 +02:00
|
|
|
|
/// Gets the scale factor of the map projection at the specified geographic location
|
|
|
|
|
|
/// relative to the scale at latitude zero.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public abstract double RelativeScale(Location location);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Transforms a geographic location to a cartesian coordinate point.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public abstract Point Transform(Location location);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Transforms a cartesian coordinate point to a geographic location.
|
|
|
|
|
|
/// </summary>
|
2012-11-22 21:42:29 +01:00
|
|
|
|
public abstract Location Transform(Point point);
|
2012-04-25 22:02:53 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|