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

0
1

Hey, I want to get all existing points of interest in a city like e.g. New York. Is there a simple way to do that and get it as an XML file?

I already tried this search: "http://nominatim.openstreetmap.org/search?q=new+york[hospital]&format=xml&polygon=0&addressdetails=1" But I don't know how to eliminate the term "hospital" so that I get all the POI in new york. Is there a way to do that with this tool or do I need a completely another way?

Thanks in advance :) Sebastian

asked 24 Jun '15, 21:43

conansc's gravatar image

conansc
35225
accept rate: 0%

3

Did you checked out already http://overpass-turbo.eu ?

(24 Jun '15, 22:12) iii

For a similar task, I have used a combination of Osmosis and Osmfilter:

  1. download an extract for the desired area (e.g. http://download.geofabrik.de/north-america/us/new-york.html )
  2. find out the coordinate box you're interested in (the above gives you the entire Empire State :))
  3. extract a .osm file (substitute the box values from step 2, the below ones are obviously nowhere near NYC):

osmosis --read-pbf file=inputfile.pbf --dataset-bounding-box bottom=49.75 top=50.35 left=14.05 right=14.87 --write-xml file=nyc.osm

4 . filter the resulting XML using osmfilter:

osmfilter nyc.osm --keep="amenity=" --keep-ways="amenity=" --keep-relations="amenity=" > amenities.xml

The above will give you everything tagged "amenity" - this should cover many POIs; check the OSM wiki for other tags which you may want to see.

permanent link

answered 26 Jun '15, 08:42

Piskvor's gravatar image

Piskvor
1.3k91535
accept rate: 37%

edited 26 Jun '15, 08:43

1

You can probably replace the bounding box with a poly file to cut just the city you want. A good source for polyfiles straight from OSM boundaries is https://wambachers-osm.website/boundaries/

(26 Jun '15, 09:27) joost schouppe

Good point - wanted to keep the answer simple.

(26 Jun '15, 15:04) Piskvor

Thank you for your answers :)

I have decided to use the .osm files and write my own parser for them, because I need to automatize the whole step with JAVA EE.

permanent link

answered 30 Jun '15, 01:14

conansc's gravatar image

conansc
35225
accept rate: 0%

edited 30 Jun '15, 01:18

Please try the search feature of this FAQ site und use keywords like "export POI" or similar ...

there have been already several questions like yours ... and good answers.

permanent link

answered 25 Jun '15, 16:29

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

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:

×181
×107

question asked: 24 Jun '15, 21:43

question was seen: 7,718 times

last updated: 05 Jul '17, 08:16

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