Project:SPARQL/examples: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 10: | Line 10: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Observations within | == Observations within 100 km from San Francisco == | ||
<syntaxhighlight> | <syntaxhighlight> | ||
#defaultView:Map | #defaultView:Map | ||
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/> | PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/> | ||
SELECT ? | SELECT ?utrechtLocation | ||
WHERE | WHERE | ||
{ | { | ||
SERVICE <https://query.wikidata.org/sparql> { | |||
wd:Q62 wdt:P625 ?utrechtLocation . | |||
} | |||
# Utrecht coordinates | |||
SERVICE wikibase:around { | SERVICE wikibase:around { | ||
?observation wbt:P8 ?location . | |||
bd:serviceParam wikibase:center ? | bd:serviceParam wikibase:center ?utrechtLocation . | ||
bd:serviceParam wikibase:radius "10" . | bd:serviceParam wikibase:radius "10" . | ||
} . | } . |
Revision as of 13:28, 17 December 2019
Observations and their locations
#defaultView:Map
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
SELECT * WHERE {
?s wbt:P8 ?o .
}
}}
Observations within 100 km from San Francisco
#defaultView:Map
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/>
SELECT ?utrechtLocation
WHERE
{
SERVICE <https://query.wikidata.org/sparql> {
wd:Q62 wdt:P625 ?utrechtLocation .
}
# Utrecht coordinates
SERVICE wikibase:around {
?observation wbt:P8 ?location .
bd:serviceParam wikibase:center ?utrechtLocation .
bd:serviceParam wikibase:radius "10" .
} .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}