-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_queries.txt
96 lines (89 loc) · 1.86 KB
/
sample_queries.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Lat & Long
# Counting
SELECT COUNT(DISTINCT ?place) WHERE {
{
?place geo:lat ?lat .
?place geo:long ?lon .
}
}
# Query
SELECT DISTINCT ?place SAMPLE(?lat) AS ?lat SAMPLE(?lon) AS ?lon WHERE {
{
?place geo:lat ?lat .
?place geo:long ?lon .
} GROUP BY ?place
# LatD & LongD
# Counting
SELECT COUNT(DISTINCT ?place) WHERE {
{
?place dbp:latd ?lat .
?place dbp:longd ?lon .
} UNION
{
?place dbp:latD ?lat .
?place dbp:longD ?lon .
}
}
# Query
SELECT DISTINCT ?place SAMPLE(?lat) AS ?lat SAMPLE(?lon) AS ?lon WHERE {
{
?place dbp:latd ?lat .
?place dbp:longd ?lon .
} UNION
{
?place dbp:latD ?lat .
?place dbp:longD ?lon .
}
} GROUP BY ?place
# Geometry
# Counting
SELECT COUNT(DISTINCT ?place) WHERE {
?place geo:geometry ?wkt .
}
# Query
SELECT DISTINCT ?place SAMPLE(?wkt) AS ?wkt WHERE {
?place geo:geometry ?wkt.
} GROUP BY ?place
# GeoRSS
# Counting
SELECT COUNT(DISTINCT ?place) WHERE {
?place georss:point ?point.
}
# Query
SELECT DISTINCT ?place SAMPLE(?point) AS ?point WHERE {
?place georss:point ?point.
} GROUP BY ?place
# Degrees
# Counting
SELECT COUNT(DISTINCT ?place) WHERE {
?place dbp:latDegrees ?lat.
?place dbp:longDegrees ?lon.
}
# Query
SELECT DISTINCT ?place SAMPLE(?lat) AS ?lat SAMPLE(?lon) AS ?lon WHERE {
?place dbp:latDegrees ?lat.
?place dbp:longDegrees ?lon.
} GROUP BY ?place
# WD
# Query
PREFIX : <http://www.wikidata.org/entity/>
PREFIX wdo: <http://www.wikidata.org/ontology#>
SELECT DISTINCT ?place ?lat ?lon WHERE {
?place :P625c ?coords .
?coords wdo:latitude ?lat .
?coords wdo:longitude ?lon .
?coords wdo:globe :Q2 .
}
# All SPOIs (https://www.foodie-cloud.org/sparql)
# Count
SELECT COUNT(DISTINCT ?poi)
FROM <http://www.sdi4apps.eu/poi.rdf>
WHERE {
?poi ogcgs:asWKT ?wkt .
}
# Query
SELECT DISTINCT ?poi SAMPLE(?wkt) AS ?geo
FROM <http://www.sdi4apps.eu/poi.rdf>
WHERE {
?poi ogcgs:asWKT ?wkt .
} GROUP BY ?poi