public class WaypointGroup extends GPXObject
Modifier and Type | Class and Description |
---|---|
static class |
WaypointGroup.EleCleansedStatus
Status messages returned to the calling class after an elevation cleanse request.
A "cleanse" is an attempt to fill in any data that was missing from the server's response (SRTM voids). |
static class |
WaypointGroup.EleCorrectedStatus
Status messages returned to the calling class after an elevation correction request.
A "correction" is an attempt to replace all elevation data with SRTM data from the server. |
static class |
WaypointGroup.WptGrpType
The different types of
WaypointGroup . |
Modifier and Type | Field and Description |
---|---|
private java.util.List<Waypoint> |
waypoints |
private WaypointGroup.WptGrpType |
wptGrpType |
color, desc, duration, eleEndFeet, eleEndMeters, eleMaxFeet, eleMaxMeters, eleMinFeet, eleMinMeters, eleStartFeet, eleStartMeters, fallTime, grossFallFeet, grossFallMeters, grossRiseFeet, grossRiseMeters, lengthMeters, lengthMiles, maxLat, maxLon, maxSpeedKmph, maxSpeedMph, minLat, minLon, name, riseTime, visible, wptsVisible
Constructor and Description |
---|
WaypointGroup(java.awt.Color color,
WaypointGroup.WptGrpType type)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addWaypoint(Waypoint wpt)
Adds a waypoint to the group.
|
void |
addWaypoint(Waypoint wpt,
boolean correctElevation)
Adds a waypoint to the group and optionally corrects the elevation.
Warning: using this method for repetitive adding of points will generate a large number of HTTP requests. |
WaypointGroup.EleCleansedStatus |
cleanseEleData()
Cleanese the elevation data.
|
WaypointGroup.EleCorrectedStatus |
correctElevation(boolean doCleanse)
Corrects the elevation of each
Waypoint in the group and updates the aggregate group properties.Optionally can do a "cleanse," attempting to fill missing data (SRTM voids) in the response. Note: The MapQuest Open Elevation API has a bug with POST XML, and the useFilter parameter. |
static java.util.List<java.lang.Double> |
getEleArrayFromXMLResponse(java.lang.String xmlResponse)
Parses an XML response string.
|
Waypoint |
getEnd() |
int |
getNumPts() |
Waypoint |
getStart() |
java.util.List<Waypoint> |
getWaypoints() |
WaypointGroup.WptGrpType |
getWptGrpType() |
void |
removeWaypoint(Waypoint wpt)
Removes a waypoint from the group.
|
void |
setWaypoints(java.util.List<Waypoint> waypoints) |
void |
updateAllProperties()
Updates the relevant properties of the subclass.
|
void |
updateBounds() |
void |
updateDuration() |
void |
updateEleProps() |
void |
updateLength() |
void |
updateMaxSpeed() |
getColor, getDesc, getDuration, getEleEndFeet, getEleEndMeters, getEleMaxFeet, getEleMaxMeters, getEleMinFeet, getEleMinMeters, getEleStartFeet, getEleStartMeters, getFallTime, getGrossFallFeet, getGrossFallMeters, getGrossRiseFeet, getGrossRiseMeters, getLengthMeters, getLengthMiles, getMaxLat, getMaxLon, getMaxSpeedKmph, getMaxSpeedMph, getMinLat, getMinLon, getName, getRiseTime, isGPXFile, isGPXFileWithNoRoutes, isGPXFileWithOneRoute, isGPXFileWithOneRouteOnly, isGPXFileWithOneTrackseg, isGPXFileWithOneTracksegOnly, isRoute, isTrack, isTrackseg, isTrackWithOneSeg, isVisible, isWaypointGroup, isWaypoints, isWptsVisible, setColor, setDesc, setName, setVisible, setWptsVisible, toString
private WaypointGroup.WptGrpType wptGrpType
private java.util.List<Waypoint> waypoints
public WaypointGroup(java.awt.Color color, WaypointGroup.WptGrpType type)
color
- The color.type
- The type of WaypointGroup
.public WaypointGroup.WptGrpType getWptGrpType()
public java.util.List<Waypoint> getWaypoints()
public void setWaypoints(java.util.List<Waypoint> waypoints)
public void addWaypoint(Waypoint wpt)
public void addWaypoint(Waypoint wpt, boolean correctElevation)
public void removeWaypoint(Waypoint wpt)
public int getNumPts()
public Waypoint getStart()
public Waypoint getEnd()
public WaypointGroup.EleCorrectedStatus correctElevation(boolean doCleanse)
Waypoint
in the group and updates the aggregate group properties.public WaypointGroup.EleCleansedStatus cleanseEleData()
Waypoint
with an elevation of -32768 needs to be interpolated.public static java.util.List<java.lang.Double> getEleArrayFromXMLResponse(java.lang.String xmlResponse)
public void updateAllProperties()
GPXObject
updateAllProperties
in class GPXObject
public void updateDuration()
public void updateLength()
public void updateMaxSpeed()
public void updateEleProps()
public void updateBounds()