Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-09-03 Thread Yuri Astrakhan
OSM+WD service updates: new examples interface contains just the OSM-related examples, and they are user-contributable. The osmm:loc (centroid) is now stored with all objects including relations, so it is now easy to see how far Wikidata's coordinates are from OSM's - http://tinyurl.com/yd97qtp2

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-23 Thread Sarah Hoffmann
On Mon, Aug 21, 2017 at 05:38:06PM -0400, Yuri Astrakhan wrote: > Sarah, thanks, I created an issue at > https://github.com/osmcode/pyosmium/issues/47 > > Does this mean I cannot even use the existing node cache file when > processing ways from the minute diff files from pyosmium? You can do the

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-21 Thread Yuri Astrakhan
Sarah, thanks, I created an issue at https://github.com/osmcode/pyosmium/issues/47 Does this mean I cannot even use the existing node cache file when processing ways from the minute diff files from pyosmium? On Mon, Aug 21, 2017 at 4:44 PM, Sarah Hoffmann wrote: > On Sun, Aug

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-21 Thread Sarah Hoffmann
On Sun, Aug 20, 2017 at 11:08:03PM -0400, Yuri Astrakhan wrote: > Sarah, how would I set the node cache file to the repserv.apply_diffs()? > The idx param is passed to the apply_file() - for the initial PBF dump > parsing, but I don't see any place to pass it for the subsequent diff > processing.

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-20 Thread Yuri Astrakhan
Sarah, how would I set the node cache file to the repserv.apply_diffs()? The idx param is passed to the apply_file() - for the initial PBF dump parsing, but I don't see any place to pass it for the subsequent diff processing. I assume there must be a way to run .apply_diff() that will download

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-14 Thread Sarah Hoffmann
On Mon, Aug 14, 2017 at 11:10:39AM -0400, Yuri Astrakhan wrote: > mmd, the centroids are calculated with this code, let me know if there is a > better way, I wasn't aware of any issues with the minute data updates. > wkb = wkbfab.create_linestring(obj) > point = loads(wkb,

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-14 Thread Yuri Astrakhan
For relations, I simply add "members" in addition to "tags". The members are stored as 3 different predicates: "osmm:has", "osmm:has:_", and "osm:has:..." (where the ... represents any "valid" label - same rules as for the tag key). The object (value) of the statement is a link to another OSM

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-14 Thread François Lacombe
Hi 2017-08-14 11:18 GMT+02:00 mmd : > Hi, > > Am 13.08.2017 um 19:49 schrieb Yuri Astrakhan: > > > * all ways now store "osmm:loc" with centroid coordinates, making it > > possible to crudely filter ways by location > > out of curiosity, can you say a few words on how your

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-14 Thread Yuri Astrakhan
mmd, the centroids are calculated with this code, let me know if there is a better way, I wasn't aware of any issues with the minute data updates. wkb = wkbfab.create_linestring(obj) point = loads(wkb, hex=True).representative_point()

Re: [OSM-talk] OSM Wikidata SPARQL service updated

2017-08-14 Thread mmd
Hi, Am 13.08.2017 um 19:49 schrieb Yuri Astrakhan: > * all ways now store "osmm:loc" with centroid coordinates, making it > possible to crudely filter ways by location out of curiosity, can you say a few words on how your overall approach to calculate centroids for ways? As we all know it's an

[OSM-talk] OSM Wikidata SPARQL service updated

2017-08-13 Thread Yuri Astrakhan
The combined SPARQL database of OSM and Wikidata has been updated: * There is a short video explaining the basics (at the top of [1]) * new Wikidata interface * now all OSM "wikipedia" tags and sitelinks in Wikidata are stored the same way, so it is possible to cross-check when "wikidata" and