I would like to know how a single country's OSM data is kept up to date by osmosis. This is not a question regarding the method of doing the update, rather how osmosis does it.

I downloaded the OSM data for a single country and loaded it to a PostGIS database. Next, OSM minutely updates were setup. When I run the update, osmosis correctly updates only the data relevant to that specific country.

However, I can't figure out how it does that without any country or boundary information stored in the database.

  • 1
    OSM has country boundaries as ways, so I'm guessing the single country information you downloaded includes its boundary. If you're feeling masochistic, try removing the boundaries and see what happens.
    – user1462
    Jan 13, 2017 at 20:35
  • @barrycarter, thanks. Do you know how I could extract only boundaries from ways? I got so far as identifying the constraints as tags->'boundary' and tags->'admin_level'; is that correct?
    – picmate
    Jan 13, 2017 at 21:37
  • @barrycarter, I am afraid your understanding about country boundaries in osm is incorrect in this particular instance. In fact, osm doesn't maintain any polygonal boundaries in ways or in any other table. Thus, when you update even a single country, all the updates associated with other countries also gets written to the tables.
    – picmate
    Jan 18, 2017 at 20:13
  • I know it draws national boundaries on its map, so I'm sure it has that information somewhere.
    – user1462
    Jan 18, 2017 at 21:50
  • If you visualize the geometries in ways table, you wouldn't see any boundaries; only the street line segments and their bounding boxes. Since the only other table with geometry data is nodes, I can't figure out where else it would keep the data. Maybe it uses boundaries from some other source when plotting on their maps.
    – picmate
    Jan 18, 2017 at 22:18

2 Answers 2


One solution to this problem would be to set up your database using a country extract and only apply coutry specific updates, rather than minutely diffs from planet.openstreetmap.org.

As one example, you might want to look at such geographically limited diffs for Europe: http://download.geofabrik.de/europe-updates/ - or - pick any other country / region here: http://download.geofabrik.de/


With further research and investigation I found out that the assumption I made during the writing of the question is incorrect. During an update, updates associated with all the countries gets written into the particular osm database. OSM doesn't maintain any country specific polygonal boundaries in any table, and osmosis doesn't honor the geographic constraints during an update. Therefore, even if a user creates an osm database with data from a particular country, during the next update, all the updates that has happened, regardless of the country, gets written to the database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.