boundary=administrative
admin_level=3 to 10
- Overpass
原文鏈接
rel[admin_level=(level number)]
[type=boundary]
[boundary=administrative]
[ (specific tag to identify the country, see below) ];
out geom;
--With the specific tags to identify the country (with XX=iso2 country code):
admin_level=2 > ["ISO3166-1"~"^XX"]
admin_level=3 > ["is_in:country"="XX"]
admin_level=4 > ["ISO3166-2"~"^XX"]
知道relation的id的冀宴,有一個手動提取的步驟
https://peteris.rocks/blog/openstreetmap-administrative-boundaries-in-geojson/
調(diào)用方法
URL:
https://wambachers-osm.website/boundaries/exportBoundaries?cliVersion=1.0&cliKey=52d97a3b-3fc1-44cd-bd9a-e8c1c9468bab&exportFormat=json&exportLayout=levels&exportAreas=land&union=false&selected=270056,913011,912940,913069,553303,153314,911844,286342,286937,2128285,912998,199073,407492,913110,913106,913073,161349,913012,913109,198590,912942,1867188,913101,153269,913100,913006,913067,913105,913068,912999,153292,153310,913094,553302
selected后邊的數(shù)字就是relation的id號
使用命令 curl -f -o file.zip --url 'URL'
將會下載上述鏈接的內(nèi)容锋八,存儲為文件
Don't forget the ' before and after the url!