static OgcAngularUnit() { _defaultRadians = new OgcAngularUnit("radian", 1, new AuthorityTag("EPSG", "9101")); _defaultDegrees = new OgcAngularUnit("degree", Math.PI / 180.0, new AuthorityTag("EPSG", "9102")); _defaultGrads = new OgcAngularUnit("grad", Math.PI / 200.0, new AuthorityTag("EPSG", "9105")); _defaultArcSeconds = new OgcAngularUnit("arc-second", Math.PI / 648000.0, new AuthorityTag("EPSG", "9104")); }
public void GradToDegreeTest() { var grad = new OgcAngularUnit("grad", Math.PI / 200); var degree = new OgcAngularUnit("degree", Math.PI / 180); var conversion = SimpleUnitConversionGenerator.FindConversion(grad, degree); Assert.IsNotNull(conversion); Assert.AreEqual(0.9, conversion.TransformValue(1), 0.00001); }