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

I am new to OSM. I have a result of a map-matching algorithm on some trajectory data (GPX) and the returned results are defined as (waypoint id, start node, end node)

I want to retrieve the name of the street from the waypoint id? How to do so?

For example in Nominatim service the response is in the XML form. But I cannot find a suitable service for getting real names from ids in OSM. I found this:

This page returns the map of way point. But I want the ref name St 2572

And as another question How to get All this data (the data for a city) for educational and research purposes?

asked 04 Feb '15, 15:01

Alamdari's gravatar image

accept rate: 0%

edited 04 Feb '15, 15:09

use an OSM API to query this way's data. Do not use the main – editing – API, it is okay for very small tests though. Example URL for the editing API. Example URL for the Overpass API. Now just process the XML as usual to get your desired tag. With Overpass API you also could get other output formats if you do not want XML.

For your "data for a city" question: you can use the Overpass API for quite many requests, see its wiki article. Or do you want to download the raw OSM data for a whole city? Please search our question collection for older questions about getting data extracts and ask a new one if you cannot find anything.

permanent link

answered 04 Feb '15, 16:10

aseerel4c26's gravatar image

aseerel4c26 ♦
accept rate: 18%

edited 04 Feb '15, 16:15


Thank you! The OSM API is what I need. Thanks a lot!

(04 Feb '15, 17:10) Alamdari

As said, you shouldn't use the API for thousands single id requests. Instead, you should download the area into your local disk, either with an editor like JoSM (and the 'save as') or using some planet file extracts (check the wiki to find web sites offering extracts at country or even major city levels). Once you have the data locally, you can find your ref's by different means (manually or by scripts).

(05 Feb '15, 11:21) Pieren

@Pieren: while getting a data extract could still be the best/most fast solution it is okay to query Overpass API with those requests, if I understand its service description correctly. Maybe Alamdari even means Overpass API, because I have coined my link "an OSM API" which also lists Overpass.

(05 Feb '15, 12:13) aseerel4c26 ♦

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 04 Feb '15, 15:01

question was seen: 5,736 times

last updated: 05 Feb '15, 12:13

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