mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Removed incorrect TransverseMercatorProjection
This commit is contained in:
parent
47ff9096d1
commit
954451fb34
16 changed files with 70 additions and 399 deletions
|
|
@ -35,9 +35,6 @@ namespace MapControl
|
|||
case UpsSouthProjection.DefaultCrsId:
|
||||
return new UpsSouthProjection();
|
||||
|
||||
case Wgs84AutoUtmProjection.DefaultCrsId:
|
||||
return new Wgs84AutoUtmProjection();
|
||||
|
||||
case OrthographicProjection.DefaultCrsId:
|
||||
return new OrthographicProjection();
|
||||
|
||||
|
|
@ -53,29 +50,6 @@ namespace MapControl
|
|||
case AzimuthalEquidistantProjection.DefaultCrsId:
|
||||
return new AzimuthalEquidistantProjection();
|
||||
|
||||
default:
|
||||
return crsId.StartsWith("EPSG:") && int.TryParse(crsId.Substring(5), out int epsgCode)
|
||||
? GetProjection(epsgCode)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual MapProjection GetProjection(int epsgCode)
|
||||
{
|
||||
switch (epsgCode)
|
||||
{
|
||||
case var c when c >= Etrs89UtmProjection.FirstZoneEpsgCode && c <= Etrs89UtmProjection.LastZoneEpsgCode:
|
||||
return new Etrs89UtmProjection(epsgCode % 100);
|
||||
|
||||
case var c when c >= Nad83UtmProjection.FirstZoneEpsgCode && c <= Nad83UtmProjection.LastZoneEpsgCode:
|
||||
return new Nad83UtmProjection(epsgCode % 100);
|
||||
|
||||
case var c when c >= Wgs84UtmProjection.FirstZoneNorthEpsgCode && c <= Wgs84UtmProjection.LastZoneNorthEpsgCode:
|
||||
return new Wgs84UtmProjection(epsgCode % 100, true);
|
||||
|
||||
case var c when c >= Wgs84UtmProjection.FirstZoneSouthEpsgCode && c <= Wgs84UtmProjection.LastZoneSouthEpsgCode:
|
||||
return new Wgs84UtmProjection(epsgCode % 100, false);
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue