Package org.openstreetmap.josm.data.gpx
Class GpxTrackSegment
- java.lang.Object
-
- org.openstreetmap.josm.data.gpx.WithAttributes
-
- org.openstreetmap.josm.data.gpx.GpxTrackSegment
-
- All Implemented Interfaces:
GpxConstants,IGpxTrackSegment,IWithAttributes
public class GpxTrackSegment extends WithAttributes implements IGpxTrackSegment
A gpx track segment consisting of multiple waypoints.- Since:
- 15496
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.data.gpx.GpxConstants
GpxConstants.ColorFormat
-
-
Field Summary
Fields Modifier and Type Field Description private Boundsboundsprivate doublelengthprivate java.util.List<WayPoint>wayPoints-
Fields inherited from class org.openstreetmap.josm.data.gpx.WithAttributes
attr
-
Fields inherited from interface org.openstreetmap.josm.data.gpx.GpxConstants
EXTENSION_ABBREVIATIONS, FIX_VALUES, GARMIN_COLORS, GPX_CMT, GPX_DESC, GPX_NAME, GPX_PREFIX, GPX_SRC, JOSM_CREATOR_NAME, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_BOUNDS, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, META_KEYWORDS, META_LINKS, META_NAME, META_PREFIX, META_TIME, PT_AGEOFDGPSDATA, PT_COURSE, PT_DGPSID, PT_ELE, PT_FIX, PT_GEOIDHEIGHT, PT_HDOP, PT_MAGVAR, PT_PDOP, PT_SAT, PT_STD_HDEV, PT_STD_VDEV, PT_SYM, PT_TIME, PT_TYPE, PT_VDOP, RTE_TRK_KEYS, RTKLIB_AGE, RTKLIB_Q, RTKLIB_RATIO, RTKLIB_SDE, RTKLIB_SDEU, RTKLIB_SDN, RTKLIB_SDNE, RTKLIB_SDU, RTKLIB_SDUN, WPT_KEYS, XML_URI_EXTENSIONS_DRAWING, XML_URI_EXTENSIONS_GARMIN, XML_URI_EXTENSIONS_JOSM, XML_URI_XSD, XML_XSD_EXTENSIONS_DRAWING, XML_XSD_EXTENSIONS_GARMIN, XML_XSD_EXTENSIONS_JOSM
-
-
Constructor Summary
Constructors Constructor Description GpxTrackSegment(java.util.Collection<WayPoint> wayPoints)Constructs a newGpxTrackSegment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private BoundscalculateBounds()private doublecalculateLength()booleanequals(java.lang.Object obj)BoundsgetBounds()Returns the segment bounds.intgetUpdateCount()Returns the number of times this track has been changedjava.util.Collection<WayPoint>getWayPoints()Returns the segment waypoints.inthashCode()doublelength()Returns the segment length.-
Methods inherited from class org.openstreetmap.josm.data.gpx.WithAttributes
get, getAttributes, getCollection, getExtensions, getString, hasExtensions, put
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.gpx.IWithAttributes
get, getAttributes, getCollection, getExtensions, getString, hasExtensions, put
-
-
-
-
Constructor Detail
-
GpxTrackSegment
public GpxTrackSegment(java.util.Collection<WayPoint> wayPoints)
Constructs a newGpxTrackSegment.- Parameters:
wayPoints- list of waypoints
-
-
Method Detail
-
calculateBounds
private Bounds calculateBounds()
-
calculateLength
private double calculateLength()
-
getBounds
public Bounds getBounds()
Description copied from interface:IGpxTrackSegmentReturns the segment bounds.- Specified by:
getBoundsin interfaceIGpxTrackSegment- Returns:
- the segment bounds
-
getWayPoints
public java.util.Collection<WayPoint> getWayPoints()
Description copied from interface:IGpxTrackSegmentReturns the segment waypoints.- Specified by:
getWayPointsin interfaceIGpxTrackSegment- Returns:
- the segment waypoints
-
length
public double length()
Description copied from interface:IGpxTrackSegmentReturns the segment length.- Specified by:
lengthin interfaceIGpxTrackSegment- Returns:
- the segment length
-
getUpdateCount
public int getUpdateCount()
Description copied from interface:IGpxTrackSegmentReturns the number of times this track has been changed- Specified by:
getUpdateCountin interfaceIGpxTrackSegment- Returns:
- Number of times this track has been changed. Always 0 for read-only segments
-
hashCode
public int hashCode()
- Overrides:
hashCodein classWithAttributes
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classWithAttributes
-
-