- All Implemented Interfaces:
- LatLon, java.io.Serializable
public class Fixed1E7LatLon
extends java.lang.Object
implements LatLon, java.io.Serializable
A geo position (without height) implemented using two fixed 1E7 integers, meaning that the
maximum precision is limited to 7 decimal points. This is exactly the maximum precision the
positions are saved in the OSM database.
This saves 8 byte per coordinate from an implementation based on doubles, but every access
involves a division operation. If the goal is to save disk space, rather just serialize a latlon
with two integers instead. This implementation should only be chosen if the goal is to save RAM
space but CPU is not the bottleneck.
- See Also:
- Serialized Form