Class TileUtil



  • public class TileUtil
    extends Object
    • Constructor Detail

      • TileUtil

        public TileUtil()
    • Method Detail

      • getBoundingBox

        public static BBox getBoundingBox(Tile tile)
        Get the bounding box that the given tile covers.
        Parameters:
        tile - the tile to compute a bounding box for.
        Returns:
        a BBox instance.
      • getBoundingBox

        public static BBox getBoundingBox(double txStart,
                                          double txEnd,
                                          double tyStart,
                                          double tyEnd,
                                          int zoom)
        Get the bounding box that is covered by the given tile coordinates. Fractional tile-numbers are possible here to allow the computation of bounding boxes across partly covered tiles.
        Parameters:
        txStart - the start of the box in fractional tile-coordinates.
        txEnd - the end of the box in fractional tile-coordinates.
        tyStart - the start of the box in fractional tile-coordinates.
        tyEnd - the end of the box in fractional tile-coordinates.
        zoom - the zoom level the tile coordinates are to be resolved on
        Returns:
        a BBox instance.
      • isValid

        public static boolean isValid(Tile tile)
        Check if a tile is valid, i.e. its coordinates are within the range [0..2^zoom].
        Parameters:
        tile - the tile to check
        Returns:
        whether the specified tile is valid.