User:Mackensen/mapframe

 { "type": "ExternalData", "service": "geopoint", "query": "#defaultView:Map{\"hide\":[\"?coords\", \"?line\",\"?rgb\"]}\n# This query has been designed by User:Bouzinac\n# See Template:Generic queries for transport network in Wikidata \n#title: Map of the current transport network InterCity \nSELECT (?station as ?id) ?stationLabel ?subwayLine (?coords as ?geo) ?line ?line_number ?layer ?rgb WHERE {\n VALUES ?search {\n    wd:Q1665787\n  }\n  ?search wdt:P527 ?lignes.\n  ?lignes wdt:P5817 wd:Q55654238;#functionning line\n    wdt:P559 ?termini.#end points for these lines\n  ?station (wdt:P31/(wdt:P279*)) wd:Q548662;#stations of searched for network\n    wdt:P5817 wd:Q55654238;#running stations\n    wdt:P625 ?coords;\n    wdt:P1192 ?lignes;                \n    (wdt:P81|wdt:P1192) ?subwayLine;\n    wdt:P197 ?pred.\n  ?pred wdt:P625 ?coords_pred;\n    (wdt:P81|wdt:P1192) ?subwayLine_pred.#line of the preced/following station\n  ?station p:P197 _:b1.\n  _:b1 ps:P197 ?pred;\n    pq:P5051 ?towards;\n    (pq:P81|pq:P1192) ?line_pq.\n  ?pred wdt:P5817 wd:Q55654238.\n  OPTIONAL { ?subwayLine wdt:P1671 ?line_number. }#sortable line number\n FILTER(?subwayLine_pred = ?lignes)\n  FILTER(?subwayLine = ?lignes)\n  FILTER(?subwayLine = ?line_pq)\n  FILTER(?towards = ?termini)#towards the termini of the line\n  ?pred p:P625 ?node_pred.\n  ?node_pred (psv:P625/wikibase:geoLatitude) ?lat1;\n    (psv:P625/wikibase:geoLongitude) ?lon1;\n    rdf:type wikibase:BestRank.\n  ?station p:P625 ?node_station.\n  ?node_station (psv:P625/wikibase:geoLatitude) ?lat2;\n    (psv:P625/wikibase:geoLongitude) ?lon2;\n    rdf:type wikibase:BestRank.\n  BIND(CONCAT(\"LINESTRING(\", STR(?lon1), \" \", STR(?lat1), \",\", STR(?lon2), \" \", STR(?lat2), \")\") AS ?str)\n  BIND(STRDT(?str, geo:wktLiteral) AS ?line)\n  ?subwayLine wdt:P465 ?rgb.#line colour\n  SERVICE wikibase:label {\n    bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en,fr\".\n    ?subwayLine rdfs:label ?layer.\n    ?pred rdfs:label ?predLabel.\n    ?station rdfs:label ?stationLabel.\n  }\n}\nGROUP BY ?station ?stationLabel ?subwayLine ?rgb ?predLabel ?layer ?coords ?line ?line_number\nORDER BY (xsd:integer(?line_number)) (?line_number) (?layer)" }