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

I want to create an android project about street intersections! Like I choose a street name, starting point and the radius. Then the program gives me an array of the The streets that cross that one in that radius as a list of street names in another list activity. When I choose one of the streets I want to be redirected to the map at their intersection point. So how can I use a openStreetMap API.To create this? Any suggestions are pleased.

This question is marked "community wiki".

asked 07 Sep '15, 11:52

AzaWiza's gravatar image

AzaWiza
26114
accept rate: 0%


Except in a very loose way, the answer is no. The OSM API is primarly for editing OSM data and doesn't do very much outside of providing you with the data for a specific region.

The Overpass API provides more in the way of advanced queries, but I suspect your requirements will require loading OSM data in to a geo-aware database (for example Postgres with the PostGIS extension) and performing the corresponding spatial queries yourself. Before you do that you should read up on the OSM data model and the various possible database schemas.

permanent link

answered 08 Sep '15, 08:36

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

That is exactly what I was Looking for! Thank you! Are there any way to send a query to overpass turbo from an android device? Like Now I have OSM map on my android devidce. by choosing a specia area there, Can I write a query in getText field like this one
"[bbox:{{bbox}}];
way[highway][name="Юнусалиева Болота проспект"];node(w)->.n1;
way[highway][name="Скрябина улица"];
node(w)->.n2; node.n1.n2;
out meta; "

ANd get the result of the query in txt format. like this

[bbox:42.84342093245924,74.60618019104004,42.85234094569768,74.63012695312499];
way[highway][name="Юнусалиева Болота проспект"];node(w)->.n1;
way[highway][name="Скрябина улица"];node(w)->.n2;
node.n1.n2;
out meta;

(10 Sep '15, 03:21) AzaWiza
1

Sure, this is possible. Just send a corresponding HTTP request and parse the response. See the various examples in the Overpass API language guide.

(10 Sep '15, 07:43) scai ♦

You should mind your terminology though. Overpass Turbo is a website build around Overpass API which just makes it easier to write queries. A bit like an IDE build around a compiler. Overpass API is one of the public instances that you can call via HTTP requests. However, Overpass API may also refer to the open-source software used to power the public instances.

(12 Sep '15, 11:48) Sanderd17
1

@Sanderd17:

Overpass API is one of the public instances that you can call via HTTP requests.

Did you perhaps mean: overpass-api.de is one of the public Overpass API instances (in fact it's the main instance) that you can call via HTTP requests? Some of the other public instances are listed here.

(12 Sep '15, 13:54) mmd
Your answer
toggle preview

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:

×67
×49

question asked: 07 Sep '15, 11:52

question was seen: 5,843 times

last updated: 12 Sep '15, 14:06

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