public void TileSchemaWithExtentThatDoesNotStartInOriginShouldReturnNoTiles() { // arrange var schema = new WkstNederlandSchema { Extent = new Extent(187036, 331205, 187202, 331291) }; var mapExtent = new Extent(187256.999043765, 331197.712996388, 187437.576002535, 331303.350517269); // act var tileInfos = schema.GetTileInfos(mapExtent, 14); // assert Assert.AreEqual(tileInfos.Count(), 0); }
public void TileSchemaWithExtentThatDoesOriginateInOriginAndWithInverteYShouldReturnCorrectNumberOfTiles() { // arrange var schemaExtent = new Extent(187009, 331184, 187189, 331290); var schema = new WkstNederlandSchema { Extent = schemaExtent, OriginY = -22598.080, YAxis = YAxis.OSM }; var requestExtent = GrowExtent(schemaExtent, schemaExtent.Width); // act var tileInfos = schema.GetTileInfos(requestExtent, 14); // assert Assert.True(TilesWithinEnvelope(tileInfos, schemaExtent)); Assert.True(Math.Abs(TileAreaWithinEnvelope(tileInfos, schemaExtent) - schemaExtent.Area) < Epsilon); }