public void TestSerialization() { var tester = new SpatialIndexTester { SpatialIndex = new Quadtree<object>() }; tester.Init(); Console.WriteLine("\n\nTest with original data\n"); tester.Run(); var tree1 = (Quadtree<object>)tester.SpatialIndex; var data = SerializationUtility.Serialize(tree1); var tree2 = SerializationUtility.Deserialize<Quadtree<object>>(data); tester.SpatialIndex = tree2; Console.WriteLine("\n\nTest with deserialized data\n"); tester.Run(); Assert.IsTrue(tester.IsSuccess); }
public void TestSpatialIndex() { var tester = new SpatialIndexTester { SpatialIndex = new Quadtree<object>() }; tester.Init(); tester.Run(); Assert.IsTrue(tester.IsSuccess); }
public void TestSpatialIndex() { var tester = new SpatialIndexTester { SpatialIndex = new STRtree(4) }; tester.Init(); tester.Run(); Assert.IsTrue(tester.IsSuccess); }
public void TestSerialization() { var tester = new SpatialIndexTester { SpatialIndex = new STRtree(4) }; tester.Init(); Console.WriteLine("\n\nTest with original data\n"); tester.Run(); var tree1 = (STRtree)tester.SpatialIndex; // create the index before serialization tree1.Query(new Envelope()); var data = SerializationUtility.Serialize(tree1); var tree2 = SerializationUtility.Deserialize<STRtree>(data); tester.SpatialIndex = tree2; Console.WriteLine("\n\nTest with deserialized data\n"); tester.Run(); tester.Run(); Assert.IsTrue(tester.IsSuccess); }
public void TestSpatialIndex() { var tester = new SpatialIndexTester { SpatialIndex = new Quadtree <object>() }; tester.Init(); tester.Run(); Assert.IsTrue(tester.IsSuccess); }
public void TestSerialization() { var tester = new SpatialIndexTester { SpatialIndex = new Quadtree <object>() }; tester.Init(); Console.WriteLine("\n\nTest with original data\n"); tester.Run(); var tree1 = (Quadtree <object>)tester.SpatialIndex; var data = SerializationUtility.Serialize(tree1); var tree2 = SerializationUtility.Deserialize <Quadtree <object> >(data); tester.SpatialIndex = tree2; Console.WriteLine("\n\nTest with deserialized data\n"); tester.Run(); Assert.IsTrue(tester.IsSuccess); }