AnsweredAssumed Answered

Export latitude and longitude to .GPX

Question asked by MattS on Feb 13, 2014
Latest reply on Feb 14, 2014 by Jade

Title

Export latitude and longitude to .GPX

Post

     Hi,

     I am trying to export POI / waypoints I have in a filemaker database to a .gpx file for use in garnin basecamp.
     The gpx file shoud look like this:

      

     <?xml version="1.0" encoding="utf-8"?><gpx creator="Garmin Desktop App" version="1.1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1http://www.topografix.com/GPX/1/1/gpx.xsdhttp://www.garmin.com/xmlschemas/WaypointExtension/v1http://www8.garmin.com/xmlschemas/WaypointExtensionv1.xsdhttp://www.garmin.com/xmlschemas/TrackPointExtension/v1http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsdhttp://www.garmin.com/xmlschemas/GpxExtensions/v3http://www8.garmin.com/xmlschemas/GpxExtensionsv3.xsdhttp://www.garmin.com/xmlschemas/ActivityExtension/v1http://www8.garmin.com/xmlschemas/ActivityExtensionv1.xsdhttp://www.garmin.com/xmlschemas/AdventuresExtensions/v1http://www8.garmin.com/xmlschemas/AdventuresExtensionv1.xsdhttp://www.garmin.com/xmlschemas/PressureExtension/v1http://www.garmin.com/xmlschemas/PressureExtensionv1.xsdhttp://www.garmin.com/xmlschemas/TripExtensions/v1http://www.garmin.com/xmlschemas/TripExtensionsv1.xsdhttp://www.garmin.com/xmlschemas/TripMetaDataExtensions/v1http://www.garmin.com/xmlschemas/TripMetaDataExtensionsv1.xsdhttp://www.garmin.com/xmlschemas/ViaPointTransportationModeExtensions/v1http://www.garmin.com/xmlschemas/ViaPointTransportationModeExtensionsv1.xsdhttp://www.garmin.com/xmlschemas/CreationTimeExtensions/v1http://www.garmin.com/xmlschemas/CreationTimeExtensionsv1.xsd" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wptx1="http://www.garmin.com/xmlschemas/WaypointExtension/v1" xmlns:gpxtrx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:trp="http://www.garmin.com/xmlschemas/TripExtensions/v1" xmlns:adv="http://www.garmin.com/xmlschemas/AdventuresExtensions/v1" xmlns:prs="http://www.garmin.com/xmlschemas/PressureExtension/v1" xmlns:tmd="http://www.garmin.com/xmlschemas/TripMetaDataExtensions/v1" xmlns:vptm="http://www.garmin.com/xmlschemas/ViaPointTransportationModeExtensions/v1" xmlns:ctx="http://www.garmin.com/xmlschemas/CreationTimeExtension/v1">


       <wpt lat="41.209238348528743" lon="2.228829633444548">
         <name>testwaypoint1</name>
         <extensions>
           <gpxx:WaypointExtension>
             <gpxx:Address>
               <gpxx:StreetAddress>straat1</gpxx:StreetAddress>
               <gpxx:City>stad1</gpxx:City>
               <gpxx:State>provincie1</gpxx:State>
               <gpxx:Country>land1</gpxx:Country>
               <gpxx:PostalCode>postcode1</gpxx:PostalCode>
             </gpxx:Address>
             <gpxx:PhoneNumber>telefoon1</gpxx:PhoneNumber>
           </gpxx:WaypointExtension>
         </extensions>
       </wpt>

       <wpt lat="52.137518929317594" lon="2.330002557486296">
         <name>testwaypoint2</name>
         <extensions>
           <gpxx:WaypointExtension>
               <gpxx:Address>
               <gpxx:StreetAddress>straat2</gpxx:StreetAddress>
               <gpxx:City>stad2</gpxx:City>
               <gpxx:State>provincie2</gpxx:State>
               <gpxx:Country>land2</gpxx:Country>
               <gpxx:PostalCode>postcode2</gpxx:PostalCode>
             </gpxx:Address>
             <gpxx:PhoneNumber>telefoon2</gpxx:PhoneNumber>
           </gpxx:WaypointExtension>
          </extensions>
       </wpt>

     </gpx>

     As you can see I need a fixed header and a list with the waypoint details.
     The text in red is data I have in my filemaker fields. I have tried making a calculated field containing all text for each waypoint, but I am not sure this is the approach to use.

     Can anyone point me right direction because my scripting skills are practically nil.
     Thank you

Outcomes