Route along roads instead of straight lines

174 views
Skip to first unread message

lame_da_lame

unread,
Jan 24, 2008, 5:50:47 AM1/24/08
to KML Developer Support - Getting Started with KML
Hi,

I tried search Goofle Earth Helpgroups, but either I do search in the
wrong groups or I am using the wrong search phrase. I couldn't find a
solution.


I have a KML file (let's call it file A), that was created by a
routing program. When I open it in Google Earth, I can see the
waypoints and a route from waypoint to waypoint, which leads along the
actual streets.

I then created a new KML file (let's call it file B) within Google
Earth, which only has waypoints.
Since I could not find a way to tell Google Earth to do a street
navigation along the waypoints, I checked the first file (file A) and
tried to find out, what made the difference.

The only difference I found, was the following block at the end of the
file, that has the coordniates of all waypoints in it.
<Placemark>
<MultiGeometry>
<LineString>
<coordinates>
....
</coordinates>
</LineString>
</MultiGeometry>
</Placemark>

Therefore I manually edited the KML file, that I created with Google
Earth (file B) to also provide the relevant block.

The result is, that I do see a route, but it`s only drawn as straight
lines from waypoint to waypoint instead of a line that is drawn along
the actual streets.

Which parameter do I have to add, to have Google Earth do a street
navigation instead of straight lines ?

Cheers,
lame

barryhunter [KML Guru]

unread,
Jan 24, 2008, 6:46:43 AM1/24/08
to KML Developer Support - Getting Started with KML
That LineString (in A) will contain the actual coordinates of the
streets themselves (each corner and bend). (and the routing program
must of known about them to be able to export)

I dont think there is any KML option to make GE 'snap lines to roads',
it will always just plot the coordinates as provided in the file.

On placemarks contained in a KML file, you can open the placemarks in
GE, and click the Directions to/from here, so thay you end up creating
a routing between any two placemarks. (and you can then copy that to
your file)

Or you could write a program that read your file and then added
routing,
either i) grabbing data direct from Google Maps and incorperating it
in your file - but I dont know the legality of this,
or ii) or just providing network links that 'hotlinks' the data into
your file - this I think is ok, while its a gray area, its not
actually copying the data, just using it - just like you would doing
it manually

lame_da_lame

unread,
Jan 24, 2008, 8:12:07 AM1/24/08
to KML Developer Support - Getting Started with KML
Hey barryhunter,

thanks for the quick reply.

Because of the sheer amount of data, that was contained in the
coordinates line in file A, I already supposed the "each-and-every-
turn" scenario.
But since GE can do "snap-to-roads" for A-to-B navigation, I figured,
it might also be possible with waypoints.

Anyway, I will try your copy-and-paste suggestion with every two
consecutive waypoints, since I don`t need a long term solution
(program), and only want to do it once yet. I might start programming
something for future use, when this topic pops up again.

Thanks for your help,
lame

lame_da_lame

unread,
Jan 24, 2008, 9:09:33 AM1/24/08
to KML Developer Support - Getting Started with KML
Ok, I did what you suggested and it worked for the biggest part of the
route.

Unfortunately Google Earth does have the same "bug", that Google Maps
has, and that I hoped to circumvent with Google Earth.
Both won`t navigate via certain mountain passes in the alps.
One of several examples: try to get a direct route from Wassen to
Innertkirchen (Switzerland) ( http://tinyurl.com/ywh35p ) that
actually leads via the Sustenpass (direct connection) and not around
the mountain.

Anyone knows why that is ?
What would be the correct place, to ask about this ?

Cheers,
lame

Jonathan van Tuijl

unread,
Jan 24, 2008, 9:22:24 PM1/24/08
to KML Developer Support - Getting Started with KML
lame_da_lame wrote:
> Ok, I did what you suggested and it worked for the biggest part of the
> route.
>
> Unfortunately Google Earth does have the same "bug", that Google Maps
> has, and that I hoped to circumvent with Google Earth.
> Both won`t navigate via certain mountain passes in the alps.
> One of several examples: try to get a direct route from Wassen to
> Innertkirchen (Switzerland) (http://tinyurl.com/ywh35p) that
> actually leads via the Sustenpass (direct connection) and not around
> the mountain.
>
> Anyone knows why that is ?

I experimented a bit and found that if I dragged the endpoints of a
route, Google Maps would update the route in realtime; quite helpful.
It doesn't want to generate routes through some invisible barriers
(the road looks OK upon zooming in). Here's how far I got:
http://maps.google.com/maps?f=d&hl=en&geocode=1152370835968469240,46.739330,8.372320%3B1938539075363078520,46.735650,8.521940&time=&date=&ttype=&saddr=46.738802,8.374414&daddr=Fernigen+%4046.735650,+8.521940&mra=dme&mrcr=0&mrsp=0&sz=14&sll=46.733802,8.378878&sspn=0.036296,0.058279&ie=UTF8&ll=46.832482,8.42926&spn=0.289839,0.466232&z=11&om=0

Also, attempts to generate even small routes between those two points
fail. I suggest you report it to Google.

> What would be the correct place, to ask about this ?

Maybe a more generic Earth/Maps forum would be better, but I don't
mind.

Jonathan

lame_da_lame

unread,
Jan 25, 2008, 10:40:16 AM1/25/08
to KML Developer Support - Getting Started with KML
Hi Jonathan,

thanks for your reply.

I`m happy, that i`m not the only one, who can`t get GM to give
directions for that direct connection.
I already thought, I did something wrong.

Actually, I`ve noticed this behaviour with several mountain passes, so
I figure it`s for a certain reason.
I will see, if I can get an answer from Google.

Cheers,
lame

On 25 Jan., 03:22, Jonathan van Tuijl wrote:
> lame_da_lame wrote:
> > Ok, I did what you suggested and it worked for the biggest part of the
> > route.
>
> > Unfortunately Google Earth does have the same "bug", that Google Maps
> > has, and that I hoped to circumvent with Google Earth.
> > Both won`t navigate via certain mountain passes in the alps.
> > One of several examples: try to get a direct route from Wassen to
> > Innertkirchen (Switzerland) (http://tinyurl.com/ywh35p) that
> > actually leads via the Sustenpass (direct connection) and not around
> > the mountain.
>
> > Anyone knows why that is ?
>
> I experimented a bit and found that if I dragged the endpoints of a
> route, Google Maps would update the route in realtime; quite helpful.
> It doesn't want to generate routes through some invisible barriers
> (the road looks OK upon zooming in). Here's how far I got:http://maps.google.com/maps?f=d&hl=en&geocode=1152370835968469240,46....

lame_da_lame

unread,
Jan 25, 2008, 10:59:38 AM1/25/08
to KML Developer Support - Getting Started with KML
If anyone is interested: I posted a question about this here:
http://groups.google.de/group/Google-Maps-Troubleshooting/browse_thread/thread/0d62f8eabd5c7527

Cheers,
lame

ManoM

unread,
Jan 25, 2008, 11:51:36 AM1/25/08
to KML Developer Support - Getting Started with KML
Hi,

That is weird!

For Google Earth, you can post data issues here:
http://earth.google.com/support/bin/request.py?&problem=billing&extra.customer=GEFree&contact_type=data

Since they draw on the same source, the Maps team will hear about it
too.

ManoM

On Jan 25, 7:59 am, lame_da_lame wrote:
> If anyone is interested: I posted a question about this here:http://groups.google.de/group/Google-Maps-Troubleshooting/browse_thre...
>
> Cheers,
> lame
Reply all
Reply to author
Forward
0 new messages