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

Add building material tag to output. #1455

Merged
merged 3 commits into from
Dec 18, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Values for `kind_detail` are sourced from OpenStreetMap's `building` tag for bu
* `addr_housenumber`: value from OpenStreetMap's `addr:housenumber` tag
* `addr_street`: value from OpenStreetMap's `addr:street` tag
* `area`: in square meters (spherical Mercator, no real-world), `polygon` features only. _See planned bug fix in [#1095](https://github.com/tilezen/vector-datasource/issues/1095)._
* `building_material`: A description of the material covering the outside of the building or building part, if the information is available. Common values are: `cement_block`, `brick`, `plaster`, `wood`, `concrete`, `metal`, `stone`, `traditional`, `glass`, `mud`, `masonry`, `steel`, `semi-permanent`, `tin`, `permanent`, `timber-framing`, `sandstone`, `clay` and `other`, and there are many other less common values.
Copy link
Member

Choose a reason for hiding this comment

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

Generally we alphabetize these sorts of lists.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was in order of the number of uses, descending. I thought that would be more useful to anyone who only wants to support the top N values. Would it be better to call that out, or alphabetise the list and let people pick values they think are important?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, please sort a-z.

* `height`: in meters, where available
* `layer`
* `location`: from OpenStreetMap to indicate if building is underground, similar to `layer`.
Expand Down
24 changes: 24 additions & 0 deletions integration-test/1408-building-material.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from . import FixtureTest


class BuildingMaterial(FixtureTest):

def test_building_material(self):
self.load_fixtures([
'https://www.openstreetmap.org/way/135174116',
])

self.assert_has_feature(
16, 10484, 25327, 'buildings',
{'id': 135174116, 'kind': 'building',
'building_material': 'brick'})

def test_building_part_material(self):
self.load_fixtures([
'https://www.openstreetmap.org/way/451331532',
])

self.assert_has_feature(
16, 10484, 25324, 'buildings',
{'id': 451331532, 'kind': 'building_part',
'building_material': 'concrete'})
1 change: 1 addition & 0 deletions yaml/buildings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ globals:
building_part: {col: "building:part"}
building_levels: {col: "building:levels"}
building_min_levels: {col: "building:min_levels"}
building_material: {col: "building:material"}
height: {col: height}
min_height: {col: min_height}
layer: {col: layer}
Expand Down