Hi guys, Here is what I have in my mind:
I haven't worked with OSM APIs, so I don't know what they can do... which would work together better, and where should I implement my own codes. I read wiki.openstreetmap.org, but there where little information about each APIs and it would be nice to see a lot of sample codes so I can get ideas from them, there are only a simple project with each API, not a compilation of them. asked 19 Jul '15, 12:18 youyeg
showing 5 of 8
show 3 more comments
|
Hi youyeg, two rules for this forum; its specific for OSM troubles, not for developers and theyre troubleshooting. ask one question at the time, so that you end up whith an clear answer to your question. Greetz Ps Try to ask or take a look here http://wiki.openstreetmap.org/wiki/Develop answered 19 Jul '15, 16:08 Hendrikklaas Hi, could you please link me to the proper section? Thanks. :)
(20 Jul '15, 05:30)
youyeg
|
As Richard has said, public libraries to do what you want in its entirety do not exist (on any platform). As you've found, there are solutions to some parts of the problems that you're posing yourself, but not others, and certainly not all together. Where you go next is likely to depend on what it is that you're actually trying to do and how much money you've got - are you trying to develop a commercial app, or is this just a college project? If the former, then paying someone someone else to help you with what's possible, what's not and how much it'll all cost is surely the way forward. There are some possibilities listed here, and I'm sure there will be suggestions in the wiki too. If the latter, then obviously you have to develop something yourself. I'd suggest breaking the problem down into parts and seeing what bits OSM data can help with and what parts it can't. The essence of OSM is that 40Gb of data that you've downloaded - what you do with it after that is up to you. answered 19 Jul '15, 22:25 SomeoneElse ♦ |
OK. But, what I was looking for was what the existing APIs can do, and where should I try to fill the gap. It would be very appreciated if someone could say: A can do this, but has this limitation, and B can do that part for you and... I couldn't even find collection of examples in OSM, just API and an example only for that API. I wish I could find a slightly similar project and look into it and then finally figure out what should I do! answered 20 Jul '15, 03:10 youyeg |
For Android you can try mapsforge and GraphHopper which both are running offline on the device. GraphHopper includes a simple Android demo including some maps to download. GraphHopper also runs on iOS too, but I do not know much about offline libs for maps there. (note: I'm the author of GraphHopper) But traffic data and offline is not fitting well together :). Though you can integrate traffic in the routing but your devices need online access - see this blog post answered 23 Jul '15, 10:11 peatar Thanks, I began to work of GraphHopper, and I will ask if there were anything to ask. I thought I could have something like MAMPS.ME (MapsWithMe) so routing data and maps data could be together. Would it be possible? With GraphHopper? :) Thanks.
(24 Jul '15, 08:47)
youyeg
|
This is way too ambitious for a simple help.openstreetmap.org answer. Essentially you want a complete mapping stack customised to your own requirements. Your requirements would take an OSM specialist days, even weeks to build (and several parts, such as train schedules and traffic levels, are not included in OSM at any rate). I think the nearest you'll get is checking out Mapbox's paid-for plans (http://mapbox.com), which are substantially OSM-based, and seeing if any of them come close to your requirements.
I don't know where to began and choose which APIs. I need to know where I should began to implement my own parts, and where I can use others' work. I explained, so you know where I am to go. Thanks..
First of all, openstreetmap.org's API is for editing. You're not building a map editor, so it's not relevant to you. You will need to use third-party components based on OSM data. As it happens, since you want offline use, online "APIs" per se probably aren't much use.
As SomeoneElse said, you need to break the question into parts - you have asked for simply too much. But at a very rough stab, look at GraphHopper for routing, and the Mapbox SDKs for map display. Traffic information is not included in OSM, nor are public transport timetables. I don't know of any modern, common library that uses the same info for map display and for routing.
You know, the reason why I explain my work as a whole was that the reader know what I need. Surely if I wanted to ask separately I should have give explanation for each API I think I might need, and I thought it would cause further confusion. Anyway, I looked into Mapbox, and began to read its documents. About the traffic, I was thinking if it is possible to give the routes a weight, like a graph, so the nearest destination calculate base on the sum of weights. I don't expect that I have all I want at once, I want a library to access to map, a library for routing, and a library to display the map, and I know I should develop rest of it on my own. Could you please recommend those library which work best together? Reading map, Displaying map, and Routing. Thanks :)
Well, the general expectation is that you try and find some stuff out yourself, and then come here when you're stuck.
Yes, you can give segments in a routing graph a weight, using OSRM or GraphHopper or any similar library. I'd suggest you download one, play with it, and then ask again here if you're having troubles.
Bear in mind that OSRM (aka Mapbox Directions) will not run comfortably on-device, whereas GraphHopper can.
Thank you Richard.
The main OSM API is only for editing so you won't be using that. Then there's a Nominatim API operated by the project which allows you to find places on the map of which you only know a name. Then there's project-osrm.org which is a third-party OSM based routing engine that finds you the fastest route from A to B. Then there's overpass-api.de which is a third-party search service for the OSM database that can do more "programmer like" queries than Nominatim can. All of these services require an online connection and have strict usage limits. If you want to go offline then you might want to look into "libosmscout". But if you hope that there are ready-made components that you just have to mix and match then you will be disappointed; existing libraries will only do a small part of what you are looking for.
Your answer was very helpful Frederik, I wish I know more about OSM-based free offline APIs so I could combine and develop what I need. I looked into wiki.openstreetmap.org, but there were no comprehensive list of OSM-based projects, it would be great if there were a list with features of each one. Anyway, I should thank you a lot. :)