-
Notifications
You must be signed in to change notification settings - Fork 120
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
Drop many "detail" tags on minor roads at mid zooms. #1710
Conversation
Drop RCN from 12 down to 0, LCN from 15 down to 0, and any network on track paths from 12 down to zero. These properties inhibit some degree of merging at mid zooms. Context: #1331 (comment)
On minor roads (only - this doesn't apply to major roads or highways), drop the following from zoom 15 down: * `colour` * `motor_vehicle` * `operator` * `route` * `route_name` * `state` * `surface` * `symbol` * `type` And the following from zoom 13 down: * `cutting` * `embankment` This helps a lot with road merging, as the fewer distinct combinations of road properties there are, the more roads can be merged into one another. Also, drop most values of the `access` property from zoom 13 down, keeping `access=no`, `access=private` and `access=official`. The `no` and `private` values are important for knowing which streets are inaccessible, but many other distinctions are unimportant at this zoom level, where streets might be a few pixels long, e.g: `access=customers` (if styled at all) can be made prominent as the view is zoomed in a bit more. Further, we merge some `access` values together; `emergency`, `military`, `restricted` and `forestry` all map to `access=official`, which indicates that there is some kind of restriction, but allows for geometry merging and value compression through re-use. These measures together produced a 14% reduction in the number of `minor_road` features on `12/1206/1540`, reflected in a similar drop in the size of the metadata and properties for the MVT tile. Overall, the `roads` layer was 4% smaller (about 3kB for this tile).
start_zoom: 0 | ||
end_zoom: 15 | ||
properties: | ||
- surface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: It looks like surface is used to set "brown" color on line and text halo in Walkabout at some zooms, but looks like only for kind
= path so we're good?
https://github.com/tangrams/walkabout-style/blob/gh-pages/layers/bike-interlay.yaml#L705-L708
queries.yaml
Outdated
end_zoom: 16 | ||
properties: | ||
- colour | ||
- motor_vehicle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like motor_vehicle
= no could be used for minor_road
starting at zoom 12:
https://github.com/tangrams/walkabout-style/blob/gh-pages/walkabout-style.yaml#L2294-L2304
queries.yaml
Outdated
- cutting | ||
- embankment | ||
where: >- | ||
kind == 'minor_road' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could probably be for any kind (not just minor_road
)...
params: | ||
source_layer: roads | ||
start_zoom: 0 | ||
end_zoom: 14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
queries.yaml
Outdated
@@ -985,6 +1052,42 @@ post_process: | |||
properties: | |||
- walking_network | |||
- walking_shield_text | |||
# drop RCN network & shield text below zoom 13. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has commits from the other PR, which has requested changes...
# don't want to go there", while still not being quite the same thing as | ||
# access=private or access=no, which are both "you definitely don't want | ||
# to go there". | ||
remap: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big savings!
Suggest splitting out motor_vehicle
to separate statement to avoid Walkabout regression, and expanding embankment filter beyond minor_road kind, and then housekeeping around bicycle commits.
…ties' into zerebubuth/1331-access-surface
…Strip cutting and embankment from all roads, not just minor roads.
- all_walking_networks | ||
- all_walking_shield_texts | ||
- all_bus_networks | ||
- all_bus_shield_texts | ||
# drop all_bicycle_* until the max zoom: | ||
# https://github.com/tilezen/vector-datasource/pull/1707#discussion_r236522176 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I didn't expand the diff enough in the earlier review.
It's probably better to be more consistent and just drop all the all*
in the same zoom range. I'd be fine keeping that end zoom 14, but also...
To address the merging you called out for minor_road
drop all all*
for minor_road
only thru zoom 15 (end_zoom zoom 16) max zoom?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit of a corner-case thing, since we only export all_*
properties on JSON tiles. I like them for multi-shielding, but AFAIK, no one is using it for that and it does affect merging... So perhaps this is something that we come back to once we're into multi-shielding territory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a fresh set of eyes I now see what you're doing and agree more with your earlier approach, but with a modification as proposed in https://github.com/tilezen/vector-datasource/pull/1710/files#r236765704.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Worth pointing out that this reverts #1252 so /cc @matkoniecz.
It doesn't fully revert it - we are now dropping surface for |
I see that it is too late for a comment. Is it OK to open a new issue if it will break my map? |
Yes, please do! Apologies if the change breaks your map - this is part of an effort to reduce tile size, but we don't want to break anything. We've been trying to find places where we've got unused amounts of detail in the feature properties. Please let us know what properties you are using and we'll try to accommodate them. |
Currently, I am using But maybe for low zoom levels it is safe anyway to assume that displayed roads are well paved ones or to switch from cycling oriented display of surface to overview map. |
@matkoniecz can you remind us of the public URL or app that shows off your cycling map? If the YAML is available that'd be a bonus, can be shared privately :) |
https://github.com/matkoniecz/Zazolc (personal fork of StreetComplete). Style is at https://github.com/matkoniecz/Zazolc/blob/fork/app/src/main/assets/map_theme/fork-style.yaml |
I notice that you use 3 categories of surface. Would it be OK if we remapped to those values (or perhaps |
That would be great! On my TODO list is implementing exactly this within a map style itself.
Yes, though note that this mapping may be different for other purposes ( |
To make it easier to follow along just in this issue:
@zerebubuth are you proposing to remap just at low zooms but the full surface value would still be present at high zooms (my preference, and we've talked about doing the same for landuse before)? What zoom would the cutoff be? Right now the dropping property cutoff is zoom 15 (link).
The full and raw values would still be available past that zoom, so I think these 3 category mappings ( I don't like inventing default surface data on roads that are missing the data. It's better for a style to just have a "no data" symbolization when the data isn't there. Should we drop |
(and it's almost time to create a new issue for this!) |
I don't either. But there are quite a few minor roads even in Brooklyn which get marked as In Brooklyn, I think it's sensible to say that The savings at zoom 13 aren't huge, but it helps keep a lid on tag proliferation, as the number of distinct property sets that we have is approximately the number of distinct tag values multiplied together. It gets big pretty quickly, and even a factor of 2 can make a difference. I'd be open to applying this to different road types separately, or coming in at different zooms. The real problem is when we have a very dense road network on a single tile, and the worst offender for that is |
Interesting. A case of "go big, or go home, there is no middle way", lol. I think we should do the mapping into those 3 (plus null) general values at all low zooms for all roads layer features. But let's try only backfilling the values for |
Continued the discussion into #1716. |
NOTE: This follows on from #1707 and #1708, so those should have been merged before this.
On minor roads (only - this doesn't apply to major roads or highways), drop the following from zoom 15 down:
colour
motor_vehicle
operator
route
route_name
state
symbol
type
And the following from zoom 14 down:
surface
And the following from zoom 13 down:
cutting
embankment
This helps a lot with road merging, as the fewer distinct combinations of road properties there are, the more roads can be merged into one another.
Also, drop most values of the
access
property from zoom 13 down, keepingaccess=no
,access=private
andaccess=official
(on all road types). Theno
andprivate
values are important for knowing which streets are inaccessible, but many other distinctions are unimportant at this zoom level, where streets might be a few pixels long, e.g:access=customers
(if styled at all) can be made prominent as the view is zoomed in a bit more.Further, we merge some
access
values together;emergency
,military
,restricted
andforestry
all map toaccess=official
, which indicates that there is some kind of restriction, but allows for geometry merging and value compression through re-use.Finally, drop
landuse_kind
on roads on zoom < 13 where it's one ofresidential
orindustrial
. These are very common landuse kinds, but aren't strongly styled. At zoom 13 they're getting to be a fraction of the size of a tile and in my opinion of limited usefulness.These measures together produced a 14% reduction in the number of
minor_road
features on12/1206/1540
, reflected in a similar drop in the size of the metadata and properties for the MVT tile. Overall, theroads
layer was 4% smaller (about 3kB for this tile).Connects to #1331.