public void Test_Ellipsoid() { IEllipsoid ellipsoid = _factory.CreateEllipsoid("7001"); Assertion.AssertEquals("Ellipsoid Remarks", "Original definition is a=20923713 and b=20853810 feet of 1796. For the 1936 retriangulation OSGB defines the relationship of feet of 1796 to the International metre through log(1.48401603) exactly [=0.3048007491...]. 1/f is given to 7 decimal places.", ellipsoid.Remarks); Assertion.AssertEquals("Ellipsoid Name", "Airy 1830", ellipsoid.Name); Assertion.AssertEquals("Ellipsoid Major Axis", "6377563.396", ellipsoid.SemiMajorAxis.ToString()); Assertion.AssertEquals("Ellipsoid Minor Axis", "6356256.90923729", ellipsoid.SemiMinorAxis.ToString()); Assertion.AssertEquals("Ellipsoid flattening", 299.3249646, ellipsoid.InverseFlattening); Assertion.AssertEquals("Ellipsoid IVF Definitive", true, ellipsoid.IsIvfDefinitive()); }
private static void WriteEllipsoid(IEllipsoid ellipsoid, XmlTextWriter writer) { writer.WriteStartElement("CS_Ellipsoid"); writer.WriteAttributeString("SemiMajorAxis", ellipsoid.SemiMajorAxis.ToString()); writer.WriteAttributeString("SemiMinorAxis", ellipsoid.SemiMinorAxis.ToString()); writer.WriteAttributeString("InverseFlattening", ellipsoid.InverseFlattening.ToString()); if (ellipsoid.IsIvfDefinitive()) { writer.WriteAttributeString("IvfDefinitive", "1"); } else { writer.WriteAttributeString("CS_vfDefinitive", "1"); } WriteCSInfo(ellipsoid, writer); WriteUnit(ellipsoid.AxisUnit, writer); writer.WriteEndElement(); }