Skip to content
Norbert Renner edited this page Jun 19, 2017 · 2 revisions

Weekly Changesets dump

ChangesetMD setup

Links

Limit changesets by date

Osmium Tool

Overpass attic start

Only import changesets also available in Overpass attic (starting with ODbL in Sept. 2012).

fake starting point for incremental import (prefer osmium-tool)

  • insert fake starting point for incremental import

     INSERT into osm_changeset
     (id, user_id, created_at, min_lat, max_lat, min_lon, max_lon, closed_at, open, num_changes, user_name, tags)
     values (13078698,null,null,null,null,null,null,null,null,null,null,null)
    
  • incremental import

      python changesetmd.py -d <dbname> -u <dbuser> -i -f changesets-latest.osm.bz2
    
  • pk + indices need to be created manually (see ChangesetMD code) when no initial create (-c) import

bbox geometry column

Now obsolete with ChangesetMD -g option.

ALTER TABLE osm_changeset ADD COLUMN bbox geometry;
update osm_changeset set bbox = ST_MakeEnvelope(min_lon, min_lat, max_lon, max_lat, 4326);
CREATE INDEX bbox_idx ON osm_changeset USING GIST ( bbox );