-
Notifications
You must be signed in to change notification settings - Fork 119
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 'shield_text' property on roads #966
Conversation
…nt. Use the 'ref' from that relation to form the 'shield_text' output property.
…determines which shield to use.
…rties in relation to it.
-- | ||
-- it does this by joining onto the relations slim table, so it | ||
-- won't work if you dropped the slim tables, or didn't use slim | ||
-- mode in osm2pgsql. | ||
-- | ||
CREATE OR REPLACE FUNCTION mz_get_rel_network( | ||
CREATE OR REPLACE FUNCTION mz_get_rel_networks( | ||
way_id bigint) | ||
RETURNS text AS $$ |
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.
Is it easy to have this return back an array, hstore, or json with the values instead of a delimited string? This is just meant for the python transform to consume and process right?
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, yes! Good point! I had forgotten that was JSON and thought it had to be stringly to fit in an hstore. Fixed in 861ac6d.
Put in some minor comments, but the implementation lgtm. 👍 |
Nice! If we're iterating thru all the networks and their shield_text, can we please also export that entire list of shields (even if it's on two new properties instead of the current singular properties)? |
Yup, sure! In 62375da added support for exporting |
For lists in MVT values, do we drop those completely for that format now? Could we add new logic in the mapbox-vector-tile library to concatenate lists into a single string with |
Yes, we drop them at the moment. We could add that logic, but it might be better to encode them as JSON lists rather than I've added tilezen/mapbox-vector-tile#64 to track this. But since multiple road shields aren't supported in any of the renderers using our tiles, and aren't part of the v1.0 milestone, that suggests it's okay to leave until v2 or later. |
This adds a
shield_text
property to go with thenetwork
on roads. There are a few changes from previous behaviour:network
property disappears from some existing roads where it duplicates thebicycle_network
property.The "most important" calculation is currently very simple, and does not have special cases in for various special roads. For example it is recommended that Historic Route 66 is mapped without a
ref
tag, which will mean it doesn't appear. In general,name
is ignored andref
is assumed to be numeric.This seemed good enough for an iteration, and we can improve it if/when good examples are available. @nvkelso does that sound good?
Connects to #192.
@rmarianski could you review, please?