query-5baee527cc0b4cfafc2fe2381e1b2b15
coordinate location (P625) constraints and mappings). I would assume that there are similar flaws when sorting coordinates, checking nearby etc. This is not an exceptional case: There is no second planet to map the latitude to [-180°,+180°]. The problem occurs on the map, where a second planet is used to show longitudes > 180 ([5]), which I changed: (Q59508672)San Pablo-Toledo Magnetic Observatory Hi, stumbled across longitudes > 180 (
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel ?coord (COUNT(?item) AS ?countries) (IF(?countries = 1, SAMPLE(?country), ?countries) AS ?layer) {
VALUES ?isa { wd:Q62832 }
?item wdt:P31/wdt:P279* ?isa .
?item wdt:P17 ?country .
?item p:P625 [
psv:P625 [
wikibase:geoLatitude ?lat ;
wikibase:geoLongitude ?lon ;
] ;
ps:P625 ?coord
]
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?coord
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?_anon_42b5416610844a34809f33a099ae9de1123495"):::projected
v6("?coord"):::projected
v8("?countries"):::projected
v3("?country")
v1("?isa")
v2("?item"):::projected
v4("?lat")
v9("?layer")
v5("?lon")
a1((" "))
a3((" "))
a2((" "))
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?isa/]
bind0-->v1
bind00(["wd:Q62832"])
bind00 --> bind0
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> v1
v2 --"p:direct/P17"--> v3
a2 --"wikibase:geoLatitude"--> v4
a2 --"wikibase:geoLongitude"--> v5
a3 --"p:statement/value/P625"--> a2
a3 --"p:statement/P625"--> v6
v2 --"p:P625"--> a3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind3[/"sample(?country)"/]
v3 --o bind3
bind3 --as--o v7
bind4[/"count(?item)"/]
v2 --o bind4
bind4 --as--o v8
bind5[/"if(?countries = '1^^xsd:integer',,?countries)"/]
v8 --o bind5
null --o bind5
bind5 --as--o v9