}
+ /**
+ * Remove altitudes from the specified range
+ * @param inStart start of range
+ * @param inEnd end of range
+ */
+ public boolean removeAltitudes(int inStart, int inEnd)
+ {
+ // sanity check
+ if (inStart < 0 || inEnd < 0 || inStart >= inEnd || inEnd >= _numPoints) {
+ return false;
+ }
+
+ boolean anyRemoved = false;
+ for (int i=inStart; i<=inEnd; i++)
+ {
+ DataPoint p = _dataPoints[i];
+ if (p != null && p.hasAltitude())
+ {
+ p.removeAltitude();
+ anyRemoved = true;
+ }
+ }
+ return anyRemoved;
+ }
+
/**
* Interleave all waypoints by each nearest track point
* @return true if successful, false if no change
}
}
+ /**
+ * Collect all segment starts into the given list
+ * @param inList List to fill with waypoints
+ */
+ public void getSegmentStarts(List<DataPoint> inList)
+ {
+ // clear list
+ inList.clear();
+ // loop over points and copy all segment starts into list
+ for (int i=0; i<=_numPoints-1; i++)
+ {
+ if (_dataPoints[i] != null && _dataPoints[i].getSegmentStart())
+ {
+ inList.add(_dataPoints[i]);
+ }
+ }
+ }
+
/**
* Search for the given Point in the track and return the index