User:Bouzinac/Trains
Stations in India edit
Shanghai metro map edit
Y shaped subways edit
SELECT ?metroline ?metrolineLabel ?endpoints ?carte_d_itin_raire WHERE {
{
SELECT ?metroline (COUNT(?endpoint_statement) AS ?endpoints) WHERE {
?metroline wdt:P31 wd:Q15079663;
p:P559 ?endpoint_statement.
?endpoint_statement a wikibase:BestRank.
FILTER NOT EXISTS { ?endpoint_statement pq:P582 []. }
}
GROUP BY ?metroline
HAVING (?endpoints > 2 )
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
OPTIONAL { ?metroline wdt:P15 ?carte_d_itin_raire. }
}
Y shaped subways, other query edit
#defaultView:ImageGrid
SELECT ?metroline ?metrolineLabel ?endpoints ?carte_d_itin_raire WHERE {
{
SELECT ?metroline (COUNT(?endpoint_statement) AS ?endpoints) WHERE {
?metroline wdt:P31 wd:Q105967897;
p:P559 ?endpoint_statement.
?endpoint_statement rdf:type wikibase:BestRank.
FILTER(NOT EXISTS { ?endpoint_statement pq:P582 _:b2. })
}
GROUP BY ?metroline
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?metroline wdt:P15 ?carte_d_itin_raire.
}
subway networks edit
- https://w.wiki/4C3T
- Londres https://w.wiki/4XEg
- les S bahn allemands et suisses : https://w.wiki/5yNL
- le nécessaire pour construire une carte sur une ligne donnée : https://w.wiki/6Cgn
- list rail services in a network : https://w.wiki/7KW8
- les id O.S.M. des lignes de métro : https://w.wiki/683V
- celles sans OSM : https://w.wiki/7mmk
- turbo OSM : les osm sans wikidata : https://overpass-turbo.eu/?Q=%5Bout%3Acsv%28%3A%3Aid%2C%3A%3Atimestamp%2Croute_master%2Cnetwork%2Coperator%29%5D%3B%0Arelation%5Btype%3Droute_master%5D%5Broute_master%7E%22%5E%28tram%7Csubway%29%24%22%5D%5B%21%22wikidata%22%5D%3B%0Aout%3B&C=47.953145%3B0.214233%3B7&R=
- : tramways sans réseau : https://w.wiki/7FP$
- Hauts de France https://w.wiki/7z7e
subway lines edit
- https://w.wiki/39ho
- https://w.wiki/3ADQ
- Subways lines in a country https://w.wiki/3gUD
- (pour rajouter les métro de....) https://w.wiki/3gUA
- https://w.wiki/3J5S
- les numéros d'iti https://w.wiki/5Yns
- les extrémités https://w.wiki/3b7r
- les en projets sans déclaration projet https://w.wiki/3esY Fait
- les pb de gare voisine sans destinations/ligne de chemin de fer https://w.wiki/7tzW
- liste avec liens interlangues https://w.wiki/4YGs
- gares voisines en spaghettis https://w.wiki/53jU
- les sans numéros d'itinéraire : https://w.wiki/4Ysw
- les frwiki d'une même ligne de métro : https://w.wiki/4$k3
- https://w.wiki/57kj état d'usages
- les couleurs : User:Bouzinac/Trains/Lignes
Subways stations edit
https://w.wiki/3gUE (les sans partie de ; sans ligne de chemin de fer)
https://w.wiki/5GP$ (les tramways sans partie de) Done https://w.wiki/54ef (sans coordonnées)
https://w.wiki/5ao6 (sans gares voisines)
https://w.wiki/5an$ (tramways sans gares voisines)
https://w.wiki/3NU$ les zhan en chinois (850 résultats)
https://w.wiki/4$8Y : incohérence entre gare voisine et nature pas de type gare
https://w.wiki/6A3T les descriptions en FR
https://w.wiki/57GS : les gares voisines sont elles correctement renseignées ?
Séoul à faire edit
SELECT ?station ?stationLabel ?subwayLine ?line_number ?layer ?towards ?towardsLabel WHERE {
VALUES ?search {
wd:Q16950
#critère de recherche de système de métro
}
?search wdt:P527 ?lignes.#quelles sont les lignes de ce métro
?lignes wdt:P559 ?termini.#quels sont les terminus de ce métro
?station wdt:P31/wdt:P279* wd:Q928830; #station de métro
wdt:P361|wdt:P16 ?search;#qui font partie du réseau recherché
wdt:P81|wdt:P1192 ?subwayLine;
wdt:P197 ?pred.
?pred wdt:P625 ?coords_pred;
wdt:P81|wdt:P1192 ?subwayLine_pred.
?station p:P197 _:b1.
_:b1 ps:P197 ?pred ;
pq:P5051 ?towards;
pq:P81|pq:P1192 ?line_pq. optional{?subwayLine wdt:P1671 ?line_number.}
FILTER(?subwayLine_pred = ?lignes)#on ne prend les LIGNES que si la correspondance est sur la même ligne
FILTER(?subwayLine = ?lignes)
FILTER(?towards = ?termini )
MINUS { ?station (wdt:P576|wdt:P582|wdt:P3999) ?dispar. }#on ne veut pas les stations disparues
MINUS {
?station wdt:P5817|wdt:P5816 ?interdit.
VALUES ?interdit { wd:Q811683 wd:Q63065035 wd:Q12377751 wd:Q97317113 wd:Q55653430 wd:Q30108381 wd:Q55570340 wd:Q11639308 wd:Q104664889
}
}#on ne veut pas les cas particuliers, en construction etc
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr" .
?subwayLine rdfs:label ?layer.
?pred rdfs:label ?predLabel . ?towards rdfs:label ?towardsLabel.
?station rdfs:label ?stationLabel .
} } GROUP BY ?station ?stationLabel ?subwayLine ?rgb ?predLabel ?layer ?towards ?line_number ?towardsLabel order by asc( ?line_number ) ?subwayLine
Map of some bus lines in Rennes edit
Map of some tramway lines in Stuttgart edit
https://w.wiki/3LtP Map of Strasbourg tramway (query) Map of trams in Geneva (query)
Map of tramway lines in Paris suburbs edit
#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:Q1142114 ;
wdt:P625 ?coordinates ;
p:P625 / psv:P625 / wikibase:geoLatitude ?lat1 ;
p:P625 / psv:P625 / wikibase:geoLongitude ?lon1 .
MINUS { ?item wdt:P5817 ?interdit VALUES ?interdit {wd:Q811683 wd:Q63065035 wd:Q12377751 wd:Q30108381 wd:Q11639308} }
MINUS { ?item (wdt:P576|wdt:P582|wdt:P3999) ?dispar. }
} 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:Q1142114 ;
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". }
}
Map of Montpellier tramway edit
#defaultView:Map{"hide":["?coords", "?line","?rgb"]}
SELECT ?station ?stationLabel ?coords ?line ?layer ?rgb WHERE {
?station wdt:P31 wd:Q2175765;
wdt:P361 wd:Q1753254;
wdt:P625 ?coords;
wdt:P81 ?subwayLine;
wdt:P197 ?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
}
}
?pred wdt:P625 ?cds .
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.
?station rdfs:label ?stationLabel .
} }
GROUP BY ?station ?stationLabel ?coords ?line ?layer ?rgb
Map of Hefei subway edit
Carte des métros de la Chine v2 edit
#title: Carte des métros de Chine/China subways v2
#defaultView:Map{"hide":["?coords", "?searchlines", "?termini","?rgb", "?line_draw"]}
SELECT distinct ?stationLabel ?linesLabel ?searchlines ?lignes ?line_draw ?termini ?station ?coords ?pred ?rgb WHERE {
?searchlines wdt:P17 wd:Q148;wdt:P31/wdt:P279* wd:Q728937; wdt:P559 ?termini#quels sont les terminus de ce métro, what are the ends of these lines
; wdt:P465 ?rgb .
VALUES ?stations_type {
wd:Q928830 #station de métro
wd:Q2175765 # tramway
}
?station wdt:P31/wdt:P279* ?stations_type;
wdt:P81 ?searchlines;
wdt:P625 ?coords ;wdt:P5817 wd:Q55654238;
wdt:P197 ?pred.
?pred wdt:P625 ?coords_pred;
wdt:P81 ?subwayLine_pred.
?station p:P197 _:b1.
_:b1 ps:P197 ?pred ;
pq:P5051 ?towards;
pq:P81 ?line_pq.
FILTER(?subwayLine_pred = ?searchlines)#on ne prend les LINES que si la correspondance est sur la même ligne
FILTER(?towards = ?termini)
FILTER(?station != ?termini)
?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_draw )
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr,en,zh".
?searchlines rdfs:label ?layer .
?searchlines rdfs:label ?linesLabel.
?station rdfs:label ?stationLabel.
} }
Carte des métros/tramways de France edit
#title: Cartes des métros et tramways de France
#defaultView:Map{"hide":["?coords", "?line","?rgb"]}
SELECT ?station ?stationLabel ?subwayLine ?systemLabel ?coords ?line ?rgb WHERE {
VALUES ?searchpays {
wd:Q142 #critère de recherche de pays
}
?system wdt:P31/wdt:P279* wd:Q3491904;wdt:P17 ?searchpays.
?system wdt:P527 ?lignes.#quelles sont les lignes de ces métros
?lignes wdt:P559 ?termini.#quels sont les terminus de ces métros
?station wdt:P31/wdt:P279* wd:Q548662; #station de métro ou de tramway
wdt:P361 ?system;#qui font partie du réseau recherché
wdt:P625 ?coords;
wdt:P81|wdt:P1192 ?subwayLine;
wdt:P197 ?pred.
?pred wdt:P625 ?coords_pred;
wdt:P81|wdt:P1192 ?subwayLine_pred.
?station p:P197 _:b1.
_:b1 ps:P197 ?pred ;
pq:P5051 ?towards;
pq:P81|pq:P1192 ?line_pq.
FILTER(?subwayLine_pred = ?lignes)#on ne prend les LIGNES que si la correspondance est sur la même ligne
FILTER(?subwayLine = ?lignes)
FILTER(?towards = ?termini)
MINUS { ?station (wdt:P576|wdt:P582|wdt:P3999) ?dispar. }#on ne veut pas les stations disparues
MINUS {
?station wdt:P5817 ?interdit.
VALUES ?interdit {
wd:Q811683
wd:Q63065035
wd:Q12377751
wd:Q97317113
wd:Q55653430
wd:Q30108381
wd:Q55570340
wd:Q11639308
}
}#on ne veut pas les cas particuliers, en construction etc
?pred p:P625 ?node_pred .
?node_pred psv:P625/wikibase:geoLatitude ?lat1 ;
psv:P625/wikibase:geoLongitude ?lon1 .
?node_pred a wikibase:BestRank.
?station p:P625 ?node_station.
?node_station psv:P625/wikibase:geoLatitude ?lat2 ;
psv:P625/wikibase:geoLongitude ?lon2.
?node_station a wikibase:BestRank.
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],fr,en".
?subwayLine rdfs:label ?layer0 .
?system rdfs:label ?systemLabel.
?pred rdfs:label ?predLabel.
?station rdfs:label ?stationLabel.
}
bind( Concat(?layer0," ",?systemLabel) as ?layer)
}
GROUP BY ?station ?stationLabel ?subwayLine ?rgb ?predLabel ?systemLabel ?layer ?coords ?line