[英]Why can I find a relation by tag but not by ID in overpass Turbo?
I'm trying to get a specific relation in overpass turbo and then do stuff with it.我试图在立交桥涡轮中获得特定的关系,然后用它做一些事情。
When I try getting it like this当我尝试像这样
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“id=2704286 in briancon”
*/
[out:json][timeout:25];
// fetch area “briancon” to search in
{{geocodeArea:briancon}}->.searchArea;
// gather results
(
// query part for: “id=2704286”
relation["id"="2704286"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
I get an empty response.我得到一个空洞的回应。 But when I query the same area by a tag, which the relation I want fulfills, like in this query, it's in the response data (among others) how can that be?
但是当我通过一个标签查询同一个区域时,我想要满足的关系,就像在这个查询中一样,它在响应数据中(以及其他)怎么可能呢?
This has been generated by the overpass-turbo wizard.
The original search was:
“route=hiking in briancon”
*/
[out:json][timeout:25];
// fetch area “briancon” to search in
{{geocodeArea:briancon}}->.searchArea;
// gather results
(
relation["route"="hiking"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
Use利用
relation(2704286)(area.searchArea);
instead of代替
relation["id"="2704286"](area.searchArea);
See also: https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Query_by_element_id另见: https ://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Query_by_element_id
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.