public class TileBoundingBoxUtils extends Object
| Constructor and Description |
|---|
TileBoundingBoxUtils() |
| Modifier and Type | Method and Description |
|---|---|
static BoundingBox |
boundWgs84BoundingBoxWithWebMercatorLimits(BoundingBox boundingBox)
Bound the upper and lower bounds of the WGS84 bounding box with web
mercator limits
|
static BoundingBox |
getBoundingBox(BoundingBox totalBox,
long tileMatrixWidth,
long tileMatrixHeight,
long tileColumn,
long tileRow)
Get the bounding box of the tile column and row in the tile width and
height bounds using the total bounding box with constant units
|
static BoundingBox |
getBoundingBox(BoundingBox totalBox,
long tileMatrixWidth,
long tileMatrixHeight,
TileGrid tileGrid)
Get the bounding box of the tile grid in the tile width and height bounds
using the total bounding box with constant units
|
static BoundingBox |
getBoundingBox(BoundingBox totalBox,
TileMatrix tileMatrix,
long tileColumn,
long tileRow)
Get the bounding box of the tile column and row in the tile matrix using
the total bounding box with constant units
|
static BoundingBox |
getBoundingBox(BoundingBox totalBox,
TileMatrix tileMatrix,
TileGrid tileGrid)
Get the bounding box of the tile grid in the tile matrix using the total
bounding box with constant units
|
static BoundingBox |
getBoundingBox(int x,
int y,
int zoom)
Get the tile bounding box from the Google Maps API tile coordinates and
zoom level
|
static double |
getLatitudeFromPixel(long height,
BoundingBox boundingBox,
float pixel)
Get the latitude from the pixel location, bounding box, and image height
|
static double |
getLongitudeFromPixel(long width,
BoundingBox boundingBox,
float pixel)
Get the longitude from the pixel location, bounding box, and image width
|
static double |
getPixelXSize(BoundingBox webMercatorBoundingBox,
long matrixWidth,
int tileWidth)
Get the pixel x size for the bounding box with matrix width and tile
width
|
static double |
getPixelYSize(BoundingBox webMercatorBoundingBox,
long matrixHeight,
int tileHeight)
Get the pixel y size for the bounding box with matrix height and tile
height
|
static BoundingBox |
getProjectedBoundingBox(Long projectionEpsg,
int x,
int y,
int zoom)
Get the Projected tile bounding box from the Google Maps API tile
coordinates and zoom level
|
static BoundingBox |
getProjectedBoundingBox(Long projectionEpsg,
TileGrid tileGrid,
int zoom)
Get the Projected tile bounding box from the Google Maps API tile
tileGrid and zoom level
|
static BoundingBox |
getProjectedBoundingBox(Projection projection,
long x,
long y,
int zoom)
Get the Projected tile bounding box from the Google Maps API tile
coordinates and zoom level
|
static BoundingBox |
getProjectedBoundingBox(Projection projection,
TileGrid tileGrid,
int zoom)
Get the Projected tile bounding box from the Google Maps API tile grid
and zoom level
|
static long |
getTileColumn(BoundingBox totalBox,
long matrixWidth,
double longitude)
Get the tile column of the longitude in constant units
|
static TileGrid |
getTileGrid(BoundingBox webMercatorBoundingBox,
int zoom)
Get the tile grid that includes the entire tile bounding box
|
static TileGrid |
getTileGrid(BoundingBox totalBox,
long matrixWidth,
long matrixHeight,
BoundingBox boundingBox)
Get the tile grid
|
static TileGrid |
getTileGrid(Point point,
int zoom,
Projection projection)
Get the tile grid for the location specified as the projection
|
static TileGrid |
getTileGridFromWGS84(Point point,
int zoom)
Get the tile grid for the location specified as WGS84
|
static TileGrid |
getTileGridWGS84(BoundingBox boundingBox,
int zoom)
Get the tile grid that includes the entire tile bounding box
|
static long |
getTileRow(BoundingBox totalBox,
long matrixHeight,
double latitude)
Get the tile row of the latitude in constant units
|
static BoundingBox |
getWebMercatorBoundingBox(long x,
long y,
int zoom)
Get the Web Mercator tile bounding box from the Google Maps API tile
coordinates and zoom level
|
static BoundingBox |
getWebMercatorBoundingBox(TileGrid tileGrid,
int zoom)
Get the Web Mercator tile bounding box from the Google Maps API tile grid
and zoom level
|
static BoundingBox |
getWGS84BoundingBox(TileGrid tileGrid,
int zoom)
Get the WGS84 tile bounding box from the tile grid and zoom level
|
static float |
getXPixel(long width,
BoundingBox boundingBox,
double longitude)
Get the X pixel for where the longitude fits into the bounding box
|
static int |
getYAsOppositeTileFormat(int zoom,
int y)
Get the standard y tile location as TMS or a TMS y location as standard
|
static float |
getYPixel(long height,
BoundingBox boundingBox,
double latitude)
Get the Y pixel for where the latitude fits into the bounding box
|
static int |
getZoomLevel(BoundingBox webMercatorBoundingBox)
Get the zoom level of where the web mercator bounding box fits into the
complete world
|
static BoundingBox |
overlap(BoundingBox boundingBox,
BoundingBox boundingBox2)
Get the overlapping bounding box between the two bounding boxes
|
static double |
tileHeightDegrees(int tilesPerSide)
Get the tile height in degrees
|
static double |
tileSize(int tilesPerSide)
Get the tile size in meters
|
static double |
tileSizeLatPerWGS84Side(int tilesPerLat)
Get the tile height in degrees latitude
|
static double |
tileSizeLonPerWGS84Side(int tilesPerLon)
Get the tile height in degrees longitude
|
static int |
tilesPerSide(int zoom)
Get the tiles per side, width and height, at the zoom level
|
static int |
tilesPerWGS84LatSide(int zoom)
Get the tiles per latitude side at the zoom level
|
static int |
tilesPerWGS84LonSide(int zoom)
Get the tiles per longitude side at the zoom level
|
static double |
tileWidthDegrees(int tilesPerSide)
Get the tile width in degrees
|
static BoundingBox |
toWebMercator(BoundingBox boundingBox)
Convert the bounding box coordinates to a new web mercator bounding box
|
static BoundingBox |
union(BoundingBox boundingBox,
BoundingBox boundingBox2)
Get the union bounding box combining the two bounding boxes
|
static int |
zoomFromTilesPerSide(int tilesPerSide)
Get the zoom level from the tiles per side
|
static double |
zoomLevelOfTileSize(double tileSize)
Get the zoom level from the tile size in meters
|
public static BoundingBox overlap(BoundingBox boundingBox, BoundingBox boundingBox2)
boundingBox - boundingBox2 - public static BoundingBox union(BoundingBox boundingBox, BoundingBox boundingBox2)
boundingBox - boundingBox2 - public static float getXPixel(long width,
BoundingBox boundingBox,
double longitude)
width - boundingBox - longitude - public static double getLongitudeFromPixel(long width,
BoundingBox boundingBox,
float pixel)
width - boundingBox - pixel - public static float getYPixel(long height,
BoundingBox boundingBox,
double latitude)
height - boundingBox - tileRowBoundingBox - public static double getLatitudeFromPixel(long height,
BoundingBox boundingBox,
float pixel)
height - boundingBox - pixel - public static BoundingBox getBoundingBox(int x, int y, int zoom)
x - y - zoom - public static BoundingBox getWebMercatorBoundingBox(long x, long y, int zoom)
x - y - zoom - public static BoundingBox getWebMercatorBoundingBox(TileGrid tileGrid, int zoom)
x - y - zoom - public static BoundingBox getProjectedBoundingBox(Long projectionEpsg, int x, int y, int zoom)
projectionEpsg - x - y - zoom - public static BoundingBox getProjectedBoundingBox(Projection projection, long x, long y, int zoom)
projection - x - y - zoom - public static BoundingBox getProjectedBoundingBox(Long projectionEpsg, TileGrid tileGrid, int zoom)
projectionEpsg - tileGrid - zoom - public static BoundingBox getProjectedBoundingBox(Projection projection, TileGrid tileGrid, int zoom)
projection - tileGrid - zoom - public static TileGrid getTileGridFromWGS84(Point point, int zoom)
point - zoom - public static TileGrid getTileGrid(Point point, int zoom, Projection projection)
point - zoom - projection - public static TileGrid getTileGrid(BoundingBox webMercatorBoundingBox, int zoom)
webMercatorBoundingBox - zoom - public static BoundingBox toWebMercator(BoundingBox boundingBox)
boundingBox - public static double tileSize(int tilesPerSide)
tilesPerSide - public static double zoomLevelOfTileSize(double tileSize)
tileSize - tile size in meterspublic static double tileWidthDegrees(int tilesPerSide)
tilesPerSide - public static double tileHeightDegrees(int tilesPerSide)
tilesPerSide - public static int tilesPerSide(int zoom)
zoom - public static int getYAsOppositeTileFormat(int zoom,
int y)
zoom - y - public static int zoomFromTilesPerSide(int tilesPerSide)
tilesPerSide - public static TileGrid getTileGrid(BoundingBox totalBox, long matrixWidth, long matrixHeight, BoundingBox boundingBox)
totalBox - matrixWidth - matrixHeight - boundingBox - public static long getTileColumn(BoundingBox totalBox, long matrixWidth, double longitude)
totalBox - matrixWidth - longitude - in constant unitsTileMatrix.getMatrixWidth() if afterpublic static long getTileRow(BoundingBox totalBox, long matrixHeight, double latitude)
totalBox - matrixHeight - latitude - in constant unitsTileMatrix.getMatrixHeight() if afterpublic static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, long tileColumn, long tileRow)
totalBox - total bounding boxtileMatrix - tile matrixtileColumn - tile columntileRow - tile rowpublic static BoundingBox getBoundingBox(BoundingBox totalBox, long tileMatrixWidth, long tileMatrixHeight, long tileColumn, long tileRow)
totalBox - total bounding boxmatrixWidth - matrix widthmatrixHeight - matrix heighttileColumn - tile columntileRow - tile rowpublic static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, TileGrid tileGrid)
totalBox - total bounding boxtileMatrix - tile matrixtileGrid - tile gridpublic static BoundingBox getBoundingBox(BoundingBox totalBox, long tileMatrixWidth, long tileMatrixHeight, TileGrid tileGrid)
totalBox - total bounding boxtileMatrixWidth - matrix widthtileMatrixHeight - matrix heighttileGrid - tile gridpublic static int getZoomLevel(BoundingBox webMercatorBoundingBox)
webMercatorBoundingBox - public static double getPixelXSize(BoundingBox webMercatorBoundingBox, long matrixWidth, int tileWidth)
webMercatorBoundingBox - matrixWidth - tileWidth - public static double getPixelYSize(BoundingBox webMercatorBoundingBox, long matrixHeight, int tileHeight)
webMercatorBoundingBox - matrixHeight - tileHeight - public static BoundingBox boundWgs84BoundingBoxWithWebMercatorLimits(BoundingBox boundingBox)
boundingBox - wgs84 bounding boxpublic static TileGrid getTileGridWGS84(BoundingBox boundingBox, int zoom)
wgs84BoundingBox - wgs84 bounding boxzoom - zoom levelpublic static BoundingBox getWGS84BoundingBox(TileGrid tileGrid, int zoom)
tileGrid - tile gridzoom - zoompublic static int tilesPerWGS84LatSide(int zoom)
zoom - zoom levelpublic static int tilesPerWGS84LonSide(int zoom)
zoom - zoom levelpublic static double tileSizeLatPerWGS84Side(int tilesPerLat)
tilesPerLat - tiles per latitude sidepublic static double tileSizeLonPerWGS84Side(int tilesPerLon)
tilesPerLon - tiles per longitude sideCopyright © 2016 National Geospatial-Intelligence Agency. All rights reserved.