User:Seb35

From OpenStreetMap Wiki
Jump to navigation Jump to search

Hello, I’m a beginner mapper from Rennes, previously a busy Wikipedian, now casual Wikipedian under the same username. ~ Seb35 [^_^] 09:37, 12 March 2017 (UTC)

Streets named after a football player from Stade Rennais

SELECT ?wd ?streetname ?osmn WHERE {
#SELECT ( COUNT(?anvbihan) AS ?total ) WHERE {

  # Joueurs de foot
  #BIND( wd:Q1835 AS ?wd ) . # Zinedine Zidane
  { SELECT ?wd ?anvbihan ?anvfamilh WHERE {
    ?wd wdt:P31 wd:Q5 .
    ?wd wdt:P106 wd:Q937857 .
    #?wd wdt:P1532 wd:Q142 .
    #?wd wdt:P27 wd:Q142 .
    ?wd wdt:P54 wd:Q19509 .
    ?wd wdt:P735 [ wdt:P1705 ?anvbihan ] .
    ?wd wdt:P734 [ wdt:P1705 ?anvfamilh ] .
  } ORDER BY RAND() LIMIT 100 } .
  
  #BIND( CONCAT( "Boulevard ", ?anvbihan, " ", ?anvfamilh ) AS ?streetname ) .
  BIND( CONCAT( "Rue ", ?anvbihan, " ", ?anvfamilh ) AS ?streetname ) .

  SERVICE <https://sophox.org/sparql> {
    ?osmn <https://wiki.openstreetmap.org/wiki/Key:name> ?streetname .
  #  FILTER( REGEX( ?streetname, CONCAT( ?anvbihan, " ", ?anvfamilh ) ) ) .

    #SERVICE wikibase:around {
    #  ?osmn <https://www.openstreetmap.org/meta/loc> ?loc . 
    #  bd:serviceParam wikibase:center "Point(-1.67982 48.11135)"^^geo:wktLiteral . 
    #  bd:serviceParam wikibase:radius "2" . 
    #  bd:serviceParam wikibase:distance ?distance .
    #}
  }
}
LIMIT 100

Wikidata items and corresponding OSM entities

SELECT ?place ?location ?distance ?osm ?placeLabel
WHERE {
  SERVICE wikibase:around { 
    ?place wdt:P625 ?location .
    bd:serviceParam wikibase:center "Point(-1.67982 48.11135)"^^geo:wktLiteral . # Change here the point
    bd:serviceParam wikibase:radius "5" . # Change here the radius around the point
    bd:serviceParam wikibase:distance ?distance .
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  SERVICE <https://sophox.org/sparql> {
    OPTIONAL { ?osm <https://wiki.openstreetmap.org/wiki/Key:wikidata> ?place }
  }
  #FILTER EXISTS { ?place ?p ?osm } # Uncomment to display only Wikidata items without OSM entity
}
ORDER BY ?osm ?distance
#ORDER BY ?distance
#LIMIT 100
# 1 # Change/increment this to force refresh of the request after changing the data

Run on Wikidata Query Service calling Sophox

(Co-created with PanierAvide.)