public abstract class TileSystem extends Object
Modifier and Type | Field and Description |
---|---|
static double |
EarthRadius
Deprecated.
|
static double |
MaxLatitude
Deprecated.
|
static double |
MaxLongitude
Deprecated.
|
static double |
MinLatitude
Deprecated.
|
static double |
MinLongitude
Deprecated.
|
static int |
primaryKeyMaxZoomLevel
The maximum possible zoom for primary key of SQLite table is 29,
because it gives enough space for y(29bits), x(29bits) and zoom(5bits in order to code 29),
total: 63 bits used, just small enough for a `long` variable of 4 bytes
|
static int |
projectionZoomLevel |
Constructor and Description |
---|
TileSystem() |
Modifier and Type | Method and Description |
---|---|
double |
cleanLatitude(double pLatitude) |
double |
cleanLongitude(double pLongitude) |
static double |
Clip(double n,
double minValue,
double maxValue) |
static long |
Clip(long n,
long minValue,
long maxValue)
Deprecated.
|
static long |
ClipToLong(double pValue,
double pMax,
boolean pWrapEnabled) |
double |
getBoundingBoxZoom(BoundingBox pBoundingBox,
int pScreenWidth,
int pScreenHeight) |
long |
getCleanMercator(long pMercator,
double pMercatorMapSize,
boolean wrapEnabled) |
static double |
getFactor(double pZoomLevel) |
GeoPoint |
getGeoFromMercator(long pMercatorX,
long pMercatorY,
double pMapSize,
GeoPoint pReuse,
boolean horizontalWrapEnabled,
boolean verticalWrapEnabled) |
static int |
getInputTileZoomLevel(double pZoomLevel) |
double |
getLatitudeFromTileY(int pY,
int pZoom) |
abstract double |
getLatitudeFromY01(double pY01) |
double |
getLatitudeFromY01(double pY01,
boolean wrapEnabled)
Converts a "Y01" value into latitude
"Y01" is a double between 0 and 1 for the whole latitude range
MaxLatitude:0 ...
|
double |
getLatitudeZoom(double pNorth,
double pSouth,
int pScreenHeight) |
double |
getLongitudeFromTileX(int pX,
int pZoom) |
abstract double |
getLongitudeFromX01(double pX01) |
double |
getLongitudeFromX01(double pX01,
boolean wrapEnabled)
Converts a "X01" value into longitude
"X01" is a double between 0 and 1 for the whole longitude range
MinLongitude:0 ...
|
double |
getLongitudeZoom(double pEast,
double pWest,
int pScreenWidth) |
static int |
getMaximumZoomLevel() |
abstract double |
getMaxLatitude() |
abstract double |
getMaxLongitude() |
PointL |
getMercatorFromGeo(double pLatitude,
double pLongitude,
double pMapSize,
PointL pReuse,
boolean wrapEnabled) |
static long |
getMercatorFromTile(int pTile,
double pTileSize) |
long |
getMercatorFromXY01(double pXY01,
double pMapSize,
boolean wrapEnabled) |
long |
getMercatorXFromLongitude(double pLongitude,
double pMapSize,
boolean wrapEnabled) |
long |
getMercatorYFromLatitude(double pLatitude,
double pMapSize,
boolean wrapEnabled) |
abstract double |
getMinLatitude() |
abstract double |
getMinLongitude() |
double |
getRandomLatitude(double pRandom01) |
double |
getRandomLatitude(double pRandom01,
double pMinLatitude) |
double |
getRandomLongitude(double pRandom01) |
static int |
getTileFromMercator(long pMercator,
double pTileSize) |
static Rect |
getTileFromMercator(RectL pMercatorRect,
double pTileSize,
Rect pReuse) |
static int |
getTileSize() |
static double |
getTileSize(double pZoomLevel) |
int |
getTileXFromLongitude(double pLongitude,
int pZoom) |
int |
getTileYFromLatitude(double pLatitude,
int pZoom) |
abstract double |
getX01FromLongitude(double longitude)
Converts a longitude to its "X01" value,
Same as
getX01FromLongitude but without wrap |
double |
getX01FromLongitude(double longitude,
boolean wrapEnabled)
Converts a longitude to its "X01" value,
id est a double between 0 and 1 for the whole longitude range
|
double |
getXY01FromMercator(long pMercator,
double pMapSize,
boolean wrapEnabled) |
abstract double |
getY01FromLatitude(double pLatitude)
Converts a latitude to its "Y01" value,
Same as
getY01FromLatitude but without wrap |
double |
getY01FromLatitude(double latitude,
boolean wrapEnabled)
Converts a latitude to its "Y01" value,
id est a double between 0 and 1 for the whole latitude range
|
static double |
GroundResolution(double latitude,
double zoomLevel) |
static double |
GroundResolution(double latitude,
int levelOfDetail) |
static double |
GroundResolutionMapSize(double latitude,
double mapSize)
Most likely meters/pixel at the given latitude
|
boolean |
isValidLatitude(double pLatitude) |
boolean |
isValidLongitude(double pLongitude) |
PointL |
LatLongToPixelXY(double latitude,
double longitude,
double zoomLevel,
PointL reuse)
Deprecated.
|
Point |
LatLongToPixelXY(double latitude,
double longitude,
int levelOfDetail,
Point reuse)
Deprecated.
|
PointL |
LatLongToPixelXYMapSize(double latitude,
double longitude,
double mapSize,
PointL reuse)
Deprecated.
|
static double |
MapScale(double latitude,
int levelOfDetail,
int screenDpi) |
static double |
MapSize(double pZoomLevel) |
static int |
MapSize(int levelOfDetail)
Deprecated.
|
GeoPoint |
PixelXYToLatLong(int pixelX,
int pixelY,
double zoomLevel,
GeoPoint reuse)
Deprecated.
|
GeoPoint |
PixelXYToLatLong(int pixelX,
int pixelY,
int levelOfDetail,
GeoPoint reuse)
Deprecated.
|
GeoPoint |
PixelXYToLatLongMapSize(int pixelX,
int pixelY,
double mapSize,
GeoPoint reuse,
boolean horizontalWrapEnabled,
boolean verticalWrapEnabled)
Deprecated.
|
GeoPoint |
PixelXYToLatLongMapSizeWithoutWrap(int pixelX,
int pixelY,
double mapSize,
GeoPoint reuse) |
GeoPoint |
PixelXYToLatLongWithoutWrap(int pixelX,
int pixelY,
double zoomLevel,
GeoPoint reuse) |
Point |
PixelXYToTileXY(int pPixelX,
int pPixelY,
double pTileSize,
Point pReuse)
Deprecated.
|
Point |
PixelXYToTileXY(int pixelX,
int pixelY,
Point reuse)
Deprecated.
|
Rect |
PixelXYToTileXY(Rect rect,
double pTileSize,
Rect pReuse)
Deprecated.
|
static Point |
QuadKeyToTileXY(String quadKey,
Point reuse)
Use
MapTileIndex.getX(long) and MapTileIndex.getY(long) instead
Quadkey principles can be found at https://msdn.microsoft.com/en-us/library/bb259689.aspx |
static void |
setTileSize(int tileSize) |
PointL |
TileXYToPixelXY(int pTileX,
int pTileY,
double pTileSize,
PointL pReuse)
Deprecated.
|
Point |
TileXYToPixelXY(int tileX,
int tileY,
Point reuse)
Deprecated.
|
static String |
TileXYToQuadKey(int tileX,
int tileY,
int levelOfDetail)
Use
MapTileIndex.getTileIndex(int, int, int) instead
Quadkey principles can be found at https://msdn.microsoft.com/en-us/library/bb259689.aspx
Works only for zoom level >= 1 |
String |
toStringLatitudeSpan() |
String |
toStringLongitudeSpan() |
static int |
truncateToInt(long value) |
@Deprecated public static final double EarthRadius
@Deprecated public static final double MinLatitude
getMinLatitude()
instead@Deprecated public static final double MaxLatitude
getMaxLatitude()
instead@Deprecated public static final double MinLongitude
getMinLongitude()
instead@Deprecated public static final double MaxLongitude
getMaxLongitude()
insteadpublic static final int primaryKeyMaxZoomLevel
public static final int projectionZoomLevel
public static void setTileSize(int tileSize)
public static int getTileSize()
public static int getMaximumZoomLevel()
public static double getTileSize(double pZoomLevel)
public static int getInputTileZoomLevel(double pZoomLevel)
@Deprecated public static int MapSize(int levelOfDetail)
public static double MapSize(double pZoomLevel)
public static double getFactor(double pZoomLevel)
public static double GroundResolution(double latitude, int levelOfDetail)
public static double GroundResolution(double latitude, double zoomLevel)
public static double GroundResolutionMapSize(double latitude, double mapSize)
public static double MapScale(double latitude, int levelOfDetail, int screenDpi)
@Deprecated public Point LatLongToPixelXY(double latitude, double longitude, int levelOfDetail, Point reuse)
@Deprecated public PointL LatLongToPixelXY(double latitude, double longitude, double zoomLevel, PointL reuse)
getMercatorFromGeo(double, double, double, PointL, boolean)
instead@Deprecated public PointL LatLongToPixelXYMapSize(double latitude, double longitude, double mapSize, PointL reuse)
getMercatorFromGeo(double, double, double, PointL, boolean)
instead@Deprecated public GeoPoint PixelXYToLatLong(int pixelX, int pixelY, int levelOfDetail, GeoPoint reuse)
@Deprecated public GeoPoint PixelXYToLatLong(int pixelX, int pixelY, double zoomLevel, GeoPoint reuse)
getGeoFromMercator(long, long, double, GeoPoint, boolean, boolean)
insteadpublic GeoPoint PixelXYToLatLongWithoutWrap(int pixelX, int pixelY, double zoomLevel, GeoPoint reuse)
PixelXYToLatLong
but without wrappublic double getX01FromLongitude(double longitude, boolean wrapEnabled)
public double getY01FromLatitude(double latitude, boolean wrapEnabled)
public abstract double getX01FromLongitude(double longitude)
getX01FromLongitude
but without wrappublic abstract double getY01FromLatitude(double pLatitude)
getY01FromLatitude
but without wrap@Deprecated public GeoPoint PixelXYToLatLongMapSize(int pixelX, int pixelY, double mapSize, GeoPoint reuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)
getGeoFromMercator(long, long, double, GeoPoint, boolean, boolean)
insteadpublic GeoPoint PixelXYToLatLongMapSizeWithoutWrap(int pixelX, int pixelY, double mapSize, GeoPoint reuse)
PixelXYToLatLongMapSize
but without wrappublic static double Clip(double n, double minValue, double maxValue)
@Deprecated public Point PixelXYToTileXY(int pixelX, int pixelY, Point reuse)
@Deprecated public Point PixelXYToTileXY(int pPixelX, int pPixelY, double pTileSize, Point pReuse)
getTileFromMercator(long, double)
instead@Deprecated public Rect PixelXYToTileXY(Rect rect, double pTileSize, Rect pReuse)
getTileFromMercator(long, double)
instead@Deprecated public Point TileXYToPixelXY(int tileX, int tileY, Point reuse)
@Deprecated public PointL TileXYToPixelXY(int pTileX, int pTileY, double pTileSize, PointL pReuse)
getMercatorFromTile(int, double)
insteadpublic static String TileXYToQuadKey(int tileX, int tileY, int levelOfDetail)
MapTileIndex.getTileIndex(int, int, int)
instead
Quadkey principles can be found at https://msdn.microsoft.com/en-us/library/bb259689.aspx
Works only for zoom level >= 1public static Point QuadKeyToTileXY(String quadKey, Point reuse)
MapTileIndex.getX(long)
and MapTileIndex.getY(long)
instead
Quadkey principles can be found at https://msdn.microsoft.com/en-us/library/bb259689.aspxpublic double getBoundingBoxZoom(BoundingBox pBoundingBox, int pScreenWidth, int pScreenHeight)
public double getLongitudeZoom(double pEast, double pWest, int pScreenWidth)
public double getLatitudeZoom(double pNorth, double pSouth, int pScreenHeight)
public long getMercatorYFromLatitude(double pLatitude, double pMapSize, boolean wrapEnabled)
public long getMercatorXFromLongitude(double pLongitude, double pMapSize, boolean wrapEnabled)
public long getMercatorFromXY01(double pXY01, double pMapSize, boolean wrapEnabled)
public double getLatitudeFromY01(double pY01, boolean wrapEnabled)
public abstract double getLatitudeFromY01(double pY01)
public double getLongitudeFromX01(double pX01, boolean wrapEnabled)
public abstract double getLongitudeFromX01(double pX01)
public long getCleanMercator(long pMercator, double pMercatorMapSize, boolean wrapEnabled)
public static long ClipToLong(double pValue, double pMax, boolean pWrapEnabled)
@Deprecated public static long Clip(long n, long minValue, long maxValue)
public static int truncateToInt(long value)
public PointL getMercatorFromGeo(double pLatitude, double pLongitude, double pMapSize, PointL pReuse, boolean wrapEnabled)
public GeoPoint getGeoFromMercator(long pMercatorX, long pMercatorY, double pMapSize, GeoPoint pReuse, boolean horizontalWrapEnabled, boolean verticalWrapEnabled)
public double getXY01FromMercator(long pMercator, double pMapSize, boolean wrapEnabled)
public double getRandomLongitude(double pRandom01)
pRandom01
- [0,1]public double getRandomLatitude(double pRandom01, double pMinLatitude)
pRandom01
- [0,1]public double getRandomLatitude(double pRandom01)
pRandom01
- [0,1]public static int getTileFromMercator(long pMercator, double pTileSize)
public static Rect getTileFromMercator(RectL pMercatorRect, double pTileSize, Rect pReuse)
public static long getMercatorFromTile(int pTile, double pTileSize)
public abstract double getMinLatitude()
public abstract double getMaxLatitude()
public abstract double getMinLongitude()
public abstract double getMaxLongitude()
public double cleanLongitude(double pLongitude)
public double cleanLatitude(double pLatitude)
public boolean isValidLongitude(double pLongitude)
public boolean isValidLatitude(double pLatitude)
public String toStringLongitudeSpan()
public String toStringLatitudeSpan()
public int getTileXFromLongitude(double pLongitude, int pZoom)
public int getTileYFromLatitude(double pLatitude, int pZoom)
public double getLatitudeFromTileY(int pY, int pZoom)
public double getLongitudeFromTileX(int pX, int pZoom)