User:Richard Nevell (WMUK)
Jump to navigation
Jump to search
Map of archaeological sites in Libya
[edit]The following query uses these:
- Properties: instance of (P31) , subclass of (P279) , country (P17) , coordinate location (P625)
Features: map (Q24515275)
# UK archaeological site on a map (must have coordinates!)
#defaultView:Map
SELECT ?library ?libraryLabel ?coords WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". }
?library (wdt:P31/wdt:P279*) wd:Q839954.
?library wdt:P17 wd:Q1016.
?library wdt:P625 ?coords.
}
Geolocated things in a box roughly defining Libya
[edit]The following query uses these:
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625)
Features: map (Q24515275)
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
#defaultView:Map
SELECT ?label ?loc ?subj WHERE {
{ ?subj (wdt:P31/wdt:P279*) wd:Q839954. }
UNION
{ }
?subj wdt:P625 ?loc.
?subj (p:P625/psv:P625) ?coord.
?subj rdfs:label ?label.
?coord wikibase:geoLatitude ?lat.
?coord wikibase:geoLongitude ?long.
FILTER((LANG(?label)) = "en")
FILTER(?lat > "25.56"^^xsd:decimal)
FILTER(?lat < "33.65"^^xsd:decimal)
FILTER(?long > "8.22"^^xsd:decimal)
FILTER(?long < "18.97"^^xsd:decimal)
}