Class TileUtils

java.lang.Object
mil.nga.geopackage.tiles.TileUtils

public class TileUtils extends Object
Tile utilities and constants
Since:
3.2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final float
    High density scale
    static final int
    Displayed device-independent pixels
    static final int
    Tile pixels for default dpi tiles
    static final int
    Tile pixels for high dpi tiles
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static float
    density(int tileLength)
    Get the density based upon the tile length (width or height)
    static float
    density(int tileWidth, int tileHeight)
    Get the density based upon the tile dimensions
    static float
    tileDensity(float density, int tileLength)
    Get the tile density based upon the display density scale and tile length (width or height)
    static float
    tileDensity(float density, int tileWidth, int tileHeight)
    Get the tile density based upon the display density scale and tile dimensions
    static int
    tileLength(float density)
    Get the tile side (width and height) dimension based upon the display density scale

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TILE_DP

      public static final int TILE_DP
      Displayed device-independent pixels
      See Also:
    • TILE_PIXELS_DEFAULT

      public static final int TILE_PIXELS_DEFAULT
      Tile pixels for default dpi tiles
      See Also:
    • TILE_PIXELS_HIGH

      public static final int TILE_PIXELS_HIGH
      Tile pixels for high dpi tiles
      See Also:
    • HIGH_DENSITY

      public static final float HIGH_DENSITY
      High density scale
      See Also:
  • Constructor Details

    • TileUtils

      public TileUtils()
  • Method Details

    • tileLength

      public static int tileLength(float density)
      Get the tile side (width and height) dimension based upon the display density scale
      Parameters:
      density - display density: DisplayMetrics.density
      Returns:
      default tile length
    • tileDensity

      public static float tileDensity(float density, int tileWidth, int tileHeight)
      Get the tile density based upon the display density scale and tile dimensions
      Parameters:
      density - display density: DisplayMetrics.density
      tileWidth - tile width
      tileHeight - tile height
      Returns:
      tile density
    • tileDensity

      public static float tileDensity(float density, int tileLength)
      Get the tile density based upon the display density scale and tile length (width or height)
      Parameters:
      density - display density: DisplayMetrics.density
      tileLength - tile length (width or height)
      Returns:
      tile density
    • density

      public static float density(int tileWidth, int tileHeight)
      Get the density based upon the tile dimensions
      Parameters:
      tileWidth - tile width
      tileHeight - tile height
      Returns:
      density
    • density

      public static float density(int tileLength)
      Get the density based upon the tile length (width or height)
      Parameters:
      tileLength - tile length (width or height)
      Returns:
      density