I have set up my local Nominatim instance using the mediagis/nominatim:4.0 Docker image and so far so good, it works like a charm. Now, I would like to know if it is possible to add some custom place to the Nominatim database and have them considered in search, lookup, etc. By digging a bit into the Nominatim documentation and source code, it seems to me that it should be possible by adding a custom row to the placex table with indexed_status != 0. It looks like there is also the possibility of using "osm_type = X" for e"X"ternal sources. So I ask: will just adding a row to the placex table trigger everything is needed to have that custom place considered in the various Nominatim functionalities? And, in case, what are the columns to be filled for that to work? Thanks |
The e"X"ternal data feature is a piece of very old unmaintained code that likely won't really do what you want. Most importantly, it won't add your data to the search tables, so you can't really find it. The easiest way to add custom data to Nominatim is to convert your data into OSM format and then add it with Then Nominatim interprets it as an update and replaces your data.
(10 Mar '22, 09:08)
lonvia
Indeed. Is there a way to prevent this? Is a meaningful OSM_ID really needed for search and lookup?
(10 Mar '22, 09:18)
todelo
|
I see. But what happens if I update my database with an extract of the updated OSM data and the OSM_IDs I've chosen get duplicated? |
After a few months not working on the problem I tried Ionvia's solution, but something did not work. I created an xml file from a DataFrame with pyosmium. The file looks like this: I run What am I missing? |
Hi @todelo I need to edit the column 'extratags' in the table 'placex'. I have installed Nominatim in my local machine. Its possible to make this changes in the database? Could you help me with this? Thank you. |
Hi @todelo I need to edit the column 'extratags' in the table 'placex'. I have installed Nominatim in my local machine. Its possible to make this changes in the database? Could you help me with this? Thank you. |
What do you mean exactly? If you have your local installation, that means you have a local postgreSQL database, so you can modify the extratags column with standard SQL commands. I am not sure what happens to your changes if you update your data though |