Hi all,

I am trying to downsize / shrink the map of The Netherlands by leaving only information about a single city (Laren).

I have done the following:

osmconvert netherlands-latest.osm.pbf -o=netherlands-latest.o5m
osmfilter netherlands-latest.o5m --keep="addr:city=Laren" -o=nl-Laren.o5m

The new map of Laren is imported with the nominatim setup.php script:

./src/utils/setup.php --osm-file /app/src/nl-Laren.o5m --all

The above one is a part of a Dockerfile that I'm using: nominatim-docker. The only thing I have changed in the Dockerfile is putting the new small map of Laren.

However, when I use the web interface or the REST api trying to search by address or postcode I get no results. It looks like not all of the tags or object relations have been preserved after I shrinked the map with osmfilter.

Am I missing something when applying the osmfilter? I would like to leave only nodes related to this city.

Thanks in advance, Peter

asked 08 Sep '17, 09:11

pesho318i's gravatar image

accept rate: 0%

edited 08 Sep '17, 09:15

You need to import essentially all (well not quite) data for the area in question to allow nominatim to build its object hierarchy, in particular not just the objects with addresses but the streets in the area too.

With other words instead of using osmfilter you should create an extract of the city in question with a suitable tool (you will need the a bounding box or a boundary polygon for the area in question), for example with http://osmcode.org/osmium-tool/ or http://wiki.openstreetmap.org/wiki/Osmosis

permanent link

answered 08 Sep '17, 10:15

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 19%

edited 08 Sep '17, 11:36

Thank you, @SimonPoole!

Apparently I was using the wrong tool. Osmium-tool did the job! I used a bounding box instead of polygon, that was enough for me.

Have a great day!

(08 Sep '17, 14:57) pesho318i
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



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:


question asked: 08 Sep '17, 09:11

question was seen: 684 times

last updated: 08 Sep '17, 14:57

powered by OSQA