Skip to content

Instantly share code, notes, and snippets.

@skorasaurus
Last active August 29, 2015 14:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save skorasaurus/0532dfc4895d9097666d to your computer and use it in GitHub Desktop.
Save skorasaurus/0532dfc4895d9097666d to your computer and use it in GitHub Desktop.
#
Simply modify the three following strings for node, ways and relations
newer than="2013-05-28T00:00:00Z
This script is for statistics. For example, it does not extract all nodes from a way if only one node is modified, since the way object and other nodes are not affected.
If you want only the nodes, you only keep the first section of the script where the nodes are extracted.
The polygon-query bounds is to clip the CAP103 area, extracting info only for this area.
url of overpass : http://overpass-api.de/query_form.html
This is a lot faster then overpass-turbo and automatically downloads the osm file of the result. if wanted then convert to geojson using osmtogeojson
enter the below into the overpass query form.
======
<osm-script timeout="3600">
<union into="_">
<query into="_" type="node">
<newer than="2013-05-28T00:00:00Z"/>
<polygon-query bounds="19.7972748447 -72.1793786097 19.8560565317 -72.5424334148 19.7728461907 -72.5440067984 19.5910291271 -72.4860651733 19.4004942704 -72.2334052038 19.37843 -71.6934136851 19.4484019008 -71.6793824739 19.4640717217 -71.6896520916 19.5035635652 -71.6880120971 19.5612145292 -71.6918407666 19.5857142916 -71.7338661334 19.6320485705 -71.7375683695 19.6445017442 -71.7243460979 19.6549616635 -71.7232883162 19.6748834323 -71.747088405 19.7107221042 -71.7566439964 " into="_"/>
</query>
</union>
<print from="_" limit="" mode="meta" order="id"/>
<union into="_">
<query into="_" type="way">
<newer than="2013-05-28T00:00:00Z"/>
<polygon-query bounds="19.7972748447 -72.1793786097 19.8560565317 -72.5424334148 19.7728461907 -72.5440067984 19.5910291271 -72.4860651733 19.4004942704 -72.2334052038 19.37843 -71.6934136851 19.4484019008 -71.6793824739 19.4640717217 -71.6896520916 19.5035635652 -71.6880120971 19.5612145292 -71.6918407666 19.5857142916 -71.7338661334 19.6320485705 -71.7375683695 19.6445017442 -71.7243460979 19.6549616635 -71.7232883162 19.6748834323 -71.747088405 19.7107221042 -71.7566439964 " into="_"/>
</query>
</union>
<print from="_" limit="" mode="meta" order="id"/>
<union into="_">
<query into="_" type="relation">
<newer than="2013-05-28T00:00:00Z"/>
<polygon-query bounds="19.7972748447 -72.1793786097 19.8560565317 -72.5424334148 19.7728461907 -72.5440067984 19.5910291271 -72.4860651733 19.4004942704 -72.2334052038 19.37843 -71.6934136851 19.4484019008 -71.6793824739 19.4640717217 -71.6896520916 19.5035635652 -71.6880120971 19.5612145292 -71.6918407666 19.5857142916 -71.7338661334 19.6320485705 -71.7375683695 19.6445017442 -71.7243460979 19.6549616635 -71.7232883162 19.6748834323 -71.747088405 19.7107221042 -71.7566439964 " into="_"/>
</query>
</union>
<print from="_" limit="" mode="meta" order="id"/>
</osm-script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment