Re: Mapping GPS data
- To: mathgroup at smc.vnet.net
- Subject: [mg102202] Re: Mapping GPS data
- From: John Jowett <John.M.Jowett at gmail.com>
- Date: Sat, 1 Aug 2009 03:59:57 -0400 (EDT)
- References: <h46p50$e5r$1@smc.vnet.net> <h4c1an$gmi$1@smc.vnet.net>
Hello, This looks interesting but I can't get it to work, apparently because of line-breaking characters inserted in your code by the time it appears here (in Google Groups). Can you make it available otherwise? Or say which are the spurious characters below? Thanks, John Jowett On Jul 24, 12:10 pm, ragfield <ragfi... at gmail.com> wrote: > On Jul 22, 5:20 am, "HB-Kowalczyk-Schroed... at t-online.de" wrote:> In a re= cent Wolfram Blog Robert Raguet-Schofield described how to load GP= > > S data into Mathematica (http://blog.wolfram.com/2009/04/17/mapping-gps-d= at= > a/). Does anyone know, how to do this for routes in Europe? The problem i= s,= > that the used "terraservice" has only images for the US. > > You are correct that TerraServer doesn't work outside the U.S. Many > other online mapping services are available (e.g. Google, Yahoo, > OpenStreetMap.org, etc.) which do cover Europe. All of these can be > accessed from Mathematica (I've used each, though Google's terms of > service are not as generous as the others) with varying degrees of > difficulty. Here's a quick example for Yahoo: > > YahooMap[{lat_,lon_},zoom_]:=Module[ > {xml,url}, > xml=Import[StringJoin["http://local.yahooapis.com/MapsService/V1/ > mapImage?appid=YD-4g6HBf0_JX0yq2IsdnV1Ne9JTpKxQ3Miew-- > &latitude=",ToString[lat],"&longitude=",ToString[lon],"&zoom=",ToSt= ri= > ng > [zoom]],"XML"]; > url=Cases[xml,XMLElement["Result", _, {str_String}]:>str,Infinity]; > If[Length[url]=!=0,url=First[url],Return[$Failed]]; > Import[url] > ]; > > YahooMap[{40.0972222,-88.246111},1] > > -Rob