Skip to content

Instantly share code, notes, and snippets.

@mvexel
Created December 16, 2016 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvexel/e492a34788fcc7a754880d1302de1e05 to your computer and use it in GitHub Desktop.
Save mvexel/e492a34788fcc7a754880d1302de1e05 to your computer and use it in GitHub Desktop.
us_states_relations_overpass.csv
state osm_relation overpass_id
Alabama 161950 3600161950
Alaska 1116270 3601116270
Arizona 162018 3600162018
Arkansas 161646 3600161646
California 165475 3600165475
Colorado 161961 3600161961
Connecticut 165794 3600165794
Delaware 162110 3600162110
District of Columbia 162069 3600162069
Florida 162050 3600162050
Georgia 161957 3600161957
Hawaii 166563 3600166563
Idaho 162116 3600162116
Illinois 122586 3600122586
Indiana 161816 3600161816
Iowa 161650 3600161650
Kansas 161644 3600161644
Kentucky 161655 3600161655
Louisiana 224922 3600224922
Maine 63512 3600063512
Maryland 162112 3600162112
Massachusetts 61315 3600061315
Michigan 165789 3600165789
Minnesota 165471 3600165471
Mississippi 161943 3600161943
Missouri 161638 3600161638
Montana 162115 3600162115
Nebraska 161648 3600161648
Nevada 165473 3600165473
New Hampshire 67213 3600067213
New Jersey 224951 3600224951
New Mexico 162014 3600162014
New York 61320 3600061320
North Carolina 224045 3600224045
North Dakota 161653 3600161653
Ohio 162061 3600162061
Oklahoma 161645 3600161645
Oregon 165476 3600165476
Pennsylvania 162109 3600162109
Rhode Island 165795 3600165795
South Carolina 224040 3600224040
South Dakota 161652 3600161652
Tennessee 161838 3600161838
Texas 114690 3600114690
Utah 161993 3600161993
Vermont 60759 3600060759
Virginia 224042 3600224042
Washington 165479 3600165479
West Virginia 162068 3600162068
Wisconsin 165466 3600165466
Wyoming 161991 3600161991
@mmd-osm
Copy link

mmd-osm commented Dec 16, 2016

Why a hard coded list?!

[out:csv(::id,"ISO3166-2",name)];
rel[boundary=administrative][admin_level=4]["ISO3166-2"~"^US"];
out tags;

Area ids can be calculated automatically via map_to_area, no need to list them anywhere... Here we go...

[out:csv(::id,"ISO3166-2",name)];
rel[boundary=administrative][admin_level=4]["ISO3166-2"~"^US"];
map_to_area;
out tags;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment