mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
23 lines
624 B
C#
23 lines
624 B
C#
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|
// © 2022 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
using ProjNet.CoordinateSystems;
|
|
using System;
|
|
|
|
namespace MapControl.Projections
|
|
{
|
|
public class Wgs84UtmProjection : GeoApiProjection
|
|
{
|
|
public Wgs84UtmProjection(int zone, bool north)
|
|
{
|
|
if (zone < 1 || zone > 60)
|
|
{
|
|
throw new ArgumentException($"Invalid UTM zone {zone}.", nameof(zone));
|
|
}
|
|
|
|
CoordinateSystem = ProjectedCoordinateSystem.WGS84_UTM(zone, north);
|
|
}
|
|
}
|
|
}
|