protected BoundingBox padBoundingBox ( TileMatrix tileMatrix , BoundingBox boundingBox , int overlap ) { double lonPixelPadding = tileMatrix . getPixelXSize ( ) * overlap ; double latPixelPadding = tileMatrix . getPixelYSize ( ) * overlap ; BoundingBox paddedBoundingBox = new BoundingBox ( boundingBox . getMinLongitude ( ) - lonPixelPadding , boundingBox . getMinLatitude ( ) - latPixelPadding , boundingBox . getMaxLongitude ( ) + lonPixelPadding , boundingBox . getMaxLatitude ( ) + latPixelPadding ) ; return paddedBoundingBox ; }
Pad the bounding box with extra space for the overlapping pixels