public void TestPolylineZShapeType() { double[] zValues = new double[] { 1.0, 2.0 }; double[] measures = new double[] { 0.0, 0.0 }; PolylineZShape line = new PolylineZShape(1, m_metadata, m_extent, m_parts, m_positions, 1.0, 2.0, zValues, 0.0, 0.0, measures); Assert.AreEqual(ShapeType.PolylineZ, line.ShapeType); }
public void TestPolylineZPositions() { double[] zValues = new double[] { 1.0, 2.0 }; double[] measures = new double[] { 0.0, 0.0 }; PolylineZShape line = new PolylineZShape(1, m_metadata, m_extent, m_parts, m_positions, 1.0, 2.0, zValues, 0.0, 0.0, measures); Assert.AreEqual(line[0][0], new Cartographic(0.0, 0.0, 1.0)); Assert.AreEqual(line[0][1], new Cartographic(Constants.RadiansPerDegree, Constants.RadiansPerDegree, 2.0)); }
public void TestPolylineZValues() { Rectangular[] positions = new Rectangular[] { new Rectangular(0.0, 0.0), new Rectangular(1.0, 1.0), new Rectangular(2.0, 2.0), new Rectangular(3.0, 3.0), }; double[] zValues = new double[] { 0.0, 1.0, 2.0, 3.0 }; CartographicExtent extent = new CartographicExtent(0.0, 0.0, 3.0, 3.0); int[] parts = new int[] { 0 }; double[] measures = new double[] { 0.0, 0.0, 0.0, 0.0 }; PolylineZShape polylineZShape = new PolylineZShape(0, new StringDictionary(), extent, parts, positions, 1.0, 8.0, zValues, 0.0, 0.0, measures); Polyline polyline = new Polyline(polylineZShape, m_document, Color.Blue); polyline.Write(); string result = m_stringWriter.ToString(); Assert.IsTrue(System.Text.RegularExpressions.Regex.IsMatch(result, m_polylinePattern)); }