Skip to content

Commit e93ab00

Browse files
committed
Add "Hotine_Oblique_Mercator_Azimuth_Center" alias
This alias is used by multiple EPSG WKT strings, such as EPSG:2056. Related to #48
1 parent d84cd09 commit e93ab00

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ProjNet.Tests/CoordinateTransformTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,8 +868,8 @@ public void Test_EPSG_21780_PrimeMeredianTransformation()
868868
public void Test_EPSG_2056_HotineObliqueMercatorAzimuthCenter_Switzerland()
869869
{
870870
var csSrc = GeographicCoordinateSystem.WGS84;
871-
var csTgt = new CoordinateSystemFactory().CreateFromWkt(@"PROJCS[""CH1903+ / LV95"",GEOGCS[""CH1903+"",DATUM[""CH1903+"",SPHEROID[""Bessel 1841"",6377397.155,299.1528128,AUTHORITY[""EPSG"",""7004""]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY[""EPSG"",""6150""]],PRIMEM[""Greenwich"",0,AUTHORITY[""EPSG"",""8901""]],UNIT[""degree"",0.0174532925199433,AUTHORITY[""EPSG"",""9122""]],AUTHORITY[""EPSG"",""4150""]],PROJECTION[""Hotine_Oblique_Mercator""],PARAMETER[""latitude_of_center"",46.95240555555556],PARAMETER[""longitude_of_center"",7.439583333333333],PARAMETER[""azimuth"",90],PARAMETER[""rectified_grid_angle"",90],PARAMETER[""scale_factor"",1],PARAMETER[""false_easting"",2600000],PARAMETER[""false_northing"",1200000],UNIT[""metre"",1,AUTHORITY[""EPSG"",""9001""]],AXIS[""Y"",EAST],AXIS[""X"",NORTH],AUTHORITY[""EPSG"",""2056""]]");
872-
var transformer = new CoordinateTransformationFactory().CreateFromCoordinateSystems(csSrc, csTgt);
871+
var csTgt = SRIDReader.GetCSbyID(2056); // CH1903+ / LV95
872+
var transformer = CoordinateTransformationFactory.CreateFromCoordinateSystems(csSrc, csTgt);
873873
double x = 9.619803;
874874
double y = 47.408735;
875875

ProjNet/CoordinateSystems/Projections/ProjectionsRegistry.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static ProjectionsRegistry()
4444

4545
Register("cassini_soldner", typeof(CassiniSoldnerProjection));
4646
Register("hotine_oblique_mercator", typeof(HotineObliqueMercatorProjection));
47+
Register("hotine_oblique_mercator_azimuth_center", typeof(HotineObliqueMercatorProjection));
4748
Register("oblique_mercator", typeof(ObliqueMercatorProjection));
4849
Register("oblique_stereographic", typeof(ObliqueStereographicProjection));
4950
}

0 commit comments

Comments
 (0)