public class TileBoundingBoxUtils extends Object
| Constructor and Description |
|---|
TileBoundingBoxUtils() |
| Modifier and Type | Method and Description |
|---|---|
static BoundingBox |
boundDegreesBoundingBoxWithWebMercatorLimits(BoundingBox boundingBox)
Bound the upper and lower bounds of the degrees bounding box with web
mercator limits
|
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 BoundingBox |
getProjectedBoundingBox(String authority,
Long code,
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(String authority,
Long code,
TileGrid tileGrid,
int zoom)
Get the Projected tile bounding box from the Google Maps API tile
tileGrid 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 - bounding box 1boundingBox2 - bounding box 2public static BoundingBox union(BoundingBox boundingBox, BoundingBox boundingBox2)
boundingBox - bounding box 1boundingBox2 - bounding box 2public static float getXPixel(long width,
BoundingBox boundingBox,
double longitude)
width - widthboundingBox - bounding boxlongitude - longitudepublic static double getLongitudeFromPixel(long width,
BoundingBox boundingBox,
float pixel)
width - widthboundingBox - bounding boxpixel - pixelpublic static float getYPixel(long height,
BoundingBox boundingBox,
double latitude)
height - heightboundingBox - bounding boxlatitude - latitudepublic static double getLatitudeFromPixel(long height,
BoundingBox boundingBox,
float pixel)
height - heightboundingBox - bounding boxpixel - pixelpublic static BoundingBox getBoundingBox(int x, int y, int zoom)
x - x coordinatey - y coordinatezoom - zoom levelpublic static BoundingBox getWebMercatorBoundingBox(long x, long y, int zoom)
x - x coordinatey - y coordinatezoom - zoom levelpublic static BoundingBox getWebMercatorBoundingBox(TileGrid tileGrid, int zoom)
tileGrid - tile gridzoom - zoom levelpublic static BoundingBox getProjectedBoundingBox(Long projectionEpsg, int x, int y, int zoom)
projectionEpsg - projection epsgx - x coordinatey - y coordinatezoom - zoom levelpublic static BoundingBox getProjectedBoundingBox(String authority, Long code, int x, int y, int zoom)
authority - projection authoritycode - projection codex - x coordinatey - y coordinatezoom - zoom levelpublic static BoundingBox getProjectedBoundingBox(Projection projection, long x, long y, int zoom)
projection - projectionx - x coordinatey - y coordinatezoom - zoom levelpublic static BoundingBox getProjectedBoundingBox(Long projectionEpsg, TileGrid tileGrid, int zoom)
projectionEpsg - projection epsgtileGrid - tile gridzoom - zoom levelpublic static BoundingBox getProjectedBoundingBox(String authority, Long code, TileGrid tileGrid, int zoom)
authority - projection authoritycode - projection codetileGrid - tile gridzoom - zoom levelpublic static BoundingBox getProjectedBoundingBox(Projection projection, TileGrid tileGrid, int zoom)
projection - projectiontileGrid - tile gridzoom - zoom levelpublic static TileGrid getTileGridFromWGS84(Point point, int zoom)
point - pointzoom - zoom levelpublic static TileGrid getTileGrid(Point point, int zoom, Projection projection)
point - pointzoom - zoom levelprojection - projectionpublic static TileGrid getTileGrid(BoundingBox webMercatorBoundingBox, int zoom)
webMercatorBoundingBox - web mercator bounding boxzoom - zoom levelpublic static BoundingBox toWebMercator(BoundingBox boundingBox)
boundingBox - bounding boxpublic static double tileSize(int tilesPerSide)
tilesPerSide - tiles per sidepublic static double zoomLevelOfTileSize(double tileSize)
tileSize - tile size in meterspublic static double tileWidthDegrees(int tilesPerSide)
tilesPerSide - tiles per sidepublic static double tileHeightDegrees(int tilesPerSide)
tilesPerSide - tiles per sidepublic static int tilesPerSide(int zoom)
zoom - zoom levelpublic static int getYAsOppositeTileFormat(int zoom,
int y)
zoom - zoom levely - y coordinatepublic static int zoomFromTilesPerSide(int tilesPerSide)
tilesPerSide - tiles per sidepublic static TileGrid getTileGrid(BoundingBox totalBox, long matrixWidth, long matrixHeight, BoundingBox boundingBox)
totalBox - total bounding boxmatrixWidth - matrix widthmatrixHeight - matrix heightboundingBox - bounding boxpublic static long getTileColumn(BoundingBox totalBox, long matrixWidth, double longitude)
totalBox - total bounding boxmatrixWidth - matrix widthlongitude - in constant unitsTileMatrix.getMatrixWidth() if afterpublic static long getTileRow(BoundingBox totalBox, long matrixHeight, double latitude)
totalBox - total bounding boxmatrixHeight - matrix heightlatitude - 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 boxtileMatrixWidth - matrix widthtileMatrixHeight - 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 - web mercator bounding boxpublic static double getPixelXSize(BoundingBox webMercatorBoundingBox, long matrixWidth, int tileWidth)
webMercatorBoundingBox - web mercator bounding boxmatrixWidth - matrix widthtileWidth - tile widthpublic static double getPixelYSize(BoundingBox webMercatorBoundingBox, long matrixHeight, int tileHeight)
webMercatorBoundingBox - web mercator bounding boxmatrixHeight - matrix heighttileHeight - tile heightpublic static BoundingBox boundWgs84BoundingBoxWithWebMercatorLimits(BoundingBox boundingBox)
boundingBox - wgs84 bounding boxpublic static BoundingBox boundDegreesBoundingBoxWithWebMercatorLimits(BoundingBox boundingBox)
boundingBox - degrees bounding boxpublic static TileGrid getTileGridWGS84(BoundingBox boundingBox, int zoom)
boundingBox - 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 © 2017 National Geospatial-Intelligence Agency. All rights reserved.