mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Edit nearby query
This commit is contained in:
parent
b96f8a68ce
commit
1f3c8c8deb
1 changed files with 4 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ SELECT
|
||||||
?wikipediaArticle
|
?wikipediaArticle
|
||||||
?commonsArticle
|
?commonsArticle
|
||||||
(SAMPLE(?commonsCategory) as ?commonsCategory)
|
(SAMPLE(?commonsCategory) as ?commonsCategory)
|
||||||
|
(SAMPLE(?pic) as ?pic)
|
||||||
WHERE {
|
WHERE {
|
||||||
# Around given location...
|
# Around given location...
|
||||||
SERVICE wikibase:around {
|
SERVICE wikibase:around {
|
||||||
|
|
@ -16,9 +17,6 @@ SELECT
|
||||||
bd:serviceParam wikibase:radius "${RAD}" . # Radius in kilometers.
|
bd:serviceParam wikibase:radius "${RAD}" . # Radius in kilometers.
|
||||||
}
|
}
|
||||||
|
|
||||||
# ... and without an image.
|
|
||||||
MINUS {?item wdt:P18 []}
|
|
||||||
|
|
||||||
# Get the label in the preferred language of the user, or any other language if no label is available in that language.
|
# Get the label in the preferred language of the user, or any other language if no label is available in that language.
|
||||||
OPTIONAL {?item rdfs:label ?itemLabelPreferredLanguage. FILTER (lang(?itemLabelPreferredLanguage) = "${LANG}")}
|
OPTIONAL {?item rdfs:label ?itemLabelPreferredLanguage. FILTER (lang(?itemLabelPreferredLanguage) = "${LANG}")}
|
||||||
OPTIONAL {?item rdfs:label ?itemLabelAnyLanguage}
|
OPTIONAL {?item rdfs:label ?itemLabelAnyLanguage}
|
||||||
|
|
@ -26,6 +24,9 @@ SELECT
|
||||||
# Get Commons category (P373)
|
# Get Commons category (P373)
|
||||||
OPTIONAL { ?item wdt:P373 ?commonsCategory. }
|
OPTIONAL { ?item wdt:P373 ?commonsCategory. }
|
||||||
|
|
||||||
|
# Get (P18)
|
||||||
|
OPTIONAL { ?item wdt:P18 ?pic. }
|
||||||
|
|
||||||
# Get the class label in the preferred language of the user, or any other language if no label is available in that language.
|
# Get the class label in the preferred language of the user, or any other language if no label is available in that language.
|
||||||
OPTIONAL {
|
OPTIONAL {
|
||||||
?item p:P31/ps:P31 ?classId.
|
?item p:P31/ps:P31 ?classId.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue