Buongiorno a tutti, avrei bisogno di dritte per scaricare da overpass dei monumenti e, insieme ad essi, le piazze in cui questi sono ubicati. Grazie mille
Building on the response by @simo_fi I have this inelegant monstrosity:
[out:json][timeout:25];
nwr["historic"="monument"]({{bbox}})->.monuments;
nwr[place=square](around.monuments:500.0)->.sqr;
.monuments is_in->.enclosers;
(.monuments > ;) -> .monuments2;
.monuments2 is_in->.enclosers2;
(.enclosers;.enclosers2;)->.enclosers;
nwr.enclosers[place=square]->.sqr2;
nwr.enclosers[highway]->.unsquare;
(nwr.monuments;
nwr.sqr;
nwr.sqr2;
nwr.unsquare;
nwr.unsquare2;
);
// print results
out body;
>;
out skel qt;
In the unlikely event that I haven’t made a mistake I think it should:
- fetch all monuments in view
- retrieve any
place=square
within half a kilometre or that enclose the monuments - retrieve any highway areas or rings that surround the monuments
Problems:
The third point fails when someone has done the square just by naming a highway
and specifically excluded the monument from the highway. e.g. the Firenze Arco di Trionfo. You could argue that these are poorly mapped.
It also returns monuments that aren’t anywhere near squares, squares that are one street over etc.
buongiorno, è possibile partire da questa:
[out:json][timeout:30];
nwr["historic"="monument"]({{bbox}});
out geom;
link: overpass-turbo.eu
per ogni nodo/way deve essere poi ricavata la pizza o strada vicina,
appena ho tempo ti scrivo la query completa
ciao, grazie mille per la risposta. non c’è modo di estrarre entrambi insieme? conosco la query che hai citato, speravo di poter fare un passaggio unico. grazie di nuovo
thank you very much, I’m just trying using the code, adapting it to my purpose.
I thought about using “around” filter but I don’t understand how to select only the first closest street,
an example:
query : overpass-turbo
How do you extract only the first closest road and not all the roads within a 50 meter radius?
it’s possible ?
[out:json][timeout:25];
nwr["historic"="monument"]({{bbox}})->.monuments;
way(around.monuments:50)["name"~"^(Via|Piazza|Porta)"]->.address;
( nwr.monuments; way.address; ); out geom;
{{style:
node[place=square],area[place=square]
{ color:green; fill-color:green; symbol-size:6}
node[highway],area[highway]
{ color:blue; fill-color:blue; symbol-size:6}
node[historic=monument],area[historic=monument]
{ color:red; fill-color:red; symbol-size:3}
}}