X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=src%2Ftim%2Fprune%2Fdata%2FTrack.java;h=b6e05496e17335628c577dd799408b19361bf6f0;hp=ef099d4c171d1651bfd627a3beb71bd271943a15;hb=ec05ac5e6b31bbc2d88f16dba1c6bdbc556cf6db;hpb=bd5be1ff2ec74329c16d79e06505589113c79da1 diff --git a/src/tim/prune/data/Track.java b/src/tim/prune/data/Track.java index ef099d4..b6e0549 100644 --- a/src/tim/prune/data/Track.java +++ b/src/tim/prune/data/Track.java @@ -818,6 +818,24 @@ public class Track } } + /** + * Collect all segment starts into the given list + * @param inList List to fill with waypoints + */ + public void getSegmentStarts(List 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