public final class BingTileUtil extends Object
Modifier and Type | Method and Description |
---|---|
static ReferencedEnvelope |
getTileBoundingBox(double lon,
double lat,
int zoomLevel)
Calculates the extent of a tile, given the coordinates and a zoom level
|
static int[] |
lonLatToPixelXY(double longitude,
double latitude,
int zoomLevel)
Converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY coordinates at a specified level of detail. |
static String |
lonLatToQuadKey(double lon,
double lat,
int zoomLevel)
Finds the quadkey of a tile for a given pair of coordinates and at a given zoom level.
|
static int |
mapSize(int zoomLevel)
Determines the map width and height (in pixels) at a specified level of detail. |
static double[] |
pixelXYToLonLat(int pixelX,
int pixelY,
int zoomLevel)
Converts a pixel from pixel XY coordinates at a specified level of detail [i.e. zoom level] into latitude/longitude WGS-84 coordinates (in degrees). |
static int[] |
pixelXYToTileXY(int pixelX,
int pixelY)
Converts pixel XY coordinates into tile XY coordinates of the tile containing the specified pixel. |
static String |
tileXYToQuadKey(int tileX,
int tileY,
int zoomLevel)
Converts tile XY coordinates into a QuadKey at a specified level of detail. |
public static int[] lonLatToPixelXY(double longitude, double latitude, int zoomLevel)
Converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY coordinates at a specified level of detail.
The Term "Level of detail" is a synonym for zoom level.
longitude
- Longitude of the point, in degrees.latitude
- Latitude of the point, in degrees.zoomLevel
- The zoom level or "Level of detail", from 1 (lowest detail) to 23 (highest
detail).public static double[] pixelXYToLonLat(int pixelX, int pixelY, int zoomLevel)
Converts a pixel from pixel XY coordinates at a specified level of detail [i.e. zoom level] into latitude/longitude WGS-84 coordinates (in degrees).
Note that the X and Y coordinates of a "virtual image" that contains all tiles of a given level. They are not the coordinates of a given column or row.
pixelX
- X coordinate of the point, in pixels.pixelY
- Y coordinates of the point, in pixels.zoomLevel
- zoom level or "Level of detail", from 1 (lowest detail) to 23 (highest
detail)public static int mapSize(int zoomLevel)
Determines the map width and height (in pixels) at a specified level of detail.
zoomLevel
- Zoom level or "Level of detail", from 1 (lowest detail) to 23 (highest
detail)public static int[] pixelXYToTileXY(int pixelX, int pixelY)
Converts pixel XY coordinates into tile XY coordinates of the tile containing the specified pixel.
pixelX
- Pixel X coordinate.pixelY
- Pixel Y coordinate.public static String tileXYToQuadKey(int tileX, int tileY, int zoomLevel)
Converts tile XY coordinates into a QuadKey at a specified level of detail.
tileX
- Tile X coordinate.tileY
- Tile Y coordinate.zoomLevel
- Zoom level or "Level of detail", from 1 (lowest detail) to 23 (highest
detail)public static String lonLatToQuadKey(double lon, double lat, int zoomLevel)
lon
- The longitudelat
- The latitudezoomLevel
- The zoom levelpublic static ReferencedEnvelope getTileBoundingBox(double lon, double lat, int zoomLevel)
lon
- The longitudelat
- The latitudezoomLevel
- Copyright © 1996–2019 Geotools. All rights reserved.