org.openstreetmap.osmosis.core.util
Class TileCalculator
java.lang.Object
org.openstreetmap.osmosis.core.util.TileCalculator
public class TileCalculator
- extends java.lang.Object
Calculates a tile index based upon coordinate values. Note that this class
returns a signed integer due to the lack of an unsigned integer type in java.
The result is a 32-bit unsigned integer but stored in a long value for ease
of use.
The result can be cast directly to an int, but converting back to an unsigned
long value must be performed like:
long tile = intTile & 0xFFFFFFFFl;
- Author:
- Brett Henderson
Method Summary |
long |
calculateTile(double latitude,
double longitude)
Calculates a tile index based upon the supplied coordinates. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TileCalculator
public TileCalculator()
calculateTile
public long calculateTile(double latitude,
double longitude)
- Calculates a tile index based upon the supplied coordinates.
- Parameters:
latitude
- The coordinate latitude.longitude
- The coordinate longitude.
- Returns:
- The tile index value.