I have a osm-viewer (something like JOSM) and I want to edit some data (offline ofc), like make out of a 1 lane roundabout a 3 lane one,.. I want that the user can click on a way and then edit this way. After that I need to find out on what node he is pointing and then I get with the help of the API the way:
But the problem is I dont know how to get nodes from the Coordinates.. I mean Plan B would be to go through all nodes on the downloaded .osm-file and then use the found ID, to get the right way, but this would be much more code. EDIT1: I have downloaded a map area wich the user has selected over the rest API (as .osm file). Now I focus my Map-Viewer (like the download osm data dialog from JOSM) on the selected area. And when the user clicks on a point on the map I get long and lat and with this data I'd like to ask the API if there are any ways on this point (I'd first ask for the nodes and over the nodeID I get the way) asked 04 Sep '15, 13:10 carlilord |
So you just want to get all (or specific) data at a specific position, i.e. inside a bounding box? Then look at the Retrieving map data by bounding box API call. If the bounding box is larger or if you need more flexible queries then take a look at Overpass API which also has a all data in a bounding box query. answered 05 Sep '15, 08:22 scai ♦ Sorry thats not what I meant. I clarified my answer on EDIT1.
(05 Sep '15, 10:20)
carlilord
Are you sure? Sounds exactly what you want to me. Grabbing nodes (or ways) in a given area. Although I don't understand why you need an API call in the first place since you already have all that information in your .osm file.
(05 Sep '15, 11:11)
scai ♦
i know but the file could be pretty big and I'd have to do the filtering. I just wanted to know if there is an easier way over the rest API. Guess I'm building the logic myself then^^
(05 Sep '15, 11:18)
carlilord
|
@carlilord Did you succeed in accomplishing this?