public void KmlReadGeometryv2_0() { // initialize the geometry source. KmlGeoStreamSource kmlSource = new KmlGeoStreamSource( Assembly.GetExecutingAssembly().GetManifestResourceStream("OsmSharp.Test.Unittests.test.v2.0.kml")); // pull all the objects from the stream into the given collection. GeometryCollection kmlCollection = new GeometryCollection(kmlSource); List <Geometry> geometries = new List <Geometry>(kmlCollection); // test collection contents. Assert.AreEqual(1, geometries.Count); Assert.IsInstanceOf(typeof(Point), geometries[0]); }
public void KmlReadGeometryv2_1() { // initialize the geometry source. KmlGeoStreamSource kmlSource = new KmlGeoStreamSource( Assembly.GetExecutingAssembly().GetManifestResourceStream("OsmSharp.Test.Unittests.test.v2.1.kml")); // pull all the objects from the stream into the given collection. GeometryCollection kmlCollection = new GeometryCollection(kmlSource); List <Geometry> geometries = new List <Geometry>(kmlCollection); // test collection contents. Assert.AreEqual(23, geometries.Count); Assert.IsInstanceOf(typeof(LineString), geometries[0]); Assert.IsInstanceOf(typeof(LineString), geometries[1]); Assert.IsInstanceOf(typeof(LineString), geometries[2]); Assert.IsInstanceOf(typeof(LineString), geometries[3]); Assert.IsInstanceOf(typeof(LineString), geometries[4]); Assert.IsInstanceOf(typeof(LineString), geometries[5]); Assert.IsInstanceOf(typeof(LineString), geometries[6]); Assert.IsInstanceOf(typeof(LineString), geometries[7]); Assert.IsInstanceOf(typeof(LineString), geometries[8]); Assert.IsInstanceOf(typeof(LineString), geometries[9]); Assert.IsInstanceOf(typeof(LineString), geometries[10]); Assert.IsInstanceOf(typeof(LineString), geometries[11]); Assert.IsInstanceOf(typeof(LineString), geometries[12]); Assert.IsInstanceOf(typeof(LineString), geometries[13]); Assert.IsInstanceOf(typeof(LineString), geometries[14]); Assert.IsInstanceOf(typeof(LineString), geometries[15]); Assert.IsInstanceOf(typeof(LineString), geometries[16]); Assert.IsInstanceOf(typeof(LineString), geometries[17]); Assert.IsInstanceOf(typeof(LineString), geometries[18]); Assert.IsInstanceOf(typeof(LineString), geometries[19]); Assert.IsInstanceOf(typeof(LineString), geometries[20]); Assert.IsInstanceOf(typeof(LineString), geometries[21]); Assert.IsInstanceOf(typeof(LineString), geometries[22]); }