Package org.openstreetmap.josm.data.coor
Class CachedLatLon
java.lang.Object
org.openstreetmap.josm.data.coor.Coordinate
org.openstreetmap.josm.data.coor.LatLon
org.openstreetmap.josm.data.coor.CachedLatLon
- All Implemented Interfaces:
Serializable,ILatLon
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:
-
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.data.coor.LatLon
cDdFormatter, cDdHighPrecisionFormatter, MAX_SERVER_INV_PRECISION, MAX_SERVER_PRECISION, NORTH_POLE, SOUTH_POLE, ZEROFields inherited from class org.openstreetmap.josm.data.coor.Coordinate
x, y -
Constructor Summary
ConstructorsModifierConstructorDescriptionCachedLatLon(double lat, double lon) Constructs a newCachedLatLon.CachedLatLon(EastNorth eastNorth) Constructs a newCachedLatLon.privateCachedLatLon(EastNorth eastNorth, Projection projection) CachedLatLon(LatLon coor) Constructs a newCachedLatLon. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal EastNorthgetEastNorth(Projecting projecting) Replies the projected east/north coordinates.inthashCode()toString()Methods inherited from class org.openstreetmap.josm.data.coor.LatLon
distance, distanceSq, getCenter, getRoundedToOsmPrecision, interpolate, isIn, isValid, isValidLat, isValidLon, isWithin, lat, lon, normalizeLon, roundToOsmPrecision, toDisplayString, toIntervalLat, toIntervalLonMethods inherited from class org.openstreetmap.josm.data.coor.Coordinate
distance, distance, distanceSq, distanceSq, getX, getYMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.data.coor.ILatLon
bearing, distanceSq, distanceSq, equalsEpsilon, equalsEpsilon, greatCircleDistance, interpolate, isLatLonKnown
-
Field Details
-
serialVersionUID
- See Also:
-
eastNorth
-
cacheKey
-
-
Constructor Details
-
CachedLatLon
Constructs a newCachedLatLon.- Parameters:
lat- latitudelon- longitude
-
CachedLatLon
Constructs a newCachedLatLon.- Parameters:
coor- lat/lon
-
CachedLatLon
Constructs a newCachedLatLon.- Parameters:
eastNorth- easting/northing
-
CachedLatLon
-
-
Method Details
-
getEastNorth
Replies the projected east/north coordinates.- Parameters:
projecting- The projection to use.- Returns:
- the internally cached east/north coordinates. null, if the globally defined projection is null
-
hashCode
-
equals
-
toString
-