16,603
edits
(→Location data: Scholia topic) |
No edit summary |
||
Line 70: | Line 70: | ||
} | } | ||
GROUP BY ?location ?locationLabel ?locationUrl | GROUP BY ?location ?locationLabel ?locationUrl | ||
}} | |||
== Nearby locations == | |||
{{SPARQL | query= | |||
PREFIX target: <https://dreams.wikibase.cloud/entity/Q306> | |||
PREFIX dreams: <https://dreams.wikibase.cloud/entity/> | |||
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> | |||
PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/> | |||
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/> | |||
SELECT | |||
?distance | |||
?location ?locationLabel ?locationUrl | |||
WHERE { | |||
target: dreamst:P13 ?geo . | |||
?location dreamst:P13 ?other_geo . | |||
FILTER(target: != ?location) | |||
BIND(geof:distance(?other_geo, ?geo) AS ?distance) | |||
BIND(CONCAT("#location/", SUBSTR(STR(?location), 38)) AS ?locationUrl) | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } | |||
} | |||
ORDER BY ?distance | |||
}} | }} |