Package mil.nga.grid.tile
Class GridTile
- java.lang.Object
-
- mil.nga.grid.tile.GridTile
-
public class GridTile extends Object
Grid Tile- Author:
- osbornb
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Bounds
getBounds()
Get the tile boundsBounds
getBounds(Unit unit)
Get the bounds in the unitsBounds
getBoundsDegrees()
Get the bounds in degreesBounds
getBoundsMeters()
Get the bounds in metersint
getHeight()
Get the tile heightPixel
getPixel(Point point)
Get the point pixel location in the tileint
getWidth()
Get the tile widthfloat
getXPixel(double longitude)
Get the longitude in meters x pixel location in the tilefloat
getYPixel(double latitude)
Get the latitude (in meters) y pixel location in the tileint
getZoom()
Get the zoom levelstatic GridTile
tile(int width, int height, int x, int y, int zoom)
Create a tilestatic GridTile
tile(int width, int height, Bounds bounds)
Create a tile
-
-
-
Constructor Detail
-
GridTile
public GridTile(int width, int height, int x, int y, int zoom)
Constructor- Parameters:
width
- tile widthheight
- tile heightx
- x coordinatey
- y coordinatezoom
- zoom level
-
GridTile
public GridTile(int width, int height, Bounds bounds)
Constructor- Parameters:
width
- tile widthheight
- tile heightbounds
- tile bounds
-
-
Method Detail
-
tile
public static GridTile tile(int width, int height, int x, int y, int zoom)
Create a tile- Parameters:
width
- tile widthheight
- tile heightx
- x coordinatey
- y coordinatezoom
- zoom level- Returns:
- tile
-
tile
public static GridTile tile(int width, int height, Bounds bounds)
Create a tile- Parameters:
width
- tile widthheight
- tile heightbounds
- tile bounds- Returns:
- tile
-
getWidth
public int getWidth()
Get the tile width- Returns:
- tile width
-
getHeight
public int getHeight()
Get the tile height- Returns:
- tile height
-
getZoom
public int getZoom()
Get the zoom level- Returns:
- zoom level
-
getBounds
public Bounds getBounds()
Get the tile bounds- Returns:
- bounds
-
getBounds
public Bounds getBounds(Unit unit)
Get the bounds in the units- Parameters:
unit
- units- Returns:
- bounds in units
-
getBoundsDegrees
public Bounds getBoundsDegrees()
Get the bounds in degrees- Returns:
- bounds in degrees
-
getBoundsMeters
public Bounds getBoundsMeters()
Get the bounds in meters- Returns:
- bounds in meters
-
getPixel
public Pixel getPixel(Point point)
Get the point pixel location in the tile- Parameters:
point
- point- Returns:
- pixel
-
getXPixel
public float getXPixel(double longitude)
Get the longitude in meters x pixel location in the tile- Parameters:
longitude
- longitude in meters- Returns:
- x pixel
-
getYPixel
public float getYPixel(double latitude)
Get the latitude (in meters) y pixel location in the tile- Parameters:
latitude
- latitude in meters- Returns:
- y pixel
-
-