(no commit message)
[utils] / gps / src / main / java / org / wamblee / gpx / GpxPlotter.java
index f239cabf4a3b7aadc01807f000f0ea0caf45b3dd..3056eff507eb79f8be10acf944a3af1d0622a145 100644 (file)
@@ -46,6 +46,8 @@ import org.wamblee.utils.JpegUtils;
 /**
  * Parses a GPX file and prints out a data file with each trackpoints distance from the start of the 
  * track and its elevation, separated 0by a space. 
+ *
+ * @author Erik Brakkee
  */
 public class GpxPlotter {
     
@@ -53,6 +55,9 @@ public class GpxPlotter {
         File file = new File(aArgs[0]);
         GpxParser parser = new GpxParser(); 
         Track track = parser.parse(new FileInputStream(file));
+        
+        TrackStatistics profile = new TrackStatistics(track);
+        profile.writeHeightProfilePng(new FileOutputStream("x.png"), 600, 300);
     
         List<Pair<Double,Double>> elevationProfile = computeElevationProfile(track);
         printTrack(elevationProfile);