Class QuadTiling


  • public final class QuadTiling
    extends Object
    This class helps in tiling the world into multiple quad tiles.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NR_LEVELS
      The maximum number of levels to split the quads
      static int TILES_PER_LEVEL
      How many tiles there are per level
      static int TILES_PER_LEVEL_SHIFT
      The log(2) of how many tiles there are per level
      static double WORLD_PARTS
      The number of parts the world is split into in each direction
      static int X_BIAS
      The offset of the world in x direction
      static int X_PARTS
      The size of the world in X direction
      static int Y_BIAS
      The offset of the world in y direction
      static int Y_PARTS
      The size of the world in y direction
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private QuadTiling()  
    • Method Detail

      • tile2LatLon

        public static LatLon tile2LatLon​(long quad)
        Converts a tile index to a lat/lon position
        Parameters:
        quad - The tile to convert
        Returns:
        The lat/lon position of that tile
      • lon2x

        static long lon2x​(double lon)
      • lat2y

        static long lat2y​(double lat)
      • index

        public static byte index​(double lat,
                                 double lon,
                                 int level)
        Returns quad tiling index for given coordinates and level.
        Parameters:
        lat - latitude
        lon - longitude
        level - level
        Returns:
        quad tiling index for given coordinates and level.
        Since:
        6171