MapProjection.Factory

This commit is contained in:
ClemensFischer 2025-09-20 14:01:51 +02:00
parent c2a0fd836e
commit 616b2bf3f7
5 changed files with 36 additions and 89 deletions

View file

@ -31,6 +31,14 @@ namespace MapControl
public const double Wgs84Flattening = 1d / 298.257223563;
public static readonly double Wgs84Eccentricity = Math.Sqrt((2d - Wgs84Flattening) * Wgs84Flattening);
private static MapProjectionFactory factory;
public static MapProjectionFactory Factory
{
get => factory ??= new MapProjectionFactory();
set => factory = value;
}
/// <summary>
/// Gets the type of the projection.
/// </summary>
@ -147,7 +155,7 @@ namespace MapControl
/// </summary>
public static MapProjection Parse(string crsId)
{
return MapProjectionFactory.Instance.GetProjection(crsId);
return Factory.GetProjection(crsId);
}
}
}