PDA

View Full Version : Custom path from google maps



warbird
November 19th, 2007, 12:51
Hi, I have a small project going which is basically to walk the Tokaido (the main highway between Tokyo and Kyoto in the Edo period of japanese history). Some times, I have to walk tiny roads etc, not only main roads, and its hard to find good maps without having to bring 200 pages of them. This is where google maps and mapthis comes in.

Basically, I've mapped out the path I need to walk in google maps, using the line tool, and now I want to import this into mapthis. Unfortunaltely I can't figure out how, or if its even possible... Can anyone help me out? Having this on my walks will be a huge help (cant start to tell how many times Ive found that I've taken a wrong turn and have to backtrack one or more kilometers...)

Nieko
November 19th, 2007, 15:33
Depends. What data did you get from the line tool?

If it's coordinates for all the turns and stops and whatnot, then you can simply concatenate them.

If it's beginning and end of each segment (e.g. from one coordinate to the next, or from one street/city to another), then you can input those in GMDL or http://getroute.nieko.net/ and concatenate the results you have.

warbird
November 19th, 2007, 17:26
thanks for the help, but I'm not quite sure what im getting... I've attached the file I got. It was made by creating the lines in google maps, opening them in google earth and then saved to a file. Opening the file, everythings encoded, so cant get any coords from there.

Nieko
November 19th, 2007, 17:41
warbird: it's not encrypted but compressed. KMZ files are simply zip files, used by Google Earth. You can rename them to .zip and unpack it.

You'll then find a file doc.kml. On line 17, you'll see all the coordinates on one big line. Replace all the spaces with enters. You'll also have to swap latitude and longitude. If you're good with VIM, this should be a breeze :).

warbird
November 19th, 2007, 17:52
that i didnt know. Vim huh... im good with notepad :p

so

138.911697,35.118752,0 138.909927,35.118153,0
should become


35.118752,138.911697,0 <line break>
35.118153,138.909927,0
?

Nieko
November 19th, 2007, 19:12
Yes :). Of course you can replace the 0 at the end of the line with your own text. E.g. "still 5km to go!"

warbird
November 20th, 2007, 01:49
Thanks for the help. Got the POI file working. Is there any way to make lines show up, instead of points? Lines between each point, i mean.

If anyone wants to go the same route as I, and need to switch lon/lat coords, heres the regexp I used:

Search: ([0-9.]*).([0-9.]*).([0-9.]*\r?\n?)
Replace: $2,$1,$3

Edit: Figured it out on my own. For anyone with the same problem as I, who stumbles upon this thread, the way to do it is to add
#
!WAYPOINT
#
to the top of your poi file

While I'm at it, is there somewhere I can see the complete specs for mapthis' poi files?