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

As i know, there are three database used in the OSM, database used in the rails port, database used in the tile server and datavase used in the nominatim. Let me call the three database as openstreetmap, gis and nominatim. And I have two question about these three database.

1)I have installed the rails port and built up my local tile server, but the tables in the openstreetmap and gis are so different, and the table structure in gis and nominatim are so similiar, so what's the relationship or differences between openstreetmap,gis and nominatim?

2)How do the three database have the same data index to keep the consistency? The mean is a node id in the three database is same.

Anyone can help me is so kindness.

asked 22 Aug '16, 15:30

yuyy's gravatar image

yuyy
236222431
accept rate: 20%


The databases you mention are not the only ones; every service based on OSM usually has their own specialist database, like the ones used by routing engines, or Overpass, or taginfo, or analytics web sites. Each of them have their own database schema or structure that is optimised for the purpose they are serving.

With tile server and Nominatim databases, what OSM does is produce "diff" files from the openstreetmap database (with the Osmosis utility). These are published on a web site and downloaded, again by Osmosis, on the machines running tile server and Nominatim, and consumed on these machines with osm2pgsql in append mode. Different parameters to osm2pgsql are used for the tile and Nominatim databases, resulting in different database schemas.

If you want to set up your own copy of the OSM database with your own edits that are different from those edits made in OSM, then you will have to produce diffs from your own database and consume them on tile and Nominatim (the order is not important). If you want to keep your own copy of OSM and simply mirror all edits made to OSM, then you have to consume the diffs produced by OSM in all of your three databases (your own OSM, tile, and Nominatim). Again the order is not important since you don't have these databases linked to each other at all!

permanent link

answered 22 Aug '16, 17:14

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 23 Aug '16, 08:50

Thanks very much to your reply, and i leart a lot from your answers. But what's the mean of "diffs" you mentioned above? How can i produce diffs from my own database or OSM and how can i consume them?

(23 Aug '16, 09:11) yuyy
3

OSM diffs are published on planet.openstreetmap.org in the replication directories. If you want to produce your own diffs because you make your own private edits to your own copy of the data, then you will have to run Osmosis to make the diffs like OSM does on their server.

(23 Aug '16, 09:15) Frederik Ramm ♦

Thanks very much,then i will take a look at Osmosis.

(23 Aug '16, 09:23) yuyy

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:

×689
×204
×29

question asked: 22 Aug '16, 15:30

question was seen: 2,479 times

last updated: 01 Sep '16, 02:47

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