Can we get Speed limit information from Waze APIs? - android

I've been trying to develop speed limit application & have tried many different approaches to get done .
I have used Overpass APIs & it did good but it did not have speed limit information for few of locations around Europe & also installed Velociraptor which uses OSM map & HERE Maps APIs still they failed to get data . Here is screenshot of Velociraptor app :
Yesterday I came across osmbonuspack & it looks promising as it allows us to choose from 3 best routing services available but Author of osmbonuspack told me that unfortunately, the 3 routing services are not returning speed limit information. Refer : Is it possible to get speed limit data using OSMBonusPack?
I have installed Waze application & it has speed limit data for locations around Europe which are not available from above options. So , anyone has a idea how they are getting information OR anyone knows which datasource they are using ?
Any suggestions would be appreciated.

I'm afraid Waze does not use another data source or at the very least not one unique data source that you could use. As a crowd-sourced application it relies on the information entered by map editors via the Waze Map Editor. Some editors might have used some open data sources available for their regions (if permitted by their local organisation), but it's far more likely they've used their local knowledge, Google Street View (Waze has a special license for that) or user reports sent in via the app.
As the map used by Waze is not open data, I'd highly advice against attempting to retrieve the speed data from their map. They have not exposed this information in an open API, which should be a strong indication that reuse of this data is not permitted.

OSM tagging is rich and flexible, but can be quite difficult to interpret.
Typically, max speed information is certainly there (the various routing services are based on it). The point is: how it's defined?
Have a close look here: http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Maxspeed
And you will discover that getting maxspeed tag is not enough...
Then, refining your Overpass queries, maybe you will be able to get it everywhere!
Other hint: look at OSRM source code (or ask them), to see how they get this information.

Related

How to retrieve Google Directions GPS data from real device

I'm trying to make an application based on Google Directions (Maps) API. Basically, I'll develop a mobile app which will tell users where to navigate with their cars and I'll monitor the actual trip (route followed, time, speed etc). Then, I'll need to process the data retrieved in order to display it on a web platform and compute some statistics.
My questions is, which API should I use and how? I've actually searched about this topic but I couldn't find something useful (like a tutorial) regarding this subject, given the fact that I'm new in this domain and I don't know how to begin and what to do.
Thus, I would really appreciate if you can give me some steps that I must follow in order to accomplish this. Also, all types of materials (tutorials, documentations, articles and anything regarding that subject and tips for really beginners) would be very, very helpful for me!
Refer the following link for directions API documentation.
https://developers.google.com/maps/documentation/directions/intro
You can refer the following link for parsing directions.
https://github.com/jd-alexander/Google-Directions-Android
On Location Listener,listen continuosly your current location and store in a list and after the trip is completed,You can use that list that which path that the user as travelled and do your algorithm according to your requirement.

Is it possible to get speed limit data using OSMBonusPack?

I've been trying to develop speed limit application & have tried many different approaches to get done .
I have used Overpass APIs & it did good but it did not have speed limit information for few of locations around Europe & also installed Velociraptor which uses OSM map & HERE Maps APIs still they failed to get data . Here is screenshot of Velociraptor app : Screenshot Image .
Yesterday I came across osmbonuspack & it looks promising as it allows us to choose from 3 best routing services available . So , before I proceed with implementation I thought it might be useful to get suggestions on if we can get speed limit from this project.
Any suggestions would be appreciated.
Unfortunately, the 3 routing services are not returning speed limit information.
Options:
contact them directly to convince them to add speed limit per segment
fork an open source one (OSRM?), and implement yourself
back to OverpassAPI or Velociraptor

MapBox Find terrain class by coordinates in Android

I spent several hours looking for simple solution and still haven't found one.
MapBox style editor uses this simple feature. That you can hover and click over map, and it shows small popup stating all terrain classes you enabled in your map.
Question, how to do it in Android version of MapBox given I have installed my style. Now I want click on any place in the map and get the same popup stating, for example, that this is building, woods, background here. Or other place would satte, that this is major road.
This IS doable as MapBox studio itself shows. i can't believe it uses some API not available for anyone, as this is one API no map provider gives, while still able correctly draw terrain. What so complex to add this API?
And NO I am not interested in address. I am interested exactly on terrain, for simple task - distinguiosh water from non-water, road from non-road, building, from non-building, don't care where it is by address, so reverse geolocation does not work. Or simpler - I need SIMPLER geolocation, than address.
Your questions kind of confusing but I'll try and help. If I'm reading correctly, you are trying to create an Android app that uses an API similar to Mapbox Studio that allows the user to select/distinguish the difference between objects on the map such as buildings, water, forest, etc.
If this is the case, then first you must understand that Mapbox Studio is using OpenStreetMap data to distinguish between objects. These objects are stored in a database with tags. It's tough to explain so i'll just leave a brief reading wiki page that might help.
To my knowledge, there isn't any API's specific to Android that will give you the kind of information you're looking for. However, if I was in your dilemma I'd take a look at the Overpass API as it's a complex query tool that allows you to send coordinates to it and it will return all the tags (such as building or water) at that location within a JSON object. From there you can parse and use the data in your app. It is very powerful so I suggest reading up on how to use it and test using a website called Overpass Turbo, that's if you decide to use it.
Nevertheless, I hope this helps and I understood your question correctly.

How do I go about creating vector maps from GPS data, deploying it on a server, and then navigating on it from a mobile device?

We considered using Google Maps API for our purpose, but it does not have a way to add custom roadblocks. Since our delivery is time-bound, we can't have our shipments face closed gates, roadblocks, and so on. An ideal solution would have been to tell Google to avoid certain routes if they pass through such points - but there is no way to do this, as yet.
Interestingly, this is an acknowledged issue from Google.
The next best solution for our logistics vertical is to go full-blown on the thing: use GPS data (images, longitudes and latitudes) and create a vector map, host it on a server, and have a device navigate on this freshly-created maps.
How would one go about this? What are the resources and tools required to achieve this?

Alternative(To Google Maps) Open Source Map API that provides a database of nodes and Arcs on roads

I need a Map API for Android that can provide me with indexed nodes and indices that make up the road network. The main idea is to determine if two GPS devices are on the same road. Thank you in advance
A Map API by itself will not have that information. Anyway, you can get it from OpenStreetMap freely. You can download it from here.
I don't understand from your question if you intend on displaying the results on a map. If so, and you want a nice and free map API, I would suggest Leaflet. It's not as mature as the likes of OpenLayers but, as you've tagged this post with "android", Leaflet just kicks ass in the mobile department.
OpenStreetMap is definitely a good source of data for this kind of project. Unlike google maps, it gives developers access to the underlying vector data of a map (fully open). This allows interesting new use cases which simply are not possible with google maps, and something involving geometric calculations like this would definitely fit into that category. You either need OpenStreetMap or some other source of "vector" map data, and beyond OpenStreetMap this can be expensive.
Unfortunately that's not the full answer to your question. You still have a lot of work to do to use the data in the way you intend. You need to calculate the proximity of two points (GPS readings from two devices?) to nearby roads, and figure out which road the point lies closest to. It's the kind of powerful geo calculation you might do using a GIS package such as QGIS or a functions of a geo-aware database system PostGIS.
But that's not the answer to your question, because you need to do these calculations on device. I'm not aware of an off-the-shelf library to do this on android. I think you would have to roll your own.
But another challenge is to get the vector data onto the device in a suitable format in the first place, and this is the first thing to solve. You'd want the vector data either as a large download for a whole country, or perhaps a smaller area, perhaps with an on-the-fly download feature within this app. Whole countries are not infeasible when working with maps in vector form (ever tried the awesome MayDroyd app?), but require some compact formatting. Happily some of these problems are starting to be solved in open source off-the-shelf libraries. You could try to build on top of MapsForge for example.
So then you're back to the challenge of writing on-device code to poke around in this data and do the calculations you want to do. I suppose it could be rather good if projects like MapsForge included generic PostGIS style geo-functions to make this easier. Something to ask the mapsforge developers about perhaps.

Categories

Resources