Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export wikidata properties #1871

Merged
merged 4 commits into from
Apr 18, 2019
Merged

Export wikidata properties #1871

merged 4 commits into from
Apr 18, 2019

Conversation

zerebubuth
Copy link
Member

For features in the water, places and pois layers, export Wikidata IDs, where they're available from upstream data (i.e: OSM, NE or WOF).

Note: this requires tilezen/tilequeue#375 for the WOF import to work properly, although tests should still pass without it.

Connects to #858.

@@ -33,7 +33,8 @@ CREATE TABLE wof_neighbourhood (
inception DATE NOT NULL DEFAULT '0001-01-01',
cessation DATE NOT NULL DEFAULT '9999-12-31',
is_visible BOOLEAN NOT NULL DEFAULT true,
l10n_name HSTORE
l10n_name HSTORE,
wikidata TEXT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: wikidata_id?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could leave as wikidata here, might make import easier. But the ETL should transform it to wikidata_id on export.

docs/layers.md Outdated
@@ -743,6 +743,7 @@ Places with `kind` values of `continent`, `country`, with others added starting
* `max_zoom`: a suggested maximum zoom beyond which the place should not be visible. Currently neighbourhoods only, from Who's On First.
* `is_landuse_aoi`: Currently neighbourhoods only, from Who's On First
* `kind_detail`: the original value of the OSM `place` tag and Natural Earth `featurecla`, see below.
* `wikidata`: when present, the [Wikidata](https://www.wikidata.org) ID corresponding to this feature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's export these as wikidata_id so it's clear what that it's a concordance value not a web link.

docs/layers.md Outdated
@@ -827,6 +828,7 @@ To resolve inconsistency in data tagging in OpenStreetMap we normalize several o
* `exit_to`: only for highway exits
* `ref`: generally only for `aeroway_gate` and `station_entrance` features
* `religion`: TODO
* `wikidata`: when present, the [Wikidata](https://www.wikidata.org) ID corresponding to this feature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wikidata_id (see above)

docs/layers.md Outdated
@@ -2374,6 +2376,7 @@ Tilezen calculates the composite exterior edge for overlapping water polygons an
* `area`: in square meters (spherical Mercator, no real-world), `polygon` features only
* `id`: OpenStreetMap feature `osm_id`, when sourced from `openstreetmap.org`
* `is_tunnel`: for `line` features only (`true` values only)
* `wikidata`: when present, the [Wikidata](https://www.wikidata.org) ID corresponding to this feature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wikidata_id (see above)

@@ -926,6 +926,29 @@ def test_plaque_node(self):
'kind': u'plaque',
})

def test_memorial_node(self):
# if a memorial _isn't_ a plaque, then it should stay as a memorial!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a note in the changelog!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added #1872 to remind us to put into changelog.

yaml/places.yaml Outdated
@@ -23,6 +23,7 @@ global:
call:
func: util.true_or_none
args: [ { col: is_landuse_aoi } ]
wikidata: {col: wikidata}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Export as wikidata_id (see above)

yaml/pois.yaml Outdated
@@ -20,6 +20,7 @@ global:
attraction: {col: attraction}
zoo: {col: zoo}
exit_to: {col: exit_to}
wikidata: {col: wikidata}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Export as wikidata_id (see above)

yaml/water.yaml Outdated
@@ -11,6 +11,7 @@ globals:
label_placement: {col: label_placement}
boundary: {col: boundary}
tunnel: {col: tunnel}
wikidata: {col: wikidata}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Export as wikidata_id (see above)

Copy link
Member

@nvkelso nvkelso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wikidata > wikidata_id and then LGTM

@zerebubuth
Copy link
Member Author

wikidata > wikidata_id and then LGTM

In the past, we've mostly followed the OSM convention when it comes to property names, which in this case would be just plain wikidata. However, wikidata_id is more explicit - fixed in e458e3a.

@zerebubuth zerebubuth merged commit 68ad88a into master Apr 18, 2019
@zerebubuth zerebubuth deleted the zerebubuth/858-wikidata branch April 18, 2019 10:00
@nvkelso
Copy link
Member

nvkelso commented Apr 23, 2019

Not yet in a dev build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants