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

0
1

Hi there,

Im working on an Android App and trying to highlight a complete street. Right now Im doing this by the coordinates which are given to me by making a HTTP Request to nominatim. But unfortunately it doesnt give me the whole street, but only a small part of it.

So my question is: How can I achieve it, that I get all the coordinates which are shown to me when I search like this: http://www.openstreetmap.org/way/3957228

Thanks for your help! cheers Jan

asked 04 Dec '16, 21:38

janPhil's gravatar image

janPhil
10112
accept rate: 0%

1

Where are you fetching your data from? (Note that the API provided at openstreetmap.org is only really for the use of editing software.)

(05 Dec '16, 13:46) Richard ♦

Downloading from https://www.openstreetmap.org/api/0.6/way/3957228/full will return the way including all of its nodes. Read the API documentation for more information.

Please keep in mind that his API is mainly for editing the map as already explained by Richard. Read the API usage policy.

permanent link

answered 05 Dec '16, 15:13

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

Hey Scai,

thanks for your answer! The App is just for my Master thesis and so its only a showcase. I will only make a few requests per day, not many.

Thanks again!

Jan

(06 Dec '16, 09:50) janPhil

As @scai suggested you can use overpass api

Get Method as JSON output:

http://overpass-api.de/api/interpreter?data=[out:json];way(24777894);(._;>;);out;

Post Method with curl as XML output:

curl \
  -H "Host: overpass-api.de" -H "Content-Type: text/xml"  \
  -d 'data=[out:xml];way(3957228);(._;>;);out;'  \
  http://overpass-api.de/api/interpreter  \
  -o my-way.osm
permanent link

answered 06 Dec '16, 11:25

Gagan's gravatar image

Gagan
3053515
accept rate: 14%

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:

×689
×167

question asked: 04 Dec '16, 21:38

question was seen: 5,790 times

last updated: 06 Dec '16, 11:25

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