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

0
1

Hi everyone, my situation is the following:

I'm starting to develop an Iphone application which deals a lot with the position of the user. The idea is that, when he is at certain positions, he receives different kinds of files, somehow related to that position. I've got no problem with unique positions which are "detected" by the GPS, but it's important for me that I'm able to allow that the user receives files also when he is near from, for example, a hospital, any hospital in germany. And here is where OSM comes. I already downloaded the map from Germany (germany.osm.pbf [1.12 GB]) but I could not really open it, because I have problems using Osmosis. Right now I'm questioning myself if I even need Osmosis or there are other ways to obtain that data.

So, my actual question is; having the map from Germany, how can I see the information that is inside and extract the position of all the hospitals (for example) that it contains?

As you can see, I'm quite lost, so any kind of help would be really appreciate it.

asked 06 Mar '12, 11:17

AlvaroSantisteban's gravatar image

AlvaroSantis...
16113
accept rate: 0%


You can use one of the APIs to only get the data you need.

With Overpass API you can do something like this:

<query type="node">
  <has-kv k="amenity" v="school"/>
  <bbox-query e="7.25" n="50.8" s="50.7" w="7.1"/>
</query>
<print/>

you can test on http://www.overpass-api.de/query_form.html

There is more info on Overpass on http://wiki.openstreetmap.org/wiki/Overpass_API

You can also try XAPI: http://wiki.openstreetmap.org/wiki/Xapi

The Overpass server also supports XAPI and is usually very fast.

permanent link

answered 06 Mar '12, 11:47

Dymo12's gravatar image

Dymo12
79611016
accept rate: 12%

edited 06 Mar '12, 17:41

Thanks, it looks exactly like what I needed. :) Just more thing: where can I find the meaning from each possible condition (e, into, n, etc)? I understand that in the query you wrote it's searching for all the schools inside a certain range, but I'm not sure which one. The query returns something like 29 Schools, inside two or three cities.

(06 Mar '12, 12:20) AlvaroSantis...

"into" is actually not necessary in this case, so i have removed it from the example. You can find info on the wiki and on http://www.overpass-api.de/ about how to make more advanced queries and in several different ways depending on your needs.

(06 Mar '12, 17:45) Dymo12

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:

×275
×202
×83
×19

question asked: 06 Mar '12, 11:17

question was seen: 9,414 times

last updated: 06 Mar '12, 17:45

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