User:Quelet/vp.camins
Jump to navigation
Jump to search
Generar relació de rius: a Level0 a partir d'un conjunt de ways obtinguts amb overpass
[edit]Primer cal generar tots els ways, suposem el riu Mogent, amb overpass-turbo.eu
/* This has been generated by the overpass-turbo wizard. The original search was: “name:"Riu Mogent"” */ [out:csv(::id)]; //[out:json][timeout:25]; // gather results way["name"~"Mogent"]["waterway"]({{bbox}}); // print results out geom;
Llavors es fa copy-paste dels ways, s'inserta "wy " a davant de cada id de way, i s'hi posen al menys quatre etiquetes, per exemple:
relation name = riu Mogent type = waterway waterway = river wikidata = Q6020472 wy 42098912 wy 255641510 wy 480950368 wy 480950369 wy 480950372 wy 480950373 wy 480950374 wy 480950379 wy 638276126 wy 638276127 wy 647442584 wy 647442585 wy 647442630 wy 647442631 wy 647442632 wy 647442633 wy 647442634 wy 647442635 wy 666148901 wy 666148902 wy 739812431
Si es vol que el riu surti a la infotaula de WD, [potser] cal posar la ID d'OSM a WD.
Consulta Overpass-Turbo per tenir totes els centres docents (amenity=school amb ref=*)
/* This has been generated by the overpass-turbo wizard. The original search was: “amenity=school and ref=* in Gironès” */ [out:csv("ref","wikidata","name";false)][timeout:25]; // fetch area “Gironès” to search in {{geocodeArea:"Catalonia"}}->.searchArea; // gather results ( // query part for: “amenity=school and ref=*” node["amenity"="school"]["ref"](area.searchArea); way["amenity"="school"]["ref"](area.searchArea); relation["amenity"="school"]["ref"](area.searchArea); ); // print results out ;
Consulta a Overpass-Turbo per tenir la llista de carrers que tenen epònim informat
/* This has been generated by the overpass-turbo wizard. The original search was: “highway=* and "name:etymology:wikidata"=* ” */ [out:csv("name:etymology:wikidata","name";false)][timeout:25]; // gather results ( // query part for: “highway=* and "name:etymology:wikidata"=*” node["highway"]["name:etymology:wikidata"]({{bbox}}); way["highway"]["name:etymology:wikidata"]({{bbox}}); relation["highway"]["name:etymology:wikidata"]({{bbox}}); ); // print results out ;
Llista de places amb nom que són highway sense etimologia
/* This has been generated by the overpass-turbo wizard. The original search was: “place=square and highway!=* and "name:etymology:wikidata"!=* and name=*” */ [out:csv("name";false)][timeout:25]; // gather results ( // query part for: “place=square and highway!=* and "name:etymology:wikidata"!=* and name=*” node["place"="square"]["highway"!~".*"]["name:etymology:wikidata"!~".*"]["name"]({{bbox}}); way["place"="square"]["highway"!~".*"]["name:etymology:wikidata"!~".*"]["name"]({{bbox}}); relation["place"="square"]["highway"!~".*"]["name:etymology:wikidata"!~".*"]["name"]({{bbox}}); ); // print results out ;
Mapa de municipis que són banyats pel Riu Ser
[out:xml][timeout:125]; {{geocodeArea:Catalonia}}->.searchArea; wr["waterway"="river"]["name"="el Ser"](area.searchArea); out geom qt; rel(around._:0)["admin_level"=8]; out geom qt;
Llista de districtes de Barcelona que creua la Ronda del Mig
[out:csv(::id,::type,"name",admin_level)][timeout:125]; {{geocodeArea:Barcelona}}->.searchArea; wr["highway"="primary"]["name"="Ronda del Mig"](area.searchArea); rel(around._:0)["admin_level"=9]; out;