Tutorials Contact Us Terms of Use
Log In & Create Route Sign Up & Create Route
Advanced Search Running & Hiking trails Motorcycle roads
Add to del.icio.us Digg this Add to Reddit

Categories

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormetzenberg
    • CommentTimeAug 28th 2007 edited
     
    This procedure is much faster than entering points by hand, and it is extremely efficient and accurate. I have now used it to produce dozens of Bikely routes. I have compared them to Bikely routes that I entered by hand, and I have found that the registration of the routing points to the map and to the route itself is outstanding.

    Furthermore, GPX files generated this way are highly efficient in that they require fewer routing points to achieve tight registration. Tight registration is what you want to keep your GPS device from thinking that you are supposed to be 50 meters away at the bottom of a cliff or in the middle of a river, instead of on the roadway. Tight registration means accurate elevations, for example.

    The tool GMapToGPX has already been mentioned in this forum. Follow the directions for installing the tool as a bookmark.

    To use the tool, create a Google map of the route you are planning. If you are doing a loop, it will have to be done by splicing two or more point-to-point rides. First create the Google map, and then go to GMapToGPX in your bookmarks. It gives you several options, depending on which kind of tracking or routing points you want to extract. If you choose Full, you'll get every single tracking point.

    In order to import this data into Bikely, you're going to have to cut-and-paste them into the shell of a Bikely export file. What I do is, I export a GPX file from Bikely to use as a template, and then I use it over and over. The Bikely file has all the right XML metadata that Bikely's GPX importer expects to find, which is why I do it this way. Bikely could probably write a more generalized importer, which would make this manual process unnecessary, but that would take some time.

    Next, what I do is I delete all the routing points from the Bikely export file. I am going to cut and paste in their place routing points from the GPX file that I made with Google maps. But first, I have to clean them up a bit. Use a pure text editor for this purpose. I recommend anything from Microsoft's Notepad (which is free, on every PC) to the much acclaimed BBEdit for the Macintosh, which is highly customizable and would probably help you automate a lot of this work. Using GMapToGPX on your Google map, choose the Full option, which gives you a GPX file with every single tracking point.

    Cut out all the tracking points from this text, but none of the metadata that surrounds them. Tracking points are bracketed in the XML file by <trkpt></trkpt>. Next, paste the tracking points into the metadata shell of the Bikely file you exported. In other words, replace everything between <rte> and </ret> in the Bikely file with your Google Map data.

    Next, you need to clean up the file, by massaging that Google GPX data until Bikely can import it again. First, delete all descriptions from the Google generated data. Descriptions are bracketed by <desc></desc> in the XML stream. I tried the logical thing, converting the descriptions into comments (bracketed by <cmt></cmt>), but that didn't work.

    Also, delete any track segments within the Google map data. When you use the design your own route feature on Google maps, it breaks each subsegment into a track segment, bracketed by <trkseg></trkseg>. You simply need to delete those, which means to in effect, combine all the Google map data into one big segment.

    Finally, search and replace trkpt with rtept. In other words, convert tracking points into routing points. Bikely likes to read in its GPX files as routing points. Now, your file is ready to read back into Bikely.

    Since you are going to read your Bikely shell file, filled with new data, back into Bikely, you need to give it a nice monosyllable name. Bikely will write out longer file names, but it appears to want to read in only Unix conforming file names (alphanumeric characters). I haven't tested this out extensively. I just found one name that works.

    Once your ride is imported into Bikely, it may take some time for Bikely to incorporate elevation data into the route. I'm sure this is a lookup process. Any new points you add as you edit the file will immediately have that elevation data, but the old ones will not have it yet. It appears to take several days, and it helps to open the finished ride again and do some further editing.

    Once you have mastered this procedure for importing maps as GPX files, it should be easy to make new routes out of your existing ones by cutting and splicing. I am considering writing an AppleScript program to do some filtering and avoid the manual cleanup process. A friend of mine commented that the whole thing could be accomplished with a few lines of Perl. I don't find the manual steps that bothersome though, and I expect somebody else will solve this problem sooner or later in middleware, so that we can all use it. So the procedure I have outlined here is really just a crude hack until somebody finds a better way of connecting the dots. Maybe Bikely will incorporate the whole procedure once the developers are home from their summer rides!

    Howard
    • CommentAuthormetzenberg
    • CommentTimeAug 28th 2007
     
    This is what your data that you will copy into the template file will look like:


    <rtept lat="49.27754" lon="20.18396"></rtept>
    <rtept lat="49.27715" lon="20.18462"></rtept>
    <rtept lat="49.27573" lon="20.18673"></rtept>
    <rtept lat="49.27463" lon="20.18798"></rtept>


    It should contain no other XML tags or comments.

    Howard
    •  
      CommentAuthorredfox
    • CommentTimeAug 28th 2007 edited
     
    "Finally, search and replace trkpt with rtept. In other words, convert tracking points into routing points. Bikely likes to read in its GPX files as routing points."

    This step is not needed, Bikely is quite happy to import tracks in trackpoint format, at least all of my imports were anyway.

    Alternatively, windows users can miss out on all the cutting and pasting above by using the free GPX Track Tool program I created for doing just this sort of thing.
    • CommentAuthorBlueMM
    • CommentTimeAug 29th 2007 edited
     
    Hi metzenberg,
    That's much more complicated that what I discovered from my testing. I mentioned in the Google Maps new "dynamic routing" good for bicycle routes discussion, you just need to delete pairs of:
    </trkseg>
    <trkseg>
    lines.
    I just tested, and Bikely now handles importing multi-track GPX files, so you don't need to change a thing (so the multi-track GPX issue has been fixed after the start of July when I tested this last - does that mean development has returned to Bikely?). Also, you can copy-n-paste the Full GPX from GMapToGPX into any file, I just dump it in a newly created text file.
    So my simplified procedure is:

    * Create "Driving directions" route in Google Maps, with all the intermediate points that you need to bend it the way you want.
    * Click the GMapToGPX bookmarklet & select the Full tab.
    * Copy-n-paste this data into a text file (Windows creates New Text Document.txt for me).
    * Upload into Bikely using Import Route feature.

    So it's dead simple. Also, if you want all the Google turn directions in the comments to help populate the cuesheet (which I love), you just need to convert all the <desc> tags to <cmt> tags (ideally, Bikely import could use <desc> tags if <cmt> tags are missing):

    * Create "Driving directions" route in Google Maps, with all the intermediate points that you need to bend it the way you want.
    * Click the GMapToGPX bookmarklet & select the Full tab.
    * Copy-n-paste this data into a text file (Windows creates New Text Document.txt for me).
    * Open in a text editor and change all <desc> & </desc> tags to <cmt> & </cmt>.
    -> In notepad, goto Edit->Replace, Find what = desc>, Replace with = cmt> click Replace All
    * Upload into Bikely using Import Route feature.

    PS. I'm on Windows XP using Firefox 2.0
    • CommentAuthormmeiser
    • CommentTimeSep 17th 2007
     
    Sweet! Was just googling on Google maps to GPX. Didn't even think to check the bikely forums but here it is.

    I can't wait to try it out.

    All the ease of creating a route with google maps, all the sharing features of bikely.

    BTW, is it just me, I just keep asking myself, why can I not save driving directions on google!?

    Oh, and has anyone created a GPX to Google maps solution?

    I figure I'll save the url for the original google map in the comment for the first point.
    • CommentAuthorchipg5
    • CommentTimeOct 19th 2007 edited
     
    I've just tried GMapToGPX and it works great, the route was imported into Bikely no problem.

    But one hitch: in my list of My Routes this route now has no location listed, and in fact it tells me to please enter a location (state and city). But I see nowhere to do that in the edit view. Is this something I can/should add into the GPX file?
    • CommentAuthorBlueMM
    • CommentTimeOct 19th 2007
     
    chipg5, when you are in your route (either from a GPX or starting from scratch), you just need to click on the "Locate" green tab that is to the left of the "Draw" within the map, from there you search for the closest city in the Bikely system.
    • CommentAuthorchipg5
    • CommentTimeOct 19th 2007
     
    Thanks BlueMM, that did the trick!
    • CommentAuthorkyleyost
    • CommentTimeOct 23rd 2007
     
    See the thread:

    http://www.bikely.com/forum/discussion/1377/google-maps-new-dynamic-routing-good-for-bicycle-routes/#Item_24

    This scriptlet is similar to GMAPtoGPX, but specific for bikely and for Garmin Courses. It improves on GMaptoGPX by giving a cleaner cue sheet and culls out the intermediary steps that are necessary in order to get Google Maps to follow the roads you want to follow. Click on Bikely GPX and copy/paste into a file. No search-replacing necessary whatsoever.
  1.  
    Here's that link in nice hypertext form...

    Here's the thread...
  2.  
    A minor but CRITICAL DETAIL when saving GMaptoGPX data using NotePad (and possibly other editors):
    ** Save as UTF-8 ** Or at least NOT as ANSI.
    I'm uncertain of all the details, but here is what I found after several frustrating hours: Street names with "unique" characters (such as accented letters) will not save properly in ANSI. In turn, they will be rejected when you attempt to import them (such as to Bikely or MapSource). It's difficult to troubleshoot as the file appears completely normal. Again, save it as UTF-8 or higher and you will never have this problem.

Discover & Share the Best Bike Rides, Trails and Routes

Bikely provides online maps of over 10,000 bike trails from 50 countries around the world - completely free.

You can browse our collection of bike route maps and join our community to share your favorite rides with the world and post in our forum.