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

I thought Nominatim and Overpass have the same data base. But the tags in the search results are quite different e.g. has this request in Overpass

more information for the same node than this in Nominatim

In this case of a charging station, 'voltage', 'socket', and 'capacity' are interesting values!

I do not want to host two databases, but I would like to have all the possible information! Overpass is a bit slow so preferably I would like to use Nominatim, which seems to have less infomation.

Is there any setting which I missed to improve the Nominatim result?


asked 31 Oct '16, 11:07

autumnus's gravatar image

accept rate: 0%

Overpass API returns all tags of the object since querying for specific tags is one of the main purposes of this API.

Nominatim in contrast is a geocoder. It doesn't need information like 'voltage', 'socket', and 'capacity' to answer geocoding requests. Stripping the database of unnecessary information will probably lead to faster search results, reduced time during import and updates and less disk space requirements.

However Nominatim will always include osm_type and osm_id information. The type and ID allows you to retrieve the original OSM object, for example using the main OSM API.

permanent link

answered 31 Oct '16, 11:36

scai's gravatar image

scai ♦
accept rate: 23%

Thanks for that very fast reply! That is what I feared: it seems there is no way around using two services, right?

(31 Oct '16, 13:26) autumnus

Thanks to openSource I found another solution which fits my purpose: Nominatim uses osm2pgsql to fill the database. And this filters which tags are put into the extratags-column. For testing I added a few lines in the code to also fill all remaining tags in the same column. Maybe this is a solution which is not according to the usual usage of Nominatim, but that is what I wanted.

I just wanted to tell you this way of changing Nominatims behaviour by code change.

Be aware that this way ALL tags are taken also (at least in my case) less usefull like

  • "TMC:cid_58:tabcd_1:Class"
  • "TMC:cid_58:tabcd_1:NextLocationCode"
  • "roof:shape"


  • "roof:material"

By the way: The lines I added are in file output-gazetteer.cpp in the osm2pgsql folder: in the

function void place_tag_processor::process_tags(const taglist_t &tags)

in the for-loop I appended the else-clause

323         } else if (item->key == "building") {
324             placebuilding = true;
325         } else {
326             extratags.push_back(&*item);
327         }

After that change you have to recompile and just import as usual.

permanent link

answered 03 Nov '16, 07:23

autumnus's gravatar image

accept rate: 0%

edited 03 Nov '16, 10:57

You can go in the other direction, use the is_in operator to get some of the information Nominatim provides from Overpass. Here's your query modified to fetch the node and then the containing areas:

Be sure to inspect the data tab to see the areas returned, they aren't visible on the map.

permanent link

answered 31 Oct '16, 14:09

maxerickson's gravatar image

accept rate: 32%

Good to know 'is_in' exists. But Overpass already has the more interesting tags for my purpose even in the basic request. What I wanted originally was the improvement of the Nominatim-request.

(31 Oct '16, 14:56) autumnus

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]( "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: 31 Oct '16, 11:07

question was seen: 5,485 times

last updated: 03 Nov '16, 10:57

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