Advertisement
cascafico

Names in Italy

Jun 20th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.66 KB | None | 0 0
  1. #!/bin/bash
  2. # multiple overpass-turbo queries that aim to list highway NAME dissemination in Italy
  3. # ref:ISTAT OSM tag is used, since it is a unique identifier for each italian municipality
  4. # ref:ISTAT code is a 6 digit; first can be 0|1; here a small range has been set 042-043
  5.  
  6. NAME=Rosmini
  7.  
  8. for i in {042..043}; do
  9. wget -O $i.lst 'http://overpass-api.de/api/interpreter?data=[out:csv(name,ways;false;",")][timeout:3600];area[admin_level=8]["ref:ISTAT"~"'$i'..."];foreach->.regio((way(area.regio)[highway][name~"'$NAME'"];);make count "ref:ISTAT" = regio.set(t[ "ref:ISTAT"]),name = regio.set(t["name"]),ways = count(ways);out;);'
  10. done
  11. cat *lst | grep -v ",0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement