Results 1 to 1 of 1

Thread: Selecting POI's along a route

  1. #1
    Join Date
    Feb 2011
    Location
    Brunswick, Victoria
    Posts
    3,778
    Total Downloaded
    0

    Selecting POI's along a route

    This is a bit geeky but could possibly be of use to someone.

    We are planning a two week holiday and my partner has used frequent flyer points to buy a couple of BP gift cards so it's useful to know where we can actually use them.

    It is possible to download the gps locations of service stations from the BP website BUT you can only do this on a state by state basis. Our trip traverses three states and the downloaded file of BP service stations contains 856 waypoints. Not especially helpful

    The solution turned out to be relatively easy, and is documented in various places including the GPSBabel website - Include Only Points Within Distance of Arc (arc)

    The essential tool for doing this is GPSBabel - GPSBabel: convert, upload, download data from GPS and Map programs
    It's free and is used as the basis of many of the free waypoint conversion websites, but you really need access to the commandline version to do the necessary magic as the GUI (on OSX at least) doesn't give access to the options needed.

    As a starting point you need:
    - a gps route
    - a file of POI waypoints
    - GPSBabel


    The first step is to convert the route from gpx, kml or other format to a gpsbabel ARC format. The ARC format is simply a list of gps co-ordinates.
    The conversion is straight forward with the GPSBabel front end:


    and results in a file that has contents looking like this:

    Code:
    -37.73288	144.91275
    -37.73561	144.90372
    -37.73375	144.88413
    -37.72333	144.84317
    -37.71506	144.83502
    -37.70850	144.82092
    -37.67076	144.76251
    -37.65965	144.74206
    The .csv file from the BP site can't be used as is, but only needs some minor tweakage. The file has the following header which GPSBabel doesn't understand.

    Code:
    displayname	latitude	longitude
    By using the universal csv format we can rectify this problem easily by changing the column names to be GPSBabel friendly.

    Code:
    name	lat	lon
    Once this is done it's simple to convert to GPX format by selecting Universal CSV as the input format.



    Once the file is loaded up, it's obvious that this is too much information



    At this point the GPSBabel GUI is no help, so it's time to fire up the Terminal.

    I used the following command:

    Code:
    gpsbabel -i gpx -f /Users/offtrack/Desktop/BP_GPS_list.gpx -x arc,file=/Users/offtrack/Desktop/Melb2Morg.txt,distance=1K -o gpx -F /Users/offtrack/Desktop/BP_1K_off_route.gpx
    -i = input format (gpx)
    -f = the file you want to filter, the BP waypoints.
    -x specifies the filtering information: arc filter, input file, and the maximum distance from the arc (aka route) in this case 1 km.
    -o = output format (gpx)
    -F = output filename

    The result looks like this, which is much more manageable.



    Obviously this technique can be applied to any list of waypoints or POI's, and is quite simple once you've done it a couple of times.

    cheers
    Paul
    Attached Images Attached Images

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search AULRO.com ONLY!
Search All the Web!