Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void TileSchemaWithExtentThatDoesOriginateInOriginShouldReturnCorrectNumberOfTiles()
        {
            // arrange
            var schemaExtent = new Extent(187009, 331184, 187189, 331290);
            var schema = new WkstNederlandSchema { Extent = schemaExtent, OriginY = -100000 };
            var requestExtent = GrowExtent(schemaExtent, schemaExtent.Width);

            // act
            var tileInfos = schema.GetTileInfos(requestExtent, "14").ToList();

            // assert
            Assert.True(TilesWithinEnvelope(tileInfos, schemaExtent));
            Assert.True(Math.Abs(TileAreaWithinEnvelope(tileInfos, schemaExtent) - schemaExtent.Area) < Epsilon);
        }