query-ced70da7b38f514842f399aabd041e5e

rq turtle/ttl

Correct coordinate location precision Jarekt: Request date: 9 October 2017, byTask descriptionMany coordinate locations on Wikidata have incorrectly set "precision" parameter. The query below finds ~2000 items where latitude and longitude are integers (measured in degrees) while precision is set to a value less than a degree. Those locations should change the "precision" setting to +-1 degree. Latter we could do similar runs for precissions +- 1 arcminute, etc. Correct coordinate location precisionMany coordinate locations on Wikidata have incorrectly set "precision" parameter. The query below finds ~2000 items where latitude and longitude are integers (measured in degrees) while precision is set to a value less than a degree. Those locations should change the "precision" setting to +-1 degree. Latter we could do similar runs for precissions +- 1 arcminute, etc.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
SELECT ?item ?itemLabel ?coord ?prec
WHERE
{
 ?item p:P625 ?coordinate.
 ?coordinate ps:P625 ?coord.
 ?coordinate psv:P625 ?coordinate_node.
 ?coordinate_node wikibase:geoLongitude ?lon.
 ?coordinate_node wikibase:geoLatitude ?lat.  
 ?coordinate_node wikibase:geoPrecision ?prec.  
 FILTER (?lat=ROUND(?lat)) . # integer latitude (in degrees)
 FILTER (?lon=ROUND(?lon)) . # integer longitude (in degrees)
 FILTER (?prec<1) .         # measurement precision less then one degree
 MINUS {?item p:P31 wd:Q146591} # not a circle of latitude
 MINUS {?item p:P31 wd:Q32099 } # not a meridian
 MINUS {?item p:P31 wd:Q17272482 } # not a time zone
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coord"):::projected v5("?coordinate") v7("?coordinate_node") v4("?item"):::projected v3("?lat") v2("?lon") v1("?prec"):::projected c9(["wd:Q146591"]):::iri c15(["en"]):::literal c11(["wd:Q17272482"]):::iri c13(["bd:serviceParam"]):::iri c10(["wd:Q32099"]):::iri f0[["?prec < '1^^xsd:integer'"]] f0 --> v1 f1[["?lon = numeric-round(?lon)"]] f1 --> v2 f2[["?lat = numeric-round(?lat)"]] f2 --> v3 v4 --"p:P625"--> v5 v5 --"p:statement/P625"--> v6 v5 --"p:statement/value/P625"--> v7 v7 --"wikibase:geoLongitude"--> v2 v7 --"wikibase:geoLatitude"--> v3 v7 --"wikibase:geoPrecision"--> v1 subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v4 --"p:P31"--> c9 end subgraph minus4["MINUS"] style minus4 stroke-width:6px,fill:pink,stroke:red; v4 --"p:P31"--> c10 end subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; v4 --"p:P31"--> c11 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end