query: #defaultView:Map{"hide":["?coordinates", "?line", "?rgb"]}
  SELECT DISTINCT ?coordinates ?line ?item ?itemLabel ?connectLabel ?image ?opening ?rgb 
  
  WITH {
    SELECT ?item (SAMPLE(?coordinates) AS ?coordinates)  (sample(?lat1) as ?lat1) (sample(?lon1) as ?lon1)
           WHERE {
      ?item wdt:P31 wd:Q2175765 ;
            wdt:P361 wd:Q2060490 ;
            wdt:P625 ?coordinates ;
            p:P625 / psv:P625 / wikibase:geoLatitude ?lat1 ;
            p:P625 / psv:P625 / wikibase:geoLongitude ?lon1 . 
  MINUS { ?item(wdt:P576|wdt:P582|wdt:P3999) ?dispar. }
  MINUS { ?item wdt:P5817 ?interdit VALUES ?interdit {wd:Q811683 wd:Q63065035 wd:Q12377751 wd:Q30108381 wd:Q11639308} } 
    } GROUP BY ?item
  } AS %stations
  WITH { 
    SELECT ?nextstation (sample(?lat2) as ?lat2) (sample(?lon2) as ?lon2) WHERE {
      ?nextstation wdt:P31  wd:Q2175765 ;
                   wdt:P361 wd:Q2060490 ;
                   p:P625 / psv:P625 / wikibase:geoLatitude ?lat2 ;
                   p:P625 / psv:P625 / wikibase:geoLongitude ?lon2 .
    } GROUP BY ?nextstation
  } AS %nextstations
  
  WITH {
    SELECT ?line ?connect ?rgb WHERE {
      INCLUDE %stations .
      INCLUDE %nextstations .
      ?item p:P197 ?nextstationstatement .
      ?nextstationstatement ps:P197 ?nextstation ;
                            pq:P81 ?connect .
      ?connect                         wdt:P465 ?rgb.
      FILTER(STR(?item) < STR(?nextstation)) .
      BIND(CONCAT('LINESTRING (', STR(?lon1), ' ', STR(?lat1), ',', STR(?lon2), ' ', STR(?lat2), ')') AS ?str) .
      BIND(STRDT(?str, geo:wktLiteral) AS ?line)
    }
  } AS %lines 
  
  WHERE {
    { INCLUDE %stations }  UNION { INCLUDE %lines  } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,de". } 
  }