-
Notifications
You must be signed in to change notification settings - Fork 15
ChangesetMD
Norbert Renner edited this page Jun 19, 2017
·
2 revisions
-
http://planet.openstreetmap.org/planet/changesets-latest.osm.bz2
-
Peek into file
bzcat changesets-latest.osm.bz2 | head
- https://github.com/ToeBee/ChangesetMD
- psql:
create database changesets;
python changesetmd.py -d changesets -c -g
python changesetmd.py -d changesets -f changesets-latest.osm.bz2 -g
-
osmium changeset-filter -a 2017-01-01T00:00:00Z changesets-latest.osm.bz2 -o changesets-2017.osm.bz2
Only import changesets also available in Overpass attic (starting with ODbL in Sept. 2012).
-
[date:"2012-09-12T06:55:00Z"]
- Overpass API - Attic data -
http://overpass-api.de/api/augmented_diff?id=4
-> 1. changeset: 13078698 (timestamp="2012-09-12T06:59:59Z") - Attic data cutoff #199
-
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
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 );