[英]Query All Roads with Overpass API and export as polygon
我有一個Overpass API的查詢。
mybbox = '8.9281,48.4379,9.1794,48.5827'
overpass_url = "http://overpass-api.de/api/interpreter"
overpass_query = """
[out:json];
// gather results
(
// query part for: "highway=*"
node["highway"]("""+mybbox+""");
way["highway"]("""+mybbox+""");
relation["highway"]("""+mybbox+""");
);
// print results
out center;
>;
out skel qt;
"""
我將結果保存為.json文件。 而類型是方式。 但我想定義道路寬度並將道路數據導出為多邊形。 例如,如果高速公路==高速公路,道路必須是多邊形類型,其寬度必須為4米。 可能嗎?
正如其他人所說,通過Overpass API無法獲得道路寬度; 你必須自己計算。 API僅用於查找感興趣的各種對象並下載它們。 您可以使用標記過濾結果,例如[width]
或類似標記:還有est_width
或width_street
等替代width_street
。 要了解每個標記的使用頻率以及哪種變體符合您的需求,請參閱此頁面以了解使用情況(使用右側的搜索框)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.