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 object. Copying from wiki:
# this relation contains a way with blank label
  osmm:has osmway:2345 ;
# this relation contains a node with a non-ascii label
  osmm:has:_ osmnode:1234 ;
# this relation contains a relation labelled as "inner"
  osmm:has:inner osmrel:4567 ;

See
https://wiki.openstreetmap.org/wiki/Wikidata%2BOSM_SPARQL_query_service#How_OSM_data_is_stored

At this point there is no "osmm:loc" stored for relations. I wonder if it
is possible to calculate it dynamically using the geo functions built into
Wikidata's engine (Blazegraph + customizations). If not, I might need to do
some relations postprocessing, as well as automatic updating.

On Mon, Aug 14, 2017 at 1:39 PM, François Lacombe <fl.infosrese...@gmail.com
> wrote:

> Hi
>
> 2017-08-14 11:18 GMT+02:00 mmd <mmd....@gmail.com>:
>
>> 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 endless pain to
>> get that information out of minutely diffs :)
>>
>
> Out of curiosity, can you explain how relations are processed also ?
> Is this relevant to look for a representative point for a relation or a
> more complex search have to be done for specific members (roles) ?
>
> I don't know Shapely enough to say if it can handle this standalone and it
> would be greate to elaborate a bit what is done from line 260 to 280 of
> osm2rdf.py :)
>
>
> All the best
>
> François
>
> _______________________________________________
> talk mailing list
> talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk
>
>
_______________________________________________
talk mailing list
talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk

Reply via email to