query-30efe1b774bbc192fb1f70efc1db571e

rq turtle/ttl

, which is good. Hope it advances the reflexion.(Q55654238)in use = (P5817)state of use Hi again, I've tried another rewriting of the code, with a filter. It removes the problem of correspondances being ugly shown. But another drawback is that there is sometimes holes... And there is still the tooltip problem. So still not the good solution. Please note there is sometimes

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map{"hide":["?coords", "?lines","?rgb"]}
SELECT ?station ?stationLabel ?subwayLine ?coords (MIN(?line) AS ?lines) ?layer ?rgb WHERE {
  ?station wdt:P31 wd:Q928830;
    wdt:P17 wd:Q142;
    wdt:P625 ?coords;
    wdt:P81 ?subwayLine;
    wdt:P197 ?pred.
  ?pred wdt:P625 ?cds;
    wdt:P81 ?subwayLine_pred.
  MINUS { ?station (wdt:P576|wdt:P582|wdt:P3999) ?dispar. }
  MINUS {
    ?station wdt:P5817 ?interdit.
    VALUES ?interdit {
      wd:Q811683
      wd:Q63065035
      wd:Q12377751
      wd:Q55653430
      wd:Q30108381
      wd:Q55570340
      wd:Q11639308
    }
  }
  BIND(IF((xsd:double(?depth / 10 )) = (xsd:integer(?depth / 10 )), ?cds, "") AS ?coords)
  ?pred (p:P625/psv:P625/wikibase:geoLatitude) ?lat1;
    (p:P625/psv:P625/wikibase:geoLongitude) ?lon1.
  ?station (p:P625/psv:P625/wikibase:geoLatitude) ?lat2;
    (p:P625/psv:P625/wikibase:geoLongitude) ?lon2.
  BIND(CONCAT("LINESTRING(", STR(?lon1), " ", STR(?lat1), ",", STR(?lon2), " ", STR(?lat2), ")") AS ?str)
  BIND(STRDT(?str, geo:wktLiteral) AS ?line)
  ?subwayLine wdt:P465 ?rgb.
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
    ?subwayLine rdfs:label ?layer.
    ?pred rdfs:label ?predLabel.
    ?station rdfs:label ?stationLabel.
  }
  FILTER(?subwayLine_pred = ?subwayLine) #new filter
}
GROUP BY ?station ?stationLabel ?subwayLine ?rgb ?subwayLine_pred ?layer ?coords
ORDER BY (?layer)

Query found at