osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.72k stars 1.03k forks source link

[Feature Request] Traffic data #3565

Open fatuuse opened 7 years ago

fatuuse commented 7 years ago

The only reason I won't use OSMand as traffic routing in my car is that it miss traffic data. I suggest an extra plugin for that.

One simple plugin were you can report traffic cues, police, accident etc witch pop up like an POI in one overlay. Just let user push one button in a corner to report in there position. I do not need speed data from all devices just one heads up for temporary traffic happenings.

lordfolken commented 6 years ago

There is now an app called "QZ" which decodes TMC messages from a Bluetooth adapter: https://gitlab.com/mvglasow/qz

This is a gpl implementation. Maybe a plugin can be written.

eregwizard commented 5 years ago

Suprising labeling as nice to have. Since by now several free Android navigation apps already do provide live traffic data and route recalculation, it becomes clear that osmand is lagging and becoming less useful.

vshcherb commented 5 years ago

It is nearly impossible to have free/open application and traffic data, cause there is no open global traffic data. Probably they provide that feature for free now or they exchange all user data for that free traffic data.

eregwizard commented 5 years ago

There are already several android navigation apps that do have traffic data, including Magic Earth that claims to require and use no personal data at all. Since it works also fully offline (then no traffic data is used) as well as online (using traffic data and live maps) I tend to believe that claim until proven otherwise.

breversa commented 5 years ago

FWIW, the french government provides traffic data in TraficXml/Datex2 format (even for commercial use), along with lots of technical data : https://diffusion-numerique.info-routiere.gouv.fr/

Licence : https://diffusion-numerique.info-routiere.gouv.fr/conditions-de-reutilisation-des-donnees-a2.html

Zimbelstern commented 5 years ago

Similarly, there is open traffic data for North Rhine-Westphalia, Germany's most populated state: https://www.govdata.de/web/guest/suchen/-/details/verkehrslage-los supplied by the government with a free-to-use licence: https://www.govdata.de/dl-de/by-2-0 Would be great to have an option to use Datex II data sources for routing.

eregwizard commented 5 years ago

For The Netherlands all kinds of open traffic related data can be found at http://opendata.ndw.nu/ , although I must admit I find it hard to interpret the data. Maybe there are people who are better at reading this?

seniorm0ment commented 4 years ago

One simple plugin were you can report traffic cues, police, accident etc witch pop up like an POI in one overlay.

I would like to bump this, it would be amazing to have. Specifically the police POI (assuming this is referring to traffic cop spottings), but the others as well. Not sure if Waze's API is open but if so maybe it could have an option to fetch police data from waze for your state? Seeing most people do use waze, it'd allow for a more seamless integration if possible. But either way, I really hope to see this implemented.

eregwizard commented 4 years ago

The extensions from z3rograv1tyx seem to extend this too much. Just traffic data so route planning can be adjusted or improved. The other stuff is not that relevant and encourages using the device while driving which is hazardous and instead should be discouraged.

seniorm0ment commented 4 years ago

@eregwizard

The other stuff is not that relevant and encourages using the device while driving which is hazardous and instead should be discouraged.

My suggestion is no different than the already implemented speed cameras plugin. Encourages is a user decision, and it does not even require user input during driving. Many people already do police spotting with waze, this is a common thing, it does not require user interaction. That is up to the user. It can be inputted from stopped locations, parking lots, etc. In no way does the user HAVE to interact while driving, this is a user choice. A disclaimer warning should be sufficient. Again, Waze has had this feature forever, and I may be wrong but I believe Google has implemented it into Google Maps as well. It's also worth noting that some (not all) police officers mark themselves on Waze. It can also act as a safety measure in the sense that it can provide around a half a mile heads up for the driver to take note that there is a officer there, people will be slowing down, and if the officer is in the middle of a traffic stop or whatever, it just helps the driver be more aware.

Either way, I guess maybe I had the wrong interpretation of "police" from OP, my bad. I will make a new thread for this feature request.

eregwizard commented 4 years ago

For me, a navigation app should support navigation, nothing more. Traffic data, stupidely still missing from OSMAnd is very relevant in navigation. Speed traps, police traps, etc. are not. Instead they support ignoring traffic regulations aimed at safey for all, again not navigation, but of course that's my preference for safety on the road..

connervieira commented 3 years ago

I think that live data using crowd sourcing would be perfect for OsmAnd. At the moment, if you want crowd sourced police locations, traffic, and construction, you have to use a proprietary app like Waze. I think OsmAnd is in the unique position of being one of the largest open source map applications currently available. Even though it's user-base is relatively small against something like Waze, I personally wouldn't hesitate to provide live data through the app with my phone on the dashboard.

scaidermern commented 3 years ago

Related to #6878.

breversa commented 3 years ago

Though not open-source (yet ?), Magic Earth (https://www.magicearth.com) both uses OpenStreetMaps AND has traffic warning. I don't know how, however, it's the navigation app by default in /e/ OS (https://e.foundation/) and I believe there are talks between the two to open-source the app. Might be worth having a look ?

derkrasseleo commented 2 years ago

Though not open-source (yet ?), Magic Earth (https://www.magicearth.com) both uses OpenStreetMaps AND has traffic warning. I don't know how, however, it's the navigation app by default in /e/ OS (https://e.foundation/) and I believe there are talks between the two to open-source the app. Might be worth having a look ?

Why not ask them how they did it? Maybe we can even find a deal so that OsmAnd could use their systems and just provides an Integration for reporting traffic etc.

Zimbelstern commented 2 years ago

Crowd-sourced information gets better with every additional user providing data. So, every app project engaging in a collaborative solution would benefit directly. If someone started an initative and reached out to other (more or less) open apps, a dream would come true. :-)

seniorm0ment commented 2 years ago

Agreed

eregwizard commented 2 years ago

Agreed. I expect a crowd-sourced solution limited to OSMand would not provide sufficient data. However, will sufficient apps having significant data be willing to share, reducing their own pre over others? So a solution alike to Magic Earth should be investigated better.

derkrasseleo commented 2 years ago

I contacted magic earth via the form on their website, I'll post here if I get an answer.

seniorm0ment commented 1 year ago

Related: https://github.com/osmandapp/OsmAnd/issues/8232#issuecomment-1611358378 (There is an app called HighwayRadar that has a lot of interesting features. It might be worth looking at how they do a lot of their aggregation, where they pull from, etc. Would be cool to see these features as plugins in OSMAnd.)

pm4rcin commented 6 months ago

I contacted magic earth via the form on their website, I'll post here if I get an answer.

Did you receive any reply?

derkrasseleo commented 6 months ago

I contacted magic earth via the form on their website, I'll post here if I get an answer.

Did you receive any reply?

Unfortunately not, maybe you try as well?

jm355 commented 3 months ago

From what I understand, magic earth basically collects traffic data from the user as they're driving to create crowd sourced traffic data https://www.magicearth.com/crowd-sourced-traffic/, I think it would be mutually beneficial if magic earth made a plugin for osmand that both collects and displays traffic data. Then they'd get more traffic data which makes their service better, and we get traffic data. It may not be entirely up to them tho, according to their faq they use a third-party for traffic. So maybe it would be worth finding the third party and working with them directly instead of magic earth? https://www.magicearth.com/faq-en/

Of course, the cost to getting traffic data is you contribute traffic data, which should be made clear, but I think it's a fair price to pay and would be a great option for people to be able to opt-in to.

derkrasseleo commented 3 months ago

according to their faq they use a third-party for traffic.

"We get it from a third-party provider; it is not created by us." leads me to think they exclusively use a third party for the traffic map, magic earth probably only provides user reports like accidents etc. on top of the traffic map layer

Looking closer at the url in the faq: https://www.magicearth.com/feature-availablity/#hd_traffic I don't think "hd_traffic" is a coincidence, tomtoms traffic api is also called HD Traffic

jm355 commented 3 months ago

At the bottom of the FAQ, under Others->Do you share data with third parties? they say "We send position data to our traffic provider to generate real-time traffic information. The data is anonymized on the phone, using a changing key (so it's not linked to you), and it is deleted after 5 minutes." so they do send data to the traffic service

scaidermern commented 3 months ago

so they do send data to the traffic service

I haven't checked but I can imagine traffic data providers (such as TomTom) require sending this kind of data when using their service.

derkrasseleo commented 3 months ago

so they do send data to the traffic service

I haven't checked but I can imagine traffic data providers (such as TomTom) require sending this kind of data when using their service.

Yeah, I also think so, but my point was that magic earth themselves probably don't process data / generate a traffic map and rely on tomtom for that, which is not optimal from an open source perspective. For me, I would be fine with sharing my data to get traffic information in return, but in the ideal scenario, that would be more transparent than trusting some company. But that goes too far for now.

jm355 commented 3 months ago

At a high level it seems like it would be relatively straightforward to develop an open source version that osmand and organic maps (and maybe magic earth or anyone/open source?) could use, if you have the speed limit of the road. If traffic is enabled, then in the driving profile you upload the current speed of the vehicle, and then on the server side how bad traffic is would be a function of how far below the speed limit the average speed of users is.

That would be a super naive implementation, and then some improvements after that super basic structure could include taking into account stop signs/lights/intersections, or only uploading traffic data after the person has been moving faster than a certain speed (like 15mph) for a certain amount of time (like 1 minute)

derkrasseleo commented 3 months ago

The client side is probably really not that hard to implement, but the question is how is the data handled? Who does provide the infrastructure/servers? How is it funded?

jm355 commented 3 months ago

That part I have no idea. Maybe OpenStreetMaps could also be in charge of the server for it?

derkrasseleo commented 3 months ago

I just came across this, looks very interesting but unfortunately unmaintained: https://traffxml.gitlab.io/ There even is a server: https://gitlab.com/traffxml/traff-server And this app, that can forward traffic messages to other applications that understand the "TraFF" format: https://gitlab.com/traffxml/roadeagle

derkrasseleo commented 3 months ago

In my dreams, there are OsmAnd, Organic Maps and maybe Magic Earth collaborating on this issue.

derkrasseleo commented 3 months ago

We should keep in mind that we are talking about different types of information here:

scaidermern commented 3 months ago

That part I have no idea. Maybe OpenStreetMaps could also be in charge of the server for it?

Probably not. The OpenStreetMap project is about raw map data. Not about height maps, not about contour lines, not about weather data, not about traffic data.

jm355 commented 3 months ago

I emailed magic earth support about the idea of an osmand plugin that would send/receive traffic data, and they said they "wrote a ticket for our routing team to consider implementing this in a future release of Magic Earth". So they may not have understood exactly what I was asking, but I responded to them to clarify that it would be a new plugin for the OSMand app

derkrasseleo commented 3 months ago

I emailed magic earth support about the idea of an osmand plugin that would send/receive traffic data, and they said they "wrote a ticket for our routing team to consider implementing this in a future release of Magic Earth". So they may not have understood exactly what I was asking, but I responded to them to clarify that it would be a new plugin for the OSMand app

Interesting that you even got a response, I emailed them a while ago and never heard back from them..

holzdieb commented 2 months ago

What About Google Maps? As a user, I have the option of integrating the traffic data from Google Maps as a layer and placing it over the map.

This means that I as a user actively decide to use this data.

Since Osmand offers this option, why not use this data for routing? This means that if a traffic jam or a road is closed according to Google data, this should be included in the route guidance. And not that OsmAnd then constantly tries to send you to a blocked road and the user has to search for an alternative route themselves.

I see another possibility purely for Germany here:

https://mobilithek.info/

The data is provided free of charge (open data) by the German government.

jm355 commented 2 months ago

How do you get the google maps traffic data?

holzdieb commented 2 months ago

How do you get the google maps traffic data?

This is quite simple.

http://mts0.google.com/vt/lyrs=h,traffic&x={1}&y={2}&z={0}&style=3

Then select gtraffic in the navigation settings under Overlay and you will have the same color display as with googlemaps.

scaidermern commented 2 months ago

What About Google Maps? As a user, I have the option of integrating the traffic data from Google Maps as a layer and placing it over the map.

This means that I as a user actively decide to use this data.

Since Osmand offers this option, why not use this data for routing

You can't perform/influence routing based on raster tiles. Google doesn't provide raw traffic data, does it?

holzdieb commented 2 months ago

What About Google Maps? As a user, I have the option of integrating the traffic data from Google Maps as a layer and placing it over the map. This means that I as a user actively decide to use this data. Since Osmand offers this option, why not use this data for routing

You can't perform/influence routing based on raster tiles. Google doesn't provide raw traffic data, does it?

I don't know what Google provides and how. I only know that I can integrate Google's traffic data into OsmAnd. It was just one of 2 suggestions on how to integrate traffic data into OsmAnd.

Without this data, OsmAnd is not a real alternative to existing navigation devices / software.

It also doesn't really help if I can enter any traffic situations, such as route closures, directly into OsmAnd and then use them for the next time. That doesn't help me in the current situation. Especially not if, like me, you drive a 26-meter-long vehicle that you can't just turn around.

I have attached a link for Germany, where traffic data is provided free of charge by the German government. Maybe you can do something with it.

Alternatively, you could also use a subscription model. That's what TomTom does. An annual subscription for 30 euros and you have TomTom Traffic with you. Apart from that, only the software updates.

Personally, I wouldn't have a problem with that.

TobiPeterG commented 2 months ago

I would love to see an open traffic API. And I guess other apps like organic maps would also be very interested in this. How I could imagine this to work, is something similar to this: https://github.com/opentraffic/otv2-platform

Have a Server that aggregates the traffic data and this could then also allow online routing, e.g. using Valhalla, as opentraffic already uses it. So maybe take that as a base and expand it for the features OSMAnd needs?

TobiPeterG commented 2 months ago

I've created an initial README summarizing discussions o nthe organic maps side. https://github.com/TobiPeterG/OSMTraffic

Please have a look and check if the points are valid and if I should change or add something :)

TobiPeterG commented 1 month ago

I created an initial server in go that can be built with docker-compose: https://github.com/TobiPeterG/OSMTraffic-server

It uses the Autobahn GmbH API to get traffic information in Germany and their response is reformated to GEOJson. Please tell me if this is the desired format that OSMand could use and how OSMand would request the traffic info (e.g. coordinates?)