Solved

Extract Google Traffic Layer

  • 30 August 2017
  • 7 replies
  • 46 views

Badge +8

Do you think there is a way in FME to extract traffic layer from Google? I want to analyze traffic in a certain zone and I can't find the way to get this data in FME.

I tried to see into the documentation but without success : Google Traffic

I'm starting to think that maybe Google doesn't want us to do that kind of stuff though...

icon

Best answer by philippeb 30 August 2017, 21:03

View original

7 replies

Badge +11
@philippeb - Just to confirm my understanding of your question.. You would like to extract data (i.e. attributes) from the traffic layer, rather than use it as a basemap?

 

If the former,.. I would side with your thought that perhaps it is not accessible by design.

 

Badge +8

Yeah I would like to extract the data (attributes and geometry).

 

I didn't thought about the possibility that the traffic layer would be a basemap though. I was sure that it was a dynamic vector layer, overlapping the default basemap. If so, I can give up my project...

Thanks anyway!

Userlevel 4
Badge +30

Yeah I would like to extract the data (attributes and geometry).

 

I didn't thought about the possibility that the traffic layer would be a basemap though. I was sure that it was a dynamic vector layer, overlapping the default basemap. If so, I can give up my project...

Thanks anyway!

Hi @philippeb, i did search on the Web about a API in Google Maps to read Traffic using HTTP Request, but i didn't find it:

 

 

Developers Google

 

 

 

Thanks,

 

Danilo
Badge +8

I just found that documentation about Directions API : Google Direction API

With the HTTPCaller, I'm going to be able to calculate the time between point A and point B!

Thank you guys!! :D

Userlevel 4
Badge +30

I just found that documentation about Directions API : Google Direction API

With the HTTPCaller, I'm going to be able to calculate the time between point A and point B!

Thank you guys!! :D

Just to know, i did a question here about multiples points using API Google Maps Direction Google Maps

 

 

Thanks,

 

 

Danilo

 

 

Badge +7

I just found that documentation about Directions API : Google Direction API

With the HTTPCaller, I'm going to be able to calculate the time between point A and point B!

Thank you guys!! :D

How is the Direction API an answer to your question, @philippeb? That doesn't really tell you anything about the (current) traffic situation, does it?

 

For what it's worth, I once made a "ripper" for Google Traffic maps (all within legal bounds, by the way ;)). First tried to contact Google if it was possible to access this data (and even pay for it) but never got a proper answer, so I built something myself.

 

Basically used an HTML page with custom CSS styling for the Google Traffic Layer and background map, so I would get a "high-contrast" traffic map without too much background noise. I ran this HTML page on localhost and then wrote a script (outside FME) that would render this page at a certain pixel size. The resulting image basically was like a map tile. You needed to specify the latlon bounds and level of detail for the script and it would generate all map tiles for that area within a couple of minutes. The tiles were processed in FME and the traffic congestion values (green - orange - red etc.) were assigned to actual vector road segments along with a timestamp. Along with some average hourly traffic intensity data we had, we could give a rough estimate of the amount of cars that were actually passing by on a road segment at a certain time.
Badge +8
How is the Direction API an answer to your question, @philippeb? That doesn't really tell you anything about the (current) traffic situation, does it?

 

For what it's worth, I once made a "ripper" for Google Traffic maps (all within legal bounds, by the way ;)). First tried to contact Google if it was possible to access this data (and even pay for it) but never got a proper answer, so I built something myself.

 

Basically used an HTML page with custom CSS styling for the Google Traffic Layer and background map, so I would get a "high-contrast" traffic map without too much background noise. I ran this HTML page on localhost and then wrote a script (outside FME) that would render this page at a certain pixel size. The resulting image basically was like a map tile. You needed to specify the latlon bounds and level of detail for the script and it would generate all map tiles for that area within a couple of minutes. The tiles were processed in FME and the traffic congestion values (green - orange - red etc.) were assigned to actual vector road segments along with a timestamp. Along with some average hourly traffic intensity data we had, we could give a rough estimate of the amount of cars that were actually passing by on a road segment at a certain time.
WoW you've done an incredible job!

 

 

For sure I won't have the current trafic stats and the roads geometry, but with the time between A and B, I can know if there is traffic or not. I won't know where exactly, but I don't care.

 

Exemple : if I know that in a normal situation, to get from A to B it takes 30 minutes and my FME script gives me a value of 55 minutes, I'll can tell that there is traffic, somewhere. I won't have the cause of the trafffic (accidents, construction, etc), but with the time I'll have enough information for my needs.

 

It would be great to have a Google Traffic API, but we'll have to wait a while I think.

 

 

Reply