X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gps%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fgpx%2FGpxPlotter.java;h=3056eff507eb79f8be10acf944a3af1d0622a145;hb=0ef9fcaa10df47bac114bda9264981396fb18c49;hp=f239cabf4a3b7aadc01807f000f0ea0caf45b3dd;hpb=4a27bb58a18d180cfd21ba0d59c35d775dec064c;p=utils diff --git a/gps/src/main/java/org/wamblee/gpx/GpxPlotter.java b/gps/src/main/java/org/wamblee/gpx/GpxPlotter.java index f239cabf..3056eff5 100644 --- a/gps/src/main/java/org/wamblee/gpx/GpxPlotter.java +++ b/gps/src/main/java/org/wamblee/gpx/GpxPlotter.java @@ -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> elevationProfile = computeElevationProfile(track); printTrack(elevationProfile);