Package mil.nga.geopackage.tiles
Class TileUtils
java.lang.Object
mil.nga.geopackage.tiles.TileUtils
Tile utilities and constants
- Since:
- 3.2.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final float
High density scalestatic final int
Displayed device-independent pixelsstatic final int
Tile pixels for default dpi tilesstatic final int
Tile pixels for high dpi tiles -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 dimensionsstatic 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 dimensionsstatic int
tileLength
(float density) Get the tile side (width and height) dimension based upon the display density scale
-
Field Details
-
TILE_DP
public static final int TILE_DPDisplayed device-independent pixels- See Also:
-
TILE_PIXELS_DEFAULT
public static final int TILE_PIXELS_DEFAULTTile pixels for default dpi tiles- See Also:
-
TILE_PIXELS_HIGH
public static final int TILE_PIXELS_HIGHTile pixels for high dpi tiles- See Also:
-
HIGH_DENSITY
public static final float HIGH_DENSITYHigh 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 widthtileHeight
- 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 widthtileHeight
- 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
-