Skip to content

Commit 1f3c8c8

Browse files
committed
Edit nearby query
1 parent b96f8a6 commit 1f3c8c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/main/resources/queries/nearby_query.rq

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ SELECT
88
?wikipediaArticle
99
?commonsArticle
1010
(SAMPLE(?commonsCategory) as ?commonsCategory)
11+
(SAMPLE(?pic) as ?pic)
1112
WHERE {
1213
# Around given location...
1314
SERVICE wikibase:around {
@@ -16,16 +17,16 @@ SELECT
1617
bd:serviceParam wikibase:radius "${RAD}" . # Radius in kilometers.
1718
}
1819

19-
# ... and without an image.
20-
MINUS {?item wdt:P18 []}
21-
2220
# Get the label in the preferred language of the user, or any other language if no label is available in that language.
2321
OPTIONAL {?item rdfs:label ?itemLabelPreferredLanguage. FILTER (lang(?itemLabelPreferredLanguage) = "${LANG}")}
2422
OPTIONAL {?item rdfs:label ?itemLabelAnyLanguage}
2523

2624
# Get Commons category (P373)
2725
OPTIONAL { ?item wdt:P373 ?commonsCategory. }
2826

27+
# Get (P18)
28+
OPTIONAL { ?item wdt:P18 ?pic. }
29+
2930
# Get the class label in the preferred language of the user, or any other language if no label is available in that language.
3031
OPTIONAL {
3132
?item p:P31/ps:P31 ?classId.

0 commit comments

Comments
 (0)