【问题标题】:Find multiple tags around coordinates with Overpass API使用 Overpass API 查找坐标周围的多个标签
【发布时间】:2020-04-06 13:51:09
【问题描述】:

鉴于这个搜索博物馆和画廊的立交桥查询https://overpass-turbo.eu/s/Sle,我如何引入一种新类型的标签来搜索相同的位置,例如我还想搜索相同区域周围的node["amenity"~"cafe|bar"]( lat: 500,53.866444 和 lon: 10.684738 周围 500 米。我尝试过的所有操作要么引发错误,要么返回不完整的结果。例如,以下作品,但只返回咖啡馆和酒吧,但不返回博物馆。

[out:json];
  node["tourism"~"museum|gallery"](around:500,53.866444, 10.684738);
  node["amenity"~"cafe|bar"](around:500,53.866444, 10.684738);
  out center;

【问题讨论】:

    标签: openstreetmap overpass-api


    【解决方案1】:

    您需要合并两个结果集:

    [out:json];
    (
      node["tourism"~"museum|gallery"](around:500,53.866444, 10.684738);
      node["amenity"~"cafe|bar"](around:500,53.866444, 10.684738);
    );
    out center;
    

    见https://overpass-turbo.eu/s/Ss6。

    或者尝试在 overpass-turbo 中使用向导,例如通过搜索 tourism~"museum|gallery" or amenity~"cafe|bar"。

    另请注意,您只是在搜索nodes。您将错过映射为 ways 或 relations 的 POI(尽管后者很少发生)。因此,要么为方式和关系添加额外的查询,要么将node 替换为nwr(节点方式关系)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-31
      • 1970-01-01
      • 2023-02-21
      • 2016-12-24
      • 1970-01-01
      • 2017-05-18
      • 1970-01-01
      • 2019-12-18
      相关资源
      最近更新 更多