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

New kinds for OSM and iD presets #1543

Merged
merged 28 commits into from
Jun 28, 2018
Merged

Conversation

zerebubuth
Copy link
Member

@zerebubuth zerebubuth commented Jun 27, 2018

New kinds:

  • chemist
  • elevator
  • embankment (also an embankment property on roads and railways, and cutting)
  • miniature_golf
  • mud
  • orchard
  • plant_nursery
  • plaque (merging both memorial=plaque and historic=memorial_plaque)
  • reef
  • cosmetics
  • fishmonger
  • bunker
  • wayside_cross
  • obelisk

Added kind_detail whitelists on:

  • beach
  • forest and wood
  • wetland

Verified that all the kinds mentioned in #1425 are either implemented here or have been previously implemented. Checked docs and tests, too.

Connects to #1425.

@zerebubuth zerebubuth requested a review from nvkelso June 27, 2018 19:40
min_zoom: 16
output:
<<: *output_properties
kind: plaque
Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with this generic kind value of plaque (versus memorial_plaque).

# call surface=grass a beach, but it's in the data..?
kind_detail:
case:
- when: {surface: [grass, gravel, pebbles, pebblestone, rocky, sand]}
Copy link
Member

Choose a reason for hiding this comment

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

Looks like my favorite British English-ism https://wiki.openstreetmap.org/wiki/Tag:natural=shingle never factors in here (guess it would be rocky), looking at TagInfo.

yaml/roads.yaml Outdated
@@ -78,6 +78,14 @@ global:
sidewalk: {col: sidewalk}
sidewalk_left: {col: 'sidewalk:left'}
sidewalk_right: {col: 'sidewalk:right'}
cutting:
case:
- when: {cutting: ['yes', 'right', 'left', 'both']}
Copy link
Member

Choose a reason for hiding this comment

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

Can this work more like bike lanes – where it's yes, right, left and if both then it'd just be yes? (Please verify, this is from memory.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I was just setting cutting to true if it matched any of those (or omitting if it didn't match). I've updated in 8c79ac2 to make the values yes, left or right.

Looking at the properties for cycleway, it looks like we export a cycleway_both property, so we don't collapse that down onto cycleway. Perhaps that's something we should come back to on a ☔ (although now I suppose it'd be a breaking change, we'd need to wait for v2.0).

yaml/roads.yaml Outdated
then: true
embankment:
case:
- when: {embankment: ['yes', 'right', 'left', 'two_sided', 'both']}
Copy link
Member

Choose a reason for hiding this comment

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

Can this work more like bike lanes – where it's yes, right, left and if both then it'd just be yes? (Please verify, this is from memory.)

Copy link
Member Author

Choose a reason for hiding this comment

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

embankment and cutting are now one of yes, left, right in 8c79ac2. See comment above regarding bike lanes.

@@ -621,11 +628,11 @@ The value of the OpenStreetMap `wall` tag. Common values include `brick`, `castl

##### Wetland `kind_detail` values:

The value of the OpenStreetMap `wetland` tag. Common values include `bog`, `fen`, `mangrove`, `marsh`, `reedbed`, `saltmarsh`, `string_bog`, `swamp`, `tidalflat`, and `wet_meadow`.
The value of the OpenStreetMap `wetland` tag. If available, value will be one of: `bog`, `fen`, `mangrove`, `marsh`, `mud`, `reedbed`, `saltern`, `saltmarsh`, `string_bog`, `swamp`, `tidalflat`, `wet_meadow`.
Copy link
Member

Choose a reason for hiding this comment

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

docs/layers.md Outdated
@@ -853,6 +861,7 @@ To resolve inconsistency in data tagging in OpenStreetMap we normalize several o
* `consulting`
* `convenience`
* `copyshop` - A shop offering photocopying and printing services.
* `cosmetics` - A shop selling cosmetics.
Copy link
Member

Choose a reason for hiding this comment

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

Since we also say chemist sells "cosmetics" let's say for this one:
A specialty shop selling cosmetics.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, thanks. Fixed in fe1cbf0.

yaml/pois.yaml Outdated
@@ -2100,6 +2138,18 @@ filters:
<<: *output_properties
kind: sanitary_dump_station

- filter: {highway: elevator}
min_zoom: 16
Copy link
Member

Choose a reason for hiding this comment

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

To min_zoom 17, please. This is an "indoor" feature.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. Updated in 1e6b874.

yaml/pois.yaml Outdated
- filter: {historic: memorial}
min_zoom: 17
output:
<<: *output_properties
kind: memorial
# obelisk - but not a monument or a memorial
Copy link
Member

@nvkelso nvkelso Jun 27, 2018

Choose a reason for hiding this comment

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

I think obelisk should be sorted (matched first) above plaque and memorial – it's the thing visible from far while the others are generally attached to an obelisk?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. Done in bfb655a. Moved the monument/memorial info to kind_detail and updated documentation and added tests.

'natural': u'beach',
'source': u'openstreetmap.org',
'surface': u'gravel',
# fake name to get the POI to appear
Copy link
Member

Choose a reason for hiding this comment

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

Nice ;)

Copy link
Member

Choose a reason for hiding this comment

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

This is true for pois, but for landuse the polygon would still show up regardless of name being present?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, the fake name is only needed for POIs. I've split the test in 4f20bd3 between pois and landuse, with the fake name only on the pois test.

# https://www.openstreetmap.org/way/510502210
dsl.way(510502210, dsl.tile_box(z, x, y), {
'highway': u'elevator',
'level': u'(-1,-2)',
Copy link
Member

Choose a reason for hiding this comment

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

Someday we'll do indoor, but not today!

yaml/pois.yaml Outdated
@@ -497,6 +498,16 @@ filters:
<<: *output_properties
kind: danger_area
tier: 3
# bunker
- filter: {military: bunker}
min_zoom: 16
Copy link
Member

@nvkelso nvkelso Jun 27, 2018

Choose a reason for hiding this comment

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

Can this be 16 if with a name and 18 if no-name? For client-side collisions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, sounds good. Fixed in 09a6734.

@@ -489,6 +493,17 @@ filters:
<<: *output_properties
kind: glacier
tier: 3
# reef
- filter: {natural: reef}
Copy link
Member

Choose a reason for hiding this comment

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

Odd question – but since this is underwater should this go into the water layer instead of landuse?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, that makes sense. Moved to water layer in 973963c.

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.

LGTM with a few comments and questions.

Only big one is if reef should go into water layer.

(I think this totally closes out the #1425 issue.)

@zerebubuth
Copy link
Member Author

@nvkelso I think I addressed all the issues. Would you like to give it a quick look over again, just to be sure?

yaml/pois.yaml Outdated
@@ -1139,6 +1156,17 @@ filters:
output:
<<: *output_properties
kind: motorway_junction
# obelisk - note that this takes precedence over monument and memorial!
- filter: {man_made: obelisk}
min_zoom: { clamp: { min: 15, max: 17, value: { sum: [ { col: zoom }, 2.24 ] } } }
Copy link
Member

Choose a reason for hiding this comment

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

For the Washington Monument in DC, if something is "tall", let's make it zoom 14. (greater than 20 meters?)

If it's medium tall then zoom 15? (greater than 10 meters?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in b90875b. Also pushed the priority of obelisks above artworks, as some appear to also have tourism=artwork on them, but obelisk seems more specific - especially for the >10m ones.

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.

LGTM with one comment about obelisk zooms.

@zerebubuth zerebubuth merged commit 7f224ff into master Jun 28, 2018
@zerebubuth zerebubuth deleted the zerebubuth/1425-osm-id-new-kinds branch June 28, 2018 17:18
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