Package org.openstreetmap.josm.data.coor
Class QuadTiling
- java.lang.Object
-
- org.openstreetmap.josm.data.coor.QuadTiling
-
public final class QuadTiling extends java.lang.Object
This class helps in tiling the world into multiple quad tiles.
-
-
Field Summary
Fields Modifier and Type Field Description static intNR_LEVELSThe maximum number of levels to split the quadsstatic intTILES_PER_LEVELHow many tiles there are per levelstatic intTILES_PER_LEVEL_SHIFTThe log(2) of how many tiles there are per levelstatic doubleWORLD_PARTSThe number of parts the world is split into in each directionstatic intX_BIASThe offset of the world in x directionstatic intX_PARTSThe size of the world in X directionstatic intY_BIASThe offset of the world in y directionstatic intY_PARTSThe size of the world in y direction
-
Constructor Summary
Constructors Modifier Constructor Description privateQuadTiling()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byteindex(double lat, double lon, int level)Returns quad tiling index for given coordinates and level.(package private) static longlat2y(double lat)(package private) static longlon2x(double lon)static LatLontile2LatLon(long quad)Converts a tile index to a lat/lon position
-
-
-
Field Detail
-
NR_LEVELS
public static final int NR_LEVELS
The maximum number of levels to split the quads- See Also:
- Constant Field Values
-
WORLD_PARTS
public static final double WORLD_PARTS
The number of parts the world is split into in each direction- See Also:
- Constant Field Values
-
TILES_PER_LEVEL_SHIFT
public static final int TILES_PER_LEVEL_SHIFT
The log(2) of how many tiles there are per level- See Also:
- Constant Field Values
-
TILES_PER_LEVEL
public static final int TILES_PER_LEVEL
How many tiles there are per level- See Also:
- Constant Field Values
-
X_PARTS
public static final int X_PARTS
The size of the world in X direction- See Also:
- Constant Field Values
-
X_BIAS
public static final int X_BIAS
The offset of the world in x direction- See Also:
- Constant Field Values
-
Y_PARTS
public static final int Y_PARTS
The size of the world in y direction- See Also:
- Constant Field Values
-
Y_BIAS
public static final int Y_BIAS
The offset of the world in y direction- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QuadTiling
private QuadTiling()
-
-
Method Detail
-
tile2LatLon
public static LatLon tile2LatLon(long quad)
Converts a tile index to a lat/lon position- Parameters:
quad- The tile to convert- Returns:
- The lat/lon position of that tile
-
lon2x
static long lon2x(double lon)
-
lat2y
static long lat2y(double lat)
-
index
public static byte index(double lat, double lon, int level)
Returns quad tiling index for given coordinates and level.- Parameters:
lat- latitudelon- longitudelevel- level- Returns:
- quad tiling index for given coordinates and level.
- Since:
- 6171
-
-