anoved / gpxtruder

Make 3D-printable elevation models of GPX tracks.
http://gpxtruder.xyz/
MIT License
71 stars 23 forks source link

nothing gets generated out of some gpx files #31

Closed curiouspl2 closed 9 years ago

curiouspl2 commented 9 years ago

no idea why some gpx files are not rendered. here are some examples : http://83.15.83.106/curious/gps/chojnik/fresh.gpx http://83.15.83.106/curious/gps/Korenov_2010_12/out.gpx

anoved commented 9 years ago

Hi! Thanks for the report and examples. Some background:

GPX files may contain a mixture of waypoints (<wpt>), tracks (<trk>), and routes (<rte>). See https://en.wikipedia.org/wiki/GPS_Exchange_Format#Data_types for a description of the differences.

GPXtruder works with the first track it finds in the selected GPX file. As it turns out, the first <trk> element in out.gpx is empty - it contains no points. Likewise, the first <trk> element in fresh.gpx contains only a single point, which GPXtruder isn't able to present as a path. (Note that tracks can, in turn, contain multiple segments - and again, GPXtruder only deals with the first segment it finds.)

I will try to improve error checking and descriptive text to clarify what's happening in cases like these.

I don't think I will add an interface to select which track or segment to render. Instead, I suggest using other software to simplify or select the desired track before giving it to GPXtruder.

For example, you can use GPSBabel to delete empty tracks and consolidate the rest into a single track segment using a track filter like this:

gpsbabel -t -i gpx -f out.gpx -x track,pack -o gpx -F out-packed.gpx

The out-packed.gpx result is compatible with GPXtruder and looks like this with default settings:

packed

(Some other sort of editing may be required if just packing tracks together includes stray points that should be discarded.)

curiouspl2 commented 9 years ago

thanks :) i've tried various software and programs like gpsprune allow me to consolidate track like you did describe :)

This solves the problem :)