Package org.openstreetmap.josm.data.coor
Interface ILatLon
-
- All Known Subinterfaces:
INode
- All Known Implementing Classes:
AudioMarker
,ButtonMarker
,CachedLatLon
,ImageMarker
,LatLon
,Marker
,Node
,NodeData
,PlayHeadMarker
,VectorNode
,WayPoint
,WebMarker
public interface ILatLon
This interface represents a coordinate in LatLon space.It provides methods to get the coordinates. The coordinates may be unknown. In this case, both
lat()
andlon()
need to return a NaN value andisLatLonKnown()
needs to return false.Whether the coordinates are immutable or not is implementation specific.
- Since:
- 12161
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default EastNorth
getEastNorth(Projecting projecting)
Replies the projected east/north coordinates.default boolean
isLatLonKnown()
Determines if this object has valid coordinates.double
lat()
Returns the latitude, i.e., the north-south position in degrees.double
lon()
Returns the longitude, i.e., the east-west position in degrees.
-
-
-
Method Detail
-
lon
double lon()
Returns the longitude, i.e., the east-west position in degrees.- Returns:
- the longitude or NaN if
isLatLonKnown()
returns false
-
lat
double lat()
Returns the latitude, i.e., the north-south position in degrees.- Returns:
- the latitude or NaN if
isLatLonKnown()
returns false
-
isLatLonKnown
default boolean isLatLonKnown()
Determines if this object has valid coordinates.- Returns:
true
if this object has valid coordinates
-
getEastNorth
default EastNorth getEastNorth(Projecting projecting)
Replies the projected east/north coordinates.The result of the last conversion may be cached. Null is returned in case this object is invalid.
- Parameters:
projecting
- The projection to use.- Returns:
- The projected east/north coordinates
- Since:
- 10827
-
-