public void TestBufferBy() { var features = new[] { new Feature(new Point(-15, -25)), new Feature(new Point(-15, 10)), new Feature(new Point(20, 10)), new Feature(new Point(20, -25)) }; var bb = new BoundingBox(features.Select(f => f.Geometry).ToArray()).BufferBy(2); Assert.That(bb.Equals(new BoundingBox(-17, -27, 22, 12))); }
public void TestCreationByFeatures() { var features = new [] { new Feature(new Point(-15, -25)), new Feature(new Point(-15, 10)), new Feature(new Point(20, 10)), new Feature(new Point(20, -25)) }; var bb = new BoundingBox(features.Select( f => f.Geometry).ToArray()); Console.WriteLine(bb.ToString()); Assert.That(bb.Equals(new BoundingBox(-15, -25, 20, 10))); }