Skip to content

Instantly share code, notes, and snippets.

@govvin
Last active May 12, 2016 04:20
Show Gist options
  • Save govvin/dc22afcfbb39852d9a61c558c71d1626 to your computer and use it in GitHub Desktop.
Save govvin/dc22afcfbb39852d9a61c558c71d1626 to your computer and use it in GitHub Desktop.
Overpass Turbo QL :: querying for changes

There are several ways to query for modifications using OverPass, with slightly varying results. Use wisely.

##Using diffs

//Overpass QL for querying results
//http://overpass-turbo.eu/s/b6e

//[out:csv(::lat,::lon,::type, ::version, ::user, place,name)]
[diff:"2016-05-07T00:00:00+8","2016-05-14T00:00:00+8"]; 

(
  node({{bbox}});
  way({{bbox}});
  relation({{bbox}});
); 
out body; >; 
out skel qt;

##Using newer

{{date="2016-05-07T00:00:00+8"}}

[out:json]
[timeout:25];

(
  node(newer:{{date}})({{bbox}});
  way(newer:{{date}})({{bbox}});
  relation(newer:{{date}})({{bbox}});
);
out body;
out skel qt;

##Using changed

{{dates="2016-05-07T00:00:00+8","2016-05-14T23:59:59+8"}}
[out:json]
[timeout:25];

(
  node(changed:{{dates}})({{bbox}});
  way(changed:{{dates}})({{bbox}});
  relation(changed:{{dates}})({{bbox}});
);
out body;
out skel qt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment