Created
July 23, 2018 07:31
-
-
Save northernjamie/edbe5ebc0c64d4ad672b3b299a656939 to your computer and use it in GitHub Desktop.
Example of geosparql on the NHS PublishMyData platform. Medical organisations with 5km of Alder Hey Children's Hospital
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
prefix geo: <http://www.opengis.net/ont/geosparql#> | |
prefix geof: <http://www.opengis.net/def/function/geosparql/> | |
prefix unit: <http://qudt.org/vocab/unit#> | |
SELECT DISTINCT ?name ?loc ?geo ?selhosp | |
WHERE { | |
?loc rdfs:label ?name . | |
?loc geo:hasGeometry ?geo . | |
<http://opendata.nhs.uk/id/organisation/nacs/RBS25> geo:hasGeometry ?selhosgeo ; | |
rdfs:label ?selhosp . | |
?geo geof:nearby (?selhosgeo 5 <http://qudt.org/vocab/unit#Kilometer>). | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment