public void TestMultiPoint()
 {
     Cartographic[] points = new[]
                                 {
                                     new Cartographic(0.0, 0.0, 0.0),
                                     new Cartographic(1.0, 1.0, 1.0),
                                     new Cartographic(2.0, 2.0, 2.0)
                                 };
     CartographicExtent extent = new CartographicExtent(0.0, 0.0, 2.0, 2.0);
     MultiPointShape multipoint = new MultiPointShape(0, m_metadata, extent, points);
     MultiPoint mp = new MultiPoint(multipoint, m_document, Color.Blue);
     mp.Write();
     string result = m_stringWriter.ToString();
     Regex pointPattern = new Regex(m_pointPattern);
     Assert.AreEqual(3, pointPattern.Matches(result).Count);
 }
 public void TestMultiPointShapeType()
 {
     MultiPointShape points = new MultiPointShape(m_recordNumber, m_metadata, m_extent, m_positions);
     Assert.AreEqual(ShapeType.MultiPoint, points.ShapeType);
 }
 public void TestMultiPointShapePosition()
 {
     MultiPointShape points = new MultiPointShape(m_recordNumber, m_metadata, m_extent, m_positions);
     Assert.AreEqual(m_positions[0], points[0]);
     Assert.AreEqual(new Cartographic(Constants.RadiansPerDegree, Constants.RadiansPerDegree, 1.0), points[1]);
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultiPoint"/> class.
 /// </summary>
 /// <param name="multipoint">A MultiPointShape object read from a shapefile.</param>
 /// <param name="document">The CzmlDocument to write to.</param>
 /// <param name="color">The points's color.</param>
 public MultiPoint(MultiPointShape multipoint, CzmlDocument document, Color color)
     : base(document, color)
 {
     m_shape = multipoint;
 }