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

Inconsistency between Natural Earth and OSM road classes #1280

Closed
nvkelso opened this issue Jun 23, 2017 · 5 comments
Closed

Inconsistency between Natural Earth and OSM road classes #1280

nvkelso opened this issue Jun 23, 2017 · 5 comments

Comments

@nvkelso
Copy link
Member

nvkelso commented Jun 23, 2017

I think the general kind: highway part of this was intentional, but possibly not the type: Major Highway > kind: highway. Generally speaking that should have gotten kind: major_road, kind_detail: trunk.

  - filter:
      scalerank: true
      featurecla: Road
      type: [Major Highway, Beltway, Bypass]
    min_zoom: scalerank
    table: ne
    output:
      <<: *ne_properties
      kind: highway
      kind_detail: trunk
@zerebubuth
Copy link
Member

Just to be sure I've understood this correctly: We want the input features with type Major Highway to result in output features with kind: major_road? This is kinda confusing, since "major highway" does suggest a highway.

Should we also remove the kind_detail: trunk from the Beltway and Bypass output (assuming they're keeping the kind: highway)?

@nvkelso
Copy link
Member Author

nvkelso commented Apr 16, 2019

The intent was to better match the motorway versus trunk "highway" transition between zoom 7 and 8 and OSM and Natural Earth (see images and link below).

But you're right – we need to ALSO combine this with Natural Earth's expressway = 1 tag to get the desired effect. Good catch!

So something more like this (assuming we import the expressway boolean from NE)?

  - filter:
      scalerank: true
      featurecla: Road
      type: Major Highway
      expressway: 1
    min_zoom: scalerank
    table: ne
    output:
      <<: *ne_properties
      kind: highway
      kind_detail: motorway
  - filter:
      scalerank: true
      featurecla: Road
      type: [Beltway, Bypass]
      expressway: 1
    min_zoom: scalerank
    table: ne
    output:
      <<: *ne_properties
      kind: highway
      kind_detail: motorway
  - filter:
      scalerank: true
      featurecla: Road
      type: Major Highway
    min_zoom: scalerank
    table: ne
    output:
      <<: *ne_properties
      kind: major_road
      kind_detail: trunk
  - filter:
      scalerank: true
      featurecla: Road
      type: [Beltway, Bypass]
    min_zoom: scalerank
    table: ne
    output:
      <<: *ne_properties
      kind: major_road
      kind_detail: trunk

Here's a view of northern California:

http://tangrams.github.io/bubble-wrap/#8/39.637/-123.054

Screen Shot 2019-04-16 at 00 48 51

Screen Shot 2019-04-16 at 00 51 55

Screen Shot 2019-04-16 at 00 48 43

@zerebubuth
Copy link
Member

It looks like we already do pay attention to expressway:

- filter:
scalerank: true
featurecla: Road
expressway: 1
min_zoom: { clamp: { min: 5, max: 17, value: { col: scalerank } } }
table: ne
output:
<<: *ne_properties
kind: highway
kind_detail: motorway
- filter:
scalerank: true
featurecla: Road
type: [Major Highway, Beltway, Bypass]
min_zoom: { clamp: { min: 5, max: 17, value: { col: scalerank } } }
table: ne
output:
<<: *ne_properties
kind: highway
kind_detail: trunk
- filter:
scalerank: true
featurecla: Road
type: Secondary Highway
min_zoom: { clamp: { min: 5, max: 17, value: { col: scalerank } } }
table: ne
output:
<<: *ne_properties
kind: major_road
kind_detail: primary

Roughly translated, this is saying:

  1. If expressway is 1, then kind is highway,
  2. Else if type is one of Major Highway, Beltway or Bypass then kind is major_road with kind_detail trunk,
  3. Else if type is Secondary Highway then kind is major_road with kind_detail primary.

As far as I can tell, this is essentially the same as the existing algorithm. Although there are 9 expressway Road and 164 expressway Secondary Highway in the database, I don't think any of them are in the view we're looking at.

For more detail: Here's some screenshots of OSM/NE in this location, mapping highways to red, major roads to blue (darker for kind_detail trunk, lighter and thinner for primary).

(Note that I've applied the appropriate scalerank filter, which is why the NE view has a more zoom-appropriate selection of roads than the OSM view - shouldn't affect the comparison between the data where we've got both.)

OSM

image

NE

image

Comparison

roads

@nvkelso
Copy link
Member Author

nvkelso commented Apr 18, 2019

Yes, single line change in https://github.com/tilezen/vector-datasource/blob/master/yaml/roads.yaml#L233 from:

 kind: highway

to:

 kind: major_road

@nvkelso
Copy link
Member Author

nvkelso commented May 9, 2019

Accomplished:

image

Screen Shot 2019-05-08 at 22 58 44

Screen Shot 2019-05-08 at 22 58 32

@nvkelso nvkelso closed this as completed May 9, 2019
@ghost ghost removed the send to staging label May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants