如何从与至少一个标签的关系中提取所有节点和方式?

发布于 2025-02-12 21:36:02 字数 360 浏览 1 评论 0原文

我正在使用立交桥来创建一些查询。

我的目标是在一个框中搜索,即类型多重法的所有关系。从我想提取至少一个标签的所有可能的方式和节点项目中。

到目前为止,我能够显示所有的多重法:

[bbox: 48.18329,16.3765,48.18466,16.37787];
rel["type" = "multipolygon"] -> .relation;
way(r.relation);
(._;>>;);
/*end of auto repair*/
out body;

但是我完全不知道如何提取至少一个标签的所有节点和项目。节点也一样。

您知道实现这项任务的聪明而优雅的解决方案吗?

I am using overpass to create some queries.

My goal is to search within a box, all the relationships of type multipolygon. From those I want to extract all the possible way and node items which have at least one tag.

So far I was able to display all the the multipolygons like so:

[bbox: 48.18329,16.3765,48.18466,16.37787];
rel["type" = "multipolygon"] -> .relation;
way(r.relation);
(._;>>;);
/*end of auto repair*/
out body;

However I totally have no clue how to extract all the nodes and items with at least one tag. Same thing for the nodes.

Do you know a smart and elegant solution to achieve this task?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余罪 2025-02-19 21:36:02

我能够按照以下方式实现我的目标:

[bbox: 48.18329,16.3765,48.18466,16.37787];
rel["type" = "multipolygon"] -> .relation;
(
  way(r.relation)(if:count_tags() > 0); 
);
(._;>>;);
/*end of auto repair*/
out body;

此外,如果您想滤除其他一些方法,请使用以下代码:

[bbox: 48.18329,16.3765,48.18466,16.37787];
rel["type" = "multipolygon"] -> .relation;
(
  way(r.relation)(if:count_tags() > 0); - 
  (
  way(r.relation)[~"highway|aeroway|barrier|railway|tunnel"~"."];
  );
);
(._;>>;);
/*end of auto repair*/
out body;

希望它也对他人有所帮助。

I was able to achieve my goal the following way:

[bbox: 48.18329,16.3765,48.18466,16.37787];
rel["type" = "multipolygon"] -> .relation;
(
  way(r.relation)(if:count_tags() > 0); 
);
(._;>>;);
/*end of auto repair*/
out body;

In addition if you want to filter out some other ways just use the following code:

[bbox: 48.18329,16.3765,48.18466,16.37787];
rel["type" = "multipolygon"] -> .relation;
(
  way(r.relation)(if:count_tags() > 0); - 
  (
  way(r.relation)[~"highway|aeroway|barrier|railway|tunnel"~"."];
  );
);
(._;>>;);
/*end of auto repair*/
out body;

Hope it helps somebody else as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文