]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/data/Track.java
Add a panel to select by segment
[GpsPrune.git] / src / tim / prune / data / Track.java
index ef099d4c171d1651bfd627a3beb71bd271943a15..b6e05496e17335628c577dd799408b19361bf6f0 100644 (file)
@@ -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<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