org.openstreetmap.josm.data.coor
Class CachedLatLon
java.lang.Object
java.awt.geom.Point2D
org.openstreetmap.josm.data.coor.Coordinate
org.openstreetmap.josm.data.coor.LatLon
org.openstreetmap.josm.data.coor.CachedLatLon
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class CachedLatLon
- extends LatLon
LatLon class that maintains a cache of projected EastNorth coordinates.
This class is convenient to use, but has relatively high memory costs.
It keeps a pointer to the last known projection in order to detect projection
changes.
Node and WayPoint have another, optimized, cache for projected coordinates.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Fields inherited from class org.openstreetmap.josm.data.coor.Coordinate |
x, y |
Methods inherited from class org.openstreetmap.josm.data.coor.LatLon |
dm, dms, equals, equalsEpsilon, getCenter, getRoundedToOsmPrecision, getRoundedToOsmPrecisionStrict, greatCircleDistance, hashCode, heading, interpolate, isOutSideWorld, isValid, isValidLat, isValidLon, isWithin, lat, latToString, lon, lonToString, roundToOsmPrecision, roundToOsmPrecisionStrict, toDisplayString, toIntervalLat, toIntervalLon |
Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, setLocation |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
eastNorth
private EastNorth eastNorth
proj
private Projection proj
CachedLatLon
public CachedLatLon(double lat,
double lon)
CachedLatLon
public CachedLatLon(LatLon coor)
CachedLatLon
public CachedLatLon(EastNorth eastNorth)
setCoor
public final void setCoor(LatLon coor)
setEastNorth
public final void setEastNorth(EastNorth eastNorth)
getEastNorth
public final EastNorth getEastNorth()
- Replies the projected east/north coordinates.
- Returns:
- the internally cached east/north coordinates. null, if the globally defined projection is null
toString
public java.lang.String toString()
- Overrides:
toString
in class LatLon
getProjection
public Projection getProjection()
JOSM