Package org.openstreetmap.josm.data.coor
Class QuadTiling
java.lang.Object
org.openstreetmap.josm.data.coor.QuadTiling
This class helps in tiling the world into multiple quad tiles.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum number of levels to split the quadsstatic final intHow many tiles there are per levelstatic final intThe log(2) of how many tiles there are per levelstatic final doubleThe number of parts the world is split into in each directionstatic final intThe offset of the world in x directionstatic final intThe size of the world in X directionstatic final intThe offset of the world in y directionstatic final intThe size of the world in y direction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
NR_LEVELS
The maximum number of levels to split the quads- See Also:
-
WORLD_PARTS
The number of parts the world is split into in each direction- See Also:
-
TILES_PER_LEVEL_SHIFT
The log(2) of how many tiles there are per level- See Also:
-
TILES_PER_LEVEL
How many tiles there are per level- See Also:
-
X_PARTS
The size of the world in X direction- See Also:
-
X_BIAS
The offset of the world in x direction- See Also:
-
Y_PARTS
The size of the world in y direction- See Also:
-
Y_BIAS
The offset of the world in y direction- See Also:
-
-
Constructor Details
-
QuadTiling
private QuadTiling()
-
-
Method Details
-
tile2LatLon
Converts a tile index to a lat/lon position- Parameters:
quad- The tile to convert- Returns:
- The lat/lon position of that tile
-
lon2x
-
lat2y
-
index
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
-