Hi,

right now i am building a new trekking-site and love your module! its kick ass!

however, there is one thing, what - if it would be included - could make it even greater.

it should support gpx-files with multiple tracks.

i've added a multi-track-gpx for your convinience.

thanks a lot!

Andreas

Comments

raintonr’s picture

I'm not sure how this would be best implemented.

Some CCK fields can be marked as multiple entry. If you wanted to store multiple tracks from a GPX (or KML, etc) file in a single field then perhaps that would work when such a field was marked for a multiple value inputs.

Or a single field could be made to be aware of multiple lines and other shapes (polygons, points, etc).

What is the opinion on this? Either way, not sure this is a high priority right now.

xl-network’s picture

Version: 5.x-0.x-dev » 6.x-1.x-dev

I have multiple tracks in one GPX file and the trackfield module can't handle these correctly. The solution I use now is, I merge all the tracks. It's not a perfect solution, but it works.

To make it work all the module has to do is append the data from the second, third etc. segment to the first. The XML structure is as follows.

GPX
  TRK
    NAME
    TRKSEG
      TRKPT
      TRKPT
      TRKPT
      TRKPT
      TRKPT
  TRK
    NAME
    TRKSEG
      TRKPT
      TRKPT
      TRKPT
  TRK
    NAME
    TRKSEG
      TRKPT
      TRKPT
      TRKPT

As you can see there are multiple TRK nodes under the GPX rootnode. What I do to make it work with single tracks is remove it so all the points (from all the 3 tracks) appear as one track.

I hope you can help, couse this module is great!

BTW. the file in the original post is structured just like mine, so for a example this should be good.

raintonr’s picture

Ah... so you'd just like the module to concatenate all tracks together? That shouldn't be so hard. Although is that what the original request wants?

tonyyarusso’s picture

I ran into the same issue with a KML file I'm trying to use. The problem is, it's a trail that has spur trails and loops, so merely squishing everything together wouldn't work while keeping the proper shape. The multiple Placemarks need to be drawn separately, but from one file, on one map.

honigferd’s picture

Most GPX files I have seem to be "split" this way.

KML has this feature also, but a tad more complicated I guess. :-/

honigferd’s picture

Although I'm not sure if it'd be a smart idea to just connect everything.

In the case of a few of my GPX files there seem to be gaps with lost GPS reception, then one track/segment with one or two points completely off the route, then the next track/segment continues normally, so if you'd just blindly connect all points you'd end up with some unpretty artifacts/"peaks".

I can supply examples if wanted.

raintonr’s picture

Re: #4... if you are trying to map or draw multiple 'spurs' as you put it, make each one a node in it's own right. That's exactly what we do at NoBMoB. Have a look at the map here, for example:

http://maps.google.com.au/?q=http://nobmob.com/node/8/kml

You note that this is a KML shown on Gmaps. Each line (or track) in the KML is a node that has a single line (or track) listed. Works for us, is that what you're looking to achieve?

galed’s picture

I'd like to bring this back up... I need to display an overall route that's composed of sections, and display the sections clearly as well. Was there ever a solution to this?

raintonr’s picture

Re: #8.

The solution to do anything that is split up is to create a node for each part.

In the case of a route of sections you would have a node for the start part, a node for the middle parts, a node for the end parts.

This isn't as bad as it sounds - you then get to discuss each section in it's own right as it is a node.

Dalaez’s picture

Assigned: Unassigned » Dalaez
Category: feature » support
Priority: Normal » Major
Issue tags: +google, +maps, +trackfield, +multiple tracks, +multipath

Hi,

Thank you in advance for the great work you've made with this Module, It's awesome and a very good tool for trekking, riding and running lovers.

I'd like to solve one doubt about multiple tracks in a KML file according the last comments here. Specifically, I am developing a site with this module in my localhost machine and I have a file with several KML tracks in different nodes, if I attach this file to Google Earth or Google Maps -> My Maps, I can see all the tracks in the file. However, if I use it with the TrackField module in my local site I only can see the first track I have. Is this produced due to the fact I'm using it in my localhost instead of a public server?,

Thank you again,

Best regards,

Daniel,