Skip to content

Instantly share code, notes, and snippets.

@govvin
Created March 3, 2016 04:41
Show Gist options
  • Save govvin/a6d27806e27cea0df683 to your computer and use it in GitHub Desktop.
Save govvin/a6d27806e27cea0df683 to your computer and use it in GitHub Desktop.
Count all buildings within a province

#Overpass Turbo Query Count all buildings within a province.

See: http://overpass-turbo.eu/s/eKL

/*count buildings by province*/

[out:csv(::"type",::"id", name, admin_level,::"count")];
area[name="Surigao del Sur"][boundary];
 rel(area)[boundary][admin_level=4];
 map_to_area;
 foreach->.d(
   (.d;);out; 
   (node(area.d)["building"];
    way(area.d)["building"];
    relation(area.d)["building"];);
   out count;
 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment