org.openstreetmap.josm.data.gpx
Class WayPoint

java.lang.Object
  extended by org.openstreetmap.josm.data.gpx.WithAttributes
      extended by org.openstreetmap.josm.data.gpx.WayPoint
All Implemented Interfaces:
java.lang.Comparable<WayPoint>, TemplateEngineDataProvider

public class WayPoint
extends WithAttributes
implements java.lang.Comparable<WayPoint>, TemplateEngineDataProvider


Field Summary
 java.awt.Color customColoring
           
private static java.lang.ThreadLocal<PrimaryDateParser> dateParser
           
 int dir
           
 boolean drawLine
           
private  double east
           
private  double lat
           
private  double lon
           
private  double north
           
 double time
           
 
Fields inherited from class org.openstreetmap.josm.data.gpx.WithAttributes
attr
 
Constructor Summary
WayPoint(LatLon ll)
           
WayPoint(WayPoint p)
           
 
Method Summary
 int compareTo(WayPoint w)
           
 boolean evaluateCondition(SearchCompiler.Match condition)
           
 LatLon getCoor()
           
 EastNorth getEastNorth()
          Replies the projected east/north coordinates.
 java.util.List<java.lang.String> getTemplateKeys()
           
 java.lang.Object getTemplateValue(java.lang.String name, boolean special)
           
 java.util.Date getTime()
           
 void invalidateEastNorthCache()
          Invalidate the internal cache of east/north coordinates.
 void setTime()
          Convert the time stamp of the waypoint into seconds from the epoch
 java.lang.String toString()
           
 
Methods inherited from class org.openstreetmap.josm.data.gpx.WithAttributes
getString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dateParser

private static java.lang.ThreadLocal<PrimaryDateParser> dateParser

time

public double time

customColoring

public java.awt.Color customColoring

drawLine

public boolean drawLine

dir

public int dir

lat

private double lat

lon

private double lon

east

private double east

north

private double north
Constructor Detail

WayPoint

public WayPoint(WayPoint p)

WayPoint

public WayPoint(LatLon ll)
Method Detail

invalidateEastNorthCache

public void invalidateEastNorthCache()
Invalidate the internal cache of east/north coordinates.


getCoor

public final LatLon getCoor()

getEastNorth

public final EastNorth getEastNorth()

Replies the projected east/north coordinates.

Uses the global projection to project the lan/lon-coordinates. Internally caches the projected coordinates.

Caveat: doesn't listen to projection changes. Clients must trigger a reprojection or invalidate the internal cache.

Returns:
the east north coordinates or null
See Also:
invalidateEastNorthCache()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setTime

public void setTime()
Convert the time stamp of the waypoint into seconds from the epoch


compareTo

public int compareTo(WayPoint w)
Specified by:
compareTo in interface java.lang.Comparable<WayPoint>

getTime

public java.util.Date getTime()

getTemplateValue

public java.lang.Object getTemplateValue(java.lang.String name,
                                         boolean special)
Specified by:
getTemplateValue in interface TemplateEngineDataProvider

evaluateCondition

public boolean evaluateCondition(SearchCompiler.Match condition)
Specified by:
evaluateCondition in interface TemplateEngineDataProvider

getTemplateKeys

public java.util.List<java.lang.String> getTemplateKeys()
Specified by:
getTemplateKeys in interface TemplateEngineDataProvider


JOSM