﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
15264	Add support for OSM+Wikidata SPARQL queries	nyurik	team	"The new OSM+Wikidata service offers a new approach to improve the quality of existing OSM data.

https://wiki.openstreetmap.org/wiki/Wikidata%2BOSM_SPARQL_query_service

The service has both OSM data as well as a full copy of Wikidata database, plus it includes information for the Wikipedia pageviews - allowing queries for the popularity of articles.  The service uses SPARQL - a well known, standardized SQL-like language for graph databases. Numerous example queries, accessible directly from the service, would show some of the service capabilities.  While the service can show things as a graph or a map, JOSM's integration would only need a simple table output. The service is actually an adaptation of Wikidata's existing storage, plus some OSM-specific features and data.

Implementation:

The easiest would be to simply look at all the returned columns, and use all value URIs that begin with a known prefix, e.g. <http://www.openstreetmap.org/node/2681940767> -- and then perform ""download objects by IDs"". 

Geometry info:

Unlike OverpassTurbo, this service does not store or process geometries. Instead, it stores object centroids as a single point. There are several functions for geo searching, listed in https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual

An example https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries#Places_between_Arc_de_Triomphe_.28Q64436.29_and_Louvre_.28Q19675.29
has a few wikidata examples for using bounding box - JOSM could expand {{bbox}} into 
    bd:serviceParam wikibase:cornerWest ""Point(2.295 48.8738)""^^geo:wktLiteral .
    bd:serviceParam wikibase:cornerEast ""Point(2.33575 48.861088888)""^^geo:wktLiteral .

and it could expand {{center}} into ""Point(2.33575 48.861088888)""^^geo:wktLiteral  constant."	enhancement	closed	normal		Plugin wikipedia		fixed		
