I want only to extract the statistics, like the number of POI`s, buildings, for a specific city from a weekly planet dump, or somewhere.

So i can show to the users of that city, Bucharest in my example, how the map is evolving from week to week, and make a interactive chart

asked 02 Sep '12, 13:15

Badita%20Florin's gravatar image

Badita Florin
1128913
accept rate: 0%

I see that in nominatim you can select like this.

Maybe this would help in a way

http://nominatim.openstreetmap.org/details.php?place_id=34846811

(02 Sep '12, 13:25) Badita Florin

If it is a small area you can use Overpass API to directly get all POIs you are interested in inside a given bounding box.

Please type

<union>
  <area-query ref="3600377733"/>
  <recurse type="up"/>
</union>
<print/>

into http://overpass-api.de/query_form.html.

This gives you exactly the OSM elements within the city border of Bucharest.

For a larger area consider using a planet extract. Afterwards you could use a combination of osmconvert and osmfilter to filter out the interesting data and finally do you calculations.

permanent link

answered 03 Sep '12, 18:19

scai's gravatar image

scai ♦
31.4k18285439
accept rate: 23%

edited 04 Sep '12, 07:31

Roland%20Olbricht's gravatar image

Roland Olbricht
6.4k35986

1

Given that a PBF for the whole of Romania is only 71Mb, I'd suggest that Overpass is the way to go.

(03 Sep '12, 22:03) SomeoneElse ♦

Thank you very much, i did this and get a 21 mb file called

interpreter

Without a extension

I will google for what to to with this or if i did something wrong

(14 Sep '12, 14:14) Badita Florin

On the "save" dialog it will probably have said what it was - an XML file (at least, that's what Firefox told me).

To see how many buildings are in there you can do something like:

grep 'k="building"' interpreter | wc
   14425    43281   462468

Similarly for other tags and values.

If you're on Windows and don't have GNU Utilities such as "grep" there try this.

(14 Sep '12, 16:29) SomeoneElse ♦
1

Btw: 3600377733 = 3600000000 + ID of the Bucharest relation http://www.openstreetmap.org/relation/377733

(16 Jun '14, 18:57) simon04

I am not an expert about that, but you should try to import the raw weekly or daily diffed planet data into a database and then do a database query about special elements.

permanent link

answered 02 Sep '12, 19:25

stephan75's gravatar image

stephan75
12.5k453209
accept rate: 6%

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:

×71
×17

question asked: 02 Sep '12, 13:15

question was seen: 3,443 times

last updated: 16 Jun '14, 18:57

powered by OSQA