NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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:

Ways for node: GET /api/0.6/node/#id/ways

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's gravatar image

carlilord
46226
accept rate: 0%

edited 05 Sep '15, 10:18

@carlilord Did you succeed in accomplishing this?

(27 Dec '16, 15:25) kamalpreet

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.

permanent link

answered 05 Sep '15, 08:22

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×205
×144

question asked: 04 Sep '15, 13:10

question was seen: 7,724 times

last updated: 27 Dec '16, 15:25

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum