-
Notifications
You must be signed in to change notification settings - Fork 829
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
Rendering specific access tags #4952
Conversation
mode specific access tags relevant to primary mode of highway interpreted to determine access marking for: Road types (motorcar > motor_vehicle > vehicle) Footway (foot) Cycleway (bicycle) Bridleway (horse)
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 is first look at the implementation, i have not actually tested it yet and this definitely requires thorough testing.
Overall, i think this is a coding wise a good design for the initial take on the subject. But this is my personal opinion based on me being fine with the concept of using SQL functions to modularize SQL functionality in the style. Others might see this differently.
If we use this approach what we should be aware of is that if we ever change the parameter lists or the names of the functions we will need to make sure our installation procedure drops the old functions - because that is not taken care of by the CREATE OR REPLACE
. This should probably be mentioned in our developer documentation.
Will separately comment further on the handling of highway=track
in #214.
functions.sql
Outdated
CASE | ||
WHEN accesstag IN ('yes', 'designated', 'permissive', 'customers') THEN 'yes' | ||
WHEN accesstag IN ('destination', 'delivery', 'permit') THEN | ||
CASE WHEN primary_mode IN ('motorcar', 'pedestrian') THEN 'restricted' ELSE 'no' END |
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.
You here distinguish between a two class and a three class access restriction model based on the primary mode - while we make this distinction based on road class. While this might not be significant in the exact design model you propose, it would be in many styling variation (like for example if you render highway=track
with primary mode motorcar
).
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.
You here distinguish between a two class and a three class access restriction model based on the primary mode - while we make this distinction based on road class. While this might not be significant in the exact design model you propose, it would be in many styling variation (like for example if you render
highway=track
with primary modemotorcar
).
Yes and no. I renamed the functions to carto_highway_primary_mode
etc. and returned a "primary mode" for clarity, whereas it's really an "access type", so you could classify into motorcar_track
if you wanted to have a 2 class access style for track. I could change it back to say access_mode
. I was keen not to "reparse" all the way from highway to avoid repetition and improve efficiency.
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.
Primary mode of use and road class are well defined concepts - you will need to explain what you exactly mean by "access type".
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.
Fundamentally the "access category" is a data abstraction that keeps the code simple and flexible. A given way is classified into an access category, which mostly depends on the highway type, but for highway=path
also depends on access tags. All the decisions can then be made on the "access category", e.g. this determines which mode-specific access tags are to be used, but it is also used to distinguish between 2-state and 3-states access renders. So it is a single value that encapsulate both the "primary mode" and how the different access values will be translated into yes|restricted|no
. So in retrospect it was confusing to conflate the "access category" with "primary mode". Hopefully most of this is documented in the comments.
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.
Fundamentally the "access category" is a data abstraction that keeps the code simple and flexible.
I think it is not a good idea to invent such concepts as parameters of implementing styling logic, especially if their meaning changes when changing the design logic.
The primary concern when implementing this should be that other style developers can easily understand and modify the tag interpretation logic. The secondary concern should be code performance since we are going to use it on the fly during rendering. Code complexity itself is lower priority.
As i said - we actually want to make this distinction based on road class, because it depends on the road class and its line signature if we can only show a two class access classification or if we can show three classes.
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.
We can call it road_class rather than access type/category. That's all it is really. highway=cycleway
and highway=path, bicycle=designated
belong to the same "road class" because the access marking works in the same way.
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.
Then i'd suggest to simply re-cast highway=path
into highway=cycleway/bridleway/footway
in SQL and work with that as parameter. You essentially already have the function for that (carto_path_primary_mode()
). We currently do this re-casting in MSS code - but since you need it for the access restriction processing you can do it in SQL and then simplify the MSS code as a bonus.
You'd need an additional query nesting level for that or move the carto_highway_int_access()
call to the outer query.
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.
Then i'd suggest to simply re-cast
highway=path
intohighway=cycleway/bridleway/footway
in SQL
Yes, I was thinking along these lines - an effective int_highway
. I am keen to collapse the different road types in one place, and will have to check that this works across the wider framework.
functions.sql
Outdated
WHEN motor_vehicle IN ('yes', 'designated', 'permissive', 'no', 'private', 'destination', 'customers', 'delivery', 'permit') THEN motor_vehicle | ||
WHEN vehicle IN ('yes', 'designated', 'permissive', 'no', 'private', 'destination', 'customers', 'delivery', 'permit') THEN vehicle | ||
ELSE "access" END) | ||
WHEN 'pedestrian' THEN carto_int_access('pedestrian', 'no') |
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 is odd - if you have a distinct primary mode pedestrian
(and it is unclear what this means relative to foot
): why does this universally mean access=no
. Note that while we currently do not render highway=pedestrian
with access dashing, access restricted pedestrian roads of course do exist - like in private parks or in military facilities.
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.
Again, perhaps renaming "access type" as "primary mode" has hindered rather than helped. The idea of a "pedestrian" access mode was an implicit motorcar/motor_vehicle=no
. Putting this no
into int_access
simplifies later queries about whether to add colour for bus=yes
etc.; only ways with int_access=restricted|no
are considered.
The alternative is to set int_access=NULL
and to treat highway=pedestrian
as a special case [IF int_access=restricted|no OR highway=pedestrian THEN <consider bus=yes marking>
]
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 seems flawed, as if you have, for example, access=foo motor_vehicle=bar hgv=baz then the access restriction for hgv is the value of the hgv tag, regardless of if we understand that value or not.
All we need to do is coalesce the default value and access tag hierarchy in the appropriate order and compare that with the values we're considering.
That depends on our strategy of dealing with unknown tags in general. If we'd show The simplest alternative to introducing a catch-all would be to simply ignore unknown values (because we don't know what they mean - hence any interpretation we'd make would be wrong). That is what this PR currently does. I am not saying this is the only viable approach. But it is not clearly wrong either. In case of an unknown tag the reason might be a typo and the typo might be in the key or in the value. If it is in the key the approach of treating unknown tags as fully invalid and void would be the better. The other alternative would be to introduce an additional visualization class meaning |
We have to interpret unknown values regardless. If we have access=baz and it's unknown we still have to render the road one of the three ways.
I don't think a 4th class is possible without becoming confusing. |
I don't follow this specific point, since we don't consider the "access restriction for hgv". But, I guess the general point is about Personally I feel that the outcome of the COALESCE approach will be more obvious to mappers (if motorcar is set, it's value will determine access marking, if not, motor_vehicle etc.)
Good point. Currently there is an asymmetry between the mode-specific tags which are "vetted", and the overall access tag, which is not, primarily because we have to do something with unknown values. |
Currently, if a road is tagged So far the style universally ignores unknown tags (i.e. it treats them as if they were not there) - with the exception of the few catch-alls we have in the style (which we try to reduce - see #4568 and #4725). So far all the catch-alls we deliberately have in the style are cases where an unknown value naturally is to be engrossed in a common design with other known values. Like unknown This is different here,
I would agree if that 4th class was indeed another class of access restriction. But it would not be, it would be an error indicator. It would not transport information about the geographic reality, it would indicate that there is an error in the data that prevents us from reliably providing such information even though the other data clearly indicates that such information should be shown. I had been sceptical about #4723 in general (and i still am) - but this specific constellation where there is no good solution other than explicitly showing cases where there is an error in the data is one where i would be in favor of an explicit error indicator. |
If you don't like the word class, call them a distinct symbology. I don't think we can have four given the number of other things we render on roads.
A catch-all is when we're rendering all features regardless of what they are. That's what we've tried to reduce. Deciding what to do with unknown access values is, on the other hand, something we must do if we render any. If for each road we render it with three different symbologies to represent different access restrictions, we must then have some way to decide which of the three to use given the access related tags. This includes when the access tags make no sense to us - unless we completely stop rendering the road, we still have to decide which of the three. |
#4568 and #4725 are cases of catch-alls in secondary tags where any and all values with a certain key other than a few explicitly handled otherwise have a distinct effect on rendering compared to no such tag being present. Our goal to support mappers in consistent mapping practice IMO mandates us to reduce these because it is not only ill-defined primary (feature) tags being rendered without there being a consistent mapping practice in use that works against this goal, the same applies for secondary tags.
As already said - our standing practice universally implemented in this style except for the few catch-alls we have is to ignore them. If we are considering changing that we should look at it from the perspective of our goals, specifically here (a) the goal to support mappers in consistent mapping practice and (b) the goal for our design being intuitively understandable for mappers. Looking at the suggestions we have so far:
Personally i am confident that an intuitively readable design could be found for the third option (under the paradigm of being an explicit error indicator and not simply a fourth class in addition to the three we have). But developing such is delicate design work and this PR was started under the premise of changing tag interpretation only and not the actual style design. So i am hesitant to suggest to @dch0ph to work on this. Everyone should also keep in mind that, compared to other tags, completely undefined values with no consensus meaning are really rare in access tagging: https://taginfo.openstreetmap.org/keys/motor_vehicle#values For both of these the explicit |
I would suggest the following for this PR: Switch to the COALESECE approach so that unknown (=invalid + non-interpreted) tags are not ignored, but reach the "interpretation" level (the Return It is then devolved to the MSS whether to show a render for unknown/UNKNOWN access. [In the current PR/MSS, unknown values would be ignored as only
My personal preference would be to strip out "access"= |
I would strongly suggest first to develop consensus on the desired tag interpretation and then think about implementation details. Choosing a certain tag interpretation because it is more convenient to implement would be a bad idea. In principle a mixture between approach 1 and 2 would be possible in the form that the explicit |
That would work for me. Rather than This would be functionally equivalent to a simple COALESCE, but ignoring There is the issue of what to do with |
This is not what I suggested. I made no suggestion as to what a way with unknown access for the primary method is. There is some justification for treating unknown differently, as it's an explicit unknown as opposed to a value we don't understand. access=no motor_vehicle=unknown truly indicates an unknown value, as opposed to access=no motor_vehicle=foo indicates a value we don't understand. Falling back to the access=no is wrong in the second case because the access tag doesn't tell us anything about what the mapper specified for motor_vehicle access.
You're proposing not unknown values, but invalid ones. Do we do this elsewhere? In the past we have rejected becoming a QA layer as it is clearly incompatible with 3/4 purposes. What we do with the tracktype is different - we have a symbology we show for unknown values where no tracktype is supplied, but we're not aiming for a different symbology for values that we believe are errors.
There still is. If someone tags highway=residential access= they get the feedback that their tag worked, because it still displays as having access. |
Ok, i removed the attribution to you for the approach 2 in my list. But since my aim here is to develop consensus on a concrete approach to access rendering this does not really bring us forward. It would be helpful if you'd indicate which concrete approach you'd favor and which approaches you would find acceptable. So far we have discussed approaches 1-3 from #4952 (comment) and the mixture between 1 and 2 with explicit
This is exactly why i brought up the mixture approach as a fourth option.
No, as said, this would be a first in this style - but so is the combined interpretation of several tags in this form that leads to this problem in the first place. The tracktype case is different because we have no implicit default there (while we have an implicit default of
No, because adding (for example) |
@pnorman - reacting with a 👎 to my comment but not explaining what you disagree with is decidedly non-helpful. If there is anything unclear about the list of options i sketched please ask. If i misunderstood your comments and you think you have made a concrete suggestion different from the ones i listed please explain. If you disagree with my approach to developing consensus on this matter overall please take the initiative and explain what concrete solutions you deem viable. |
Following discussion moving: access=customers -> "restricted" marking access=permit -> "no" marking
Functions renamed for clarity Changed logic for mode-specific tags, only ignoring 'unknown' values unknown access type return for unknown/uninterpretable path promoted to cycleway/bridleway in SQL rather than MSS
To simplify further discussion (but not to prejudge consensus on tag interpretation), I've committed a bunch of changes that emerged from comments to date.
I have checked that update code works as expected for the previous test cases, but have not exhaustively considered the various edge cases discussed. Ideally this would involve a "test sheet" or a shareable demo server. I noticed that the roads query seems to include some cruft on the railway branch, e.g. evaluation of an |
From a quick look this seems like a structure that can be adjusted to any of the options in tag interpretation discussed so far so works well in terms of our goal of adaptability. Same applies to adjusting the tag re-casting of You have not yet made any changed to the pedestrian logic - you still universally have pedestrian roads as |
Thank for you the encouraging comments. I'll admit that limited thought went into the I'm not convinced that a primary foot mode works here. They are basically vehicle roads with signage to restrict vehicles in much the same way as ordinary roads. I don't see how you would interpret/use the I would counter with something like:
i.e. use the vehicle tags as for roads, e.g. It might be interesting (separately) to develop a marking for If the outcome were |
No, that is a wrong understanding of
|
I think this is going too far outside the topic of this PR and #214. As indicated at the moment we are not rendering access restrictions on As far as a hypothetical rendering of exceptions from implicit access restrictions (like on But again - this is a discussion we should not have here. If and when the topic practically comes up the proper way to decide this would be to test how this would look like in practical rendering on a larger scale. |
OK. In the interests of keeping things moving I've adjusted the access interpretation of
i.e. using |
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.
The pedestrian road part looks good to me now.
Overall this seems essentially untested so far: functions.sql does not run:
psql:functions.sql:25: ERROR: syntax error at or near "END"
LINE 22: END
^
psql:functions.sql:41: ERROR: syntax error at or near "END"
LINE 14: END
^
psql:functions.sql:59: ERROR: syntax error at or near "END"
LINE 16: END
^
psql:functions.sql:83: ERROR: syntax error at or near "END"
LINE 22: END
^
Anyone who wants to see this move forward can help by testing and reporting any issues. Useful would in particular an analysis if the introduction of the functions leads to substantial performance decrease. This can be looked at through pg_stat_statements.
@pnorman I've resolved the queries raised in your last review where the query is clearly closed / resolved / superceded. There look to be two minor unresolved points (minor in the sense that they do not affect the outcomes and are more about the interpretative framework):
|
I suggested resolving it by moving the SQL logic to import time.
I never said that. |
We should avoid the overload as it causes confusion.
I'm okay with it too. The major issue remaining is where the processing should be done, and the maintainers will need to come to a consensus on that. |
I have said multiple times already - this is a suggestion that requires looking at a much larger context. We should discuss it separately from this PR. If you want to shelve addressing #214 until we have had that discussion and reached consensus that is fine - but then please open an issue for that and present arguments why you think this would be beneficial for this project. |
Return "unrecognised" rather than "unknown" if access restriction is not one of recognised values
Addressed. |
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.
For clarity my updated review of this:
- I support differentiating between the explicitly tagged
unknown
and the effective classification asunrecognized
. - I maintain my previous assessment from Rendering specific access tags #4952 (comment) that slightly shortening the
highway=path
logic by depending on the assumption thatcarto_path_type()
returnscycleway
only ifbicycle
is set andbridleway
only ifhorse
is set is not a good idea. If no agreement can be found on the matter i am not going to insist on this but i would then insist on adding a warning comment explaining this dependency and i would also suggest to keep the more general variant commented out so style developers who want to adjust the logic can easily move to that.
Note on short-circuiting logic in carto_highway_int_access
I have added this. I prefer the simpler code, where "decisions" around, say, |
I cannot agree that a discussion of putting logic in functions is out of scope on a PR that is the first to introduce logic in functions. |
This is not really relevant here at the moment since we are not discussing a change in the logic of how to interpret Because i am usually taking the opposite approach. I think about what is map design wise the desirable logic of displaying things and then i think about the most elegant way to implement that is the framework we have. Adjusting map design to the technical constraints is of course necessary at times - but this is typically only of concern with geometric aspects and spatial relationships, not with tag interpretation.
As before you seem to disagree with something i have not said. Anyway - it is fair enough that if i ask you to make your case of doing style specific tag interpretation in preprocessing in a separate issue i should likewise discuss the idea of introducing SQL functions in a separate issue - which i have done in #5004. |
No. I'm just arguing to keep the code in functions as clear as possible. If somebody does want to change the logic, they first need to understand what the code is doing. The natural reaction to looking at In the end, the "more general formulation" (which I initially used from a simple cut and paste) is not adding anything useful. It only has an effect if somebody has created a perverse |
Thanks. I think i understand the consideration behind that approach better now. It is also my experience that people have very different approaches to understanding logic and its implementation in code. It is best not to infer from one's own approach to understanding on how others will see this. Anyway, with the warning comment added i think this is ok.
It is not a perverse way of casting |
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.
Doing final review i noticed that this currently breaks bridge/tunnel rendering on highway=path
- you either need to modify carto_path_type()
to not return path
or re-add highway_path
selectors in MSS code at some places.
CASE | ||
WHEN bicycle IN ('designated') THEN 'cycleway' | ||
WHEN horse IN ('designated') THEN 'bridleway' | ||
ELSE 'path' |
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 needs to be footway
rather than path
if you want to eliminate highway_path
from MSS altogether.
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.
The conservative option is to keep the option of rendering highway=path
differently from highway=footway
(there already seems to be some difference in that footway
can have an area render, but not path
).
Bridge not being rendered on highway=path
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.
Ok, this seems to work fine now also with tunnels and bridges. I am fine with leaving highway_path
as a distinct feature class for those features that are not re-cast to cycleway/bridleway. As you point out this is still a difference w.r.t. polygon rendering.
Regarding foot/bicycle/horse being distinct columns while the other mode specific access tags being in hstore - that will need to be considered in the next database reload. But of course backwards compatibility of the database structure is a factor to considered here. Historically, we have rarely dropped columns. When you want to run an older version of OSM-Carto on the current database structure that requires relatively few changes. That consideration should not prevent us from consolidating the database layout, but we should be mindful of these things and make considerate decisions with an overall strategic perspective.
The other big thing we have discussed in the exact tag interpretation logic. I am fine with keeping this as it is if this is the smallest common denominator we can agree on.
To summarize: Currently this PR classifies accessvalues (i.e. values of tags indicating access - either generic, access=accessvalue
or transport mode specific, like motorcar=accessvalue
) into a total of six classes:
- recognized
yes
values ('yes', 'designated', 'permissive') - recognized
no
values ('no', 'permit', 'private', 'agricultural', 'forestry', 'agricultural;forestry') - recognized
restricted
values ('destination', 'delivery', 'customers') - explicit
unknown
- these are ignored (treated as if not tagged) - NULL (i.e. not tagged) - these are ignored
- any other values (
unrecognized
)
After this initial classification the different access tags are then conflated into one total classification based on the principle:
For the primary mode of transport we selected for the road class in question the more specific tags (like motorcar=*
) override the more general ones (like vehicle=*
and ultimately access=*
), unless it is in an ignored class (4 or 5) according to the list above.
The resulting total classification is then cast into the visual classes we have:
yes
is shown with the plain road signatureno
is shown with the gray centerline dashing (for the wide roads) or with a gray/desaturated color (for the narrow roads)restricted
is shown with the gray centerline dotting (for the wide roads) or conflated withyes
(for the narrow roads)unknown
/NULL is conflated withyes
unrecognized
is conflated withyes
I don't think this is a good way to deal with the unrecognized
values based on the goals of our project and i have also presented a concrete alternative (approach 3+ as described above). I don't want to push for it here - after all it affects only the very small percentage of access tags that use a value other than those we explicitly interpret. But i still want to - for the record - point out that an alternative has been suggested and is viable (both technically and design wise).
The PR, overall, seems to work fine now in all constellations i have tested and unless something new comes up suggesting otherwise (further testing by others would be appreciated) i intend to merge this as per what was said in #5004 (comment).
partly resolved, partly superseded by discussion on #5004
Merged now, thanks @dch0ph for the patience in working on this. |
commit d4d79f6b2463fa10db12104b32ced01d47b04319 Merge: ce36bab3 4a9b5a6 Author: dch0ph <[email protected]> Date: Sun Jan 19 13:06:39 2025 +0000 Merge remote-tracking branch 'upstream/master' commit 4a9b5a6 Author: Nick Doiron <[email protected]> Date: Thu Jan 16 14:45:57 2025 -0600 Replace current font download with Python script (gravitystorm#5052) * recommend python script * Python script to replace current downloads * clarify messages / comments * remove constants not useful for current repo * include Docker startup update commit 248b72d Author: dch0ph <[email protected]> Date: Thu Jan 16 20:41:58 2025 +0000 Additional access marking (gravitystorm#5049) * Restricted marking for motorway/trunk/primary * Add access marking for highway=pedestrian * Update functions.sql highway=pedestrian should support restricted access * Change pedestrian access marking colour Change pedestrian access marking colour to common light shade of grey. Also consolidate names. commit adff4bd Author: dch0ph <[email protected]> Date: Thu Jan 16 20:41:22 2025 +0000 Move leisure=track and attraction=water_slide (gravitystorm#5046) leisure=track and attraction=water_slide moved to layers at more appropriate positions in stack Minor optimisation of post-road layers Tweak of SQL ford query commit ce36bab3ad31b946072319dc65e1585819c7c306 Merge: 2a206fa5 5791e79 Author: dch0ph <[email protected]> Date: Wed Nov 27 17:28:16 2024 +0000 Merge remote-tracking branch 'upstream/master' commit 5791e79 Author: Marcos Dione <[email protected]> Date: Wed Nov 27 17:28:19 2024 +0100 5033 roads bridges tunnels queries (gravitystorm#5035) * Do not calculate surface for railways. * Name the value for access in railway branch. * Do not calculate service for railways. * link is always null for railways. * preserved is always null for roads. * All other CASE statements are not parenthesized. * Alignment. * Documentation. * Documentation. * Copy roads_sql subqueries to tunnels. * Copy roads_sql subqueries to bridges. * Spurious spaces. * Duped SELECT. * changing column name from access to int_access --------- Co-authored-by: imagico <[email protected]> commit 6164c07 Merge: 81d39e0 c9ee914 Author: Christoph Hormann <[email protected]> Date: Mon Nov 11 21:07:02 2024 +0200 Merge pull request gravitystorm#5042 from gy-mate/fix-reference Fix `generate_road_colours.py` reference in `INSTALL.md` commit c9ee914 Author: Máté Gyöngyösi <[email protected]> Date: Fri Nov 8 18:17:05 2024 +0100 Fix `generate_road_colours.py` reference in `INSTALL.md` commit 81d39e0 Author: Máté Gyöngyösi <[email protected]> Date: Thu Nov 7 14:32:25 2024 +0100 Improve install instructions: package name, commands, links & formatting (gravitystorm#5040) * Add command for installing Python libs per PEP 668; correct `yaml` package name * Update INSTALL.md * Update INSTALL.md commit 2a206fa5138105eda919eb3b2cfa571f76b0e1cf Merge: 9c254260 d2a8ebf Author: dch0ph <[email protected]> Date: Fri Nov 1 18:26:33 2024 +0000 Merge remote-tracking branch 'upstream/master' commit d2a8ebf Merge: d9ea31c 52126f9 Author: Paul Norman <[email protected]> Date: Sat Oct 26 11:30:43 2024 -0700 Merge pull request gravitystorm#5030 from pnorman/maintainer Step down as maintainer commit 52126f9 Author: Paul Norman <[email protected]> Date: Sat Oct 26 11:24:06 2024 -0700 Step down as maintainer commit d9ea31c Merge: 491bd4a e47a438 Author: Christoph Hormann <[email protected]> Date: Sat Oct 26 15:50:48 2024 +0300 Merge pull request gravitystorm#4978 from joto/switch-to-flex Flex version of the osm2pgsql configuration commit e47a438 Author: Jochen Topf <[email protected]> Date: Sun Jul 7 18:24:43 2024 +0200 Remove outdated Lua test scripts They don't work any more with the new flex Lua output. And they are have not been maintained anyway. commit adc5f50 Author: Jochen Topf <[email protected]> Date: Sun Jun 16 10:28:54 2024 +0200 Switch to flex output This commit does the actual switch to the new flex config. It removes the old config files and updates the documentation and various scripts. commit d22111f Author: Jochen Topf <[email protected]> Date: Thu Feb 15 20:47:48 2024 +0100 Flex version of the osm2pgsql configuration This commit contains one file with an osm2pgsql configuration for the flex output that can be used instead of the old configuration for the pgsql output. It replaces the openstreetmap-carto.style and openstreetmap-carto.lua files. The configuration is nearly 100% compatible to the old one. The database layout will be exactly the same with just very little changes. The id columns (`osm_id`) and geometry columns (`way`) on all tables will get the NOT NULL flag when using the flex output. These have always been NOT NULL in practice anyway. The content of the database will be the same with only minor irrelevant differences. Run like this: osm2pgsql -O flex --style openstreetmap-carto-flex.lua -d gis ~/path/to/data.osm.pbf commit 491bd4a Author: imagico <[email protected]> Date: Thu Oct 17 12:30:15 2024 +0300 Updating changelog for v5.9.0 commit 49e5c27 Author: Jacob Wysko <[email protected]> Date: Wed Oct 16 09:08:03 2024 -0400 Render `leisure=dance` (gravitystorm#4996) * Render leisure=dance * Improve dance icon commit fbb0fb0 Author: dch0ph <[email protected]> Date: Wed Oct 16 14:04:56 2024 +0100 Rendering specific access tags (gravitystorm#4952) * Interpret additional access tags mode specific access tags relevant to primary mode of highway interpreted to determine access marking for: Road types (motorcar > motor_vehicle > vehicle) Footway (foot) Cycleway (bicycle) Bridleway (horse) * Function load in CI * Add carto_path_primary_path * Moving customers, permit Following discussion moving: access=customers -> "restricted" marking access=permit -> "no" marking * Major changes in response to comments Functions renamed for clarity Changed logic for mode-specific tags, only ignoring 'unknown' values unknown access type return for unknown/uninterpretable path promoted to cycleway/bridleway in SQL rather than MSS * Use foot primary mode for highway=pedestrian * Typo fix * Remove incorrect END statements * Fix regression on introducing explicit unknown * Fix regression for highway=path * Alter 'destination' outcome for 2-state access 'destination' on path / footway etc. interpreted as 'yes' (matching current behaviour) * Simplify functions.sql Reduce number of functions Tidy comments * Tidy access functions Consistent formatting of CASE/WHEN Use more idiomatic COALESCE(NULLIF(...),) * Update functions.sql Change argument name accesstag -> accessvalue Improve documentation Simplify logic for promoted paths * Remove obsolete comment from MML * Avoid unknown overload Return "unrecognised" rather than "unknown" if access restriction is not one of recognised values * Extend code comments Note on short-circuiting logic in carto_highway_int_access * Fix broken bridge on path Bridge not being rendered on highway=path commit 23b1cfa Merge: 84c844d 369c81a Author: Paul Norman <[email protected]> Date: Sun Jul 7 02:37:01 2024 -0700 Merge pull request gravitystorm#4988 from BubbaJuice/jewellery Removing shop=jewellery commit 369c81a Author: e <[email protected]> Date: Tue Jul 2 14:44:29 2024 -0700 Revert reformatting of lines commit 2c44a11 Author: e <[email protected]> Date: Tue Jul 2 11:22:15 2024 -0700 Removing shop=jewellery commit 84c844d Merge: 91f11ec 0b9784f Author: Paul Norman <[email protected]> Date: Thu Jun 13 08:24:38 2024 -0700 Merge pull request gravitystorm#4965 from hiddewie/preserved-railway Render `railway:preserved=yes` as preserved railway commit 0b9784f Author: Hidde Wieringa <[email protected]> Date: Tue May 21 21:01:27 2024 +0200 Fix specific preserved check in railway name layer commit 5908225 Author: Hidde Wieringa <[email protected]> Date: Sat May 11 11:21:32 2024 +0200 revert whitespace commit 8b0385c Author: Hidde Wieringa <[email protected]> Date: Sat May 11 11:19:40 2024 +0200 low zooms: do not render preserved railways commit 9d615b7 Author: Hidde Wieringa <[email protected]> Date: Sat May 11 11:09:27 2024 +0200 low zooms: do not query preserved railways commit f2fbd89 Author: Hidde Wieringa <[email protected]> Date: Fri May 10 21:21:05 2024 +0200 simplify changeset commit 41e0508 Author: Hidde Wieringa <[email protected]> Date: Fri May 10 21:12:46 2024 +0200 ensure color syntax is aligned commit 5bc5e38 Author: Hidde Wieringa <[email protected]> Date: Fri May 10 20:53:55 2024 +0200 Simplify railway preserved check commit d75fa6f Author: Hidde Wieringa <[email protected]> Date: Fri May 10 20:50:57 2024 +0200 revert some trailing whitespace commit 0581639 Author: Hidde Wieringa <[email protected]> Date: Fri May 10 09:41:00 2024 +0200 No longer railway preserved as railway=rail commit aaf5fe2 Author: Hidde Wieringa <[email protected]> Date: Thu May 9 22:11:09 2024 +0200 ignore rail=preserved in ordering function commit 758c240 Author: Hidde Wieringa <[email protected]> Date: Thu May 9 22:07:01 2024 +0200 Tweak color prominence and ensure tunnels do not render preservedness commit 2935f72 Author: Hidde Wieringa <[email protected]> Date: Thu May 9 17:25:10 2024 +0200 Render preserved railways and tram style only from z15 commit 3170c0d Author: Hidde Wieringa <[email protected]> Date: Wed May 8 22:26:30 2024 +0200 align colors a bit better with existing line colors commit 7d86ded Author: Hidde Wieringa <[email protected]> Date: Wed May 8 22:18:48 2024 +0200 Fixup railway line widths commit 992a6fc Author: Hidde Wieringa <[email protected]> Date: Wed May 8 22:03:31 2024 +0200 improve rendering for edge cases commit 0b723b2 Author: Hidde Wieringa <[email protected]> Date: Wed May 8 21:41:13 2024 +0200 Ensure all types of railways have styles aligned commit 6062c94 Author: Hidde Wieringa <[email protected]> Date: Wed May 8 21:18:32 2024 +0200 include more railway tags to allow `railway:preserved=yes` commit 5b2c452 Author: Hidde Wieringa <[email protected]> Date: Mon May 6 22:02:36 2024 +0200 Render preserved with new rules commit 5ae7128 Author: Hidde Wieringa <[email protected]> Date: Mon May 6 20:58:54 2024 +0200 Render railway=preserved as railway=rail commit 1cf246b Author: Hidde Wieringa <[email protected]> Date: Sun May 5 12:55:53 2024 +0200 Take only railway=rail commit 38bd0dc Author: Hidde Wieringa <[email protected]> Date: Sun May 5 12:33:26 2024 +0200 Ensure railways with railway:preserved=yes render as preserved railways commit 91f11ec Author: Maik Busch <[email protected]> Date: Tue Apr 16 23:08:27 2024 +0200 Use common Quotes for Columns (gravitystorm#4940) commit 9c254260f037f448c089d07a1557956f8688f8f1 Merge: 4a777724 3672c45 Author: dch0ph <[email protected]> Date: Fri Apr 12 20:36:13 2024 +0100 Merge remote-tracking branch 'upstream/master' commit 3672c45 Author: Maik Busch <[email protected]> Date: Tue Apr 2 20:16:23 2024 +0200 Use common Single Quotes for Strings (gravitystorm#4939) * Use common Single Quote for Strings * Update CONTRIBUTING.md commit 9fc6ed4 Author: dch0ph <[email protected]> Date: Sun Jan 21 10:46:54 2024 +0000 Render barrier=jersey_barrier (gravitystorm#4923) Render barrier=jersey_barrier on ways as default barrier, i.e. same as wall, fence. commit 4a777724b2b386a4af23bbed4ef393e9ef9c0edc Merge: e06ea3c1 50e7457 Author: dch0ph <[email protected]> Date: Wed Jan 10 21:14:29 2024 +0000 Merge remote-tracking branch 'upstream/master' commit 50e7457 Author: dch0ph <[email protected]> Date: Mon Jan 8 16:39:51 2024 +0000 Restore reef name rendering (gravitystorm#4918) commit 258d354 Author: sommerbe <[email protected]> Date: Sun Dec 24 16:49:09 2023 +0100 Adding shop symbol: hearing_aids (gravitystorm#4909) * Adding shop symbol: hearing_aids Icon source: own work. Rasterisation: tested with density=96,150,300,600 using ImageMagick convert * improves rendering of hearing_aids icon Using: kosmtik, mapnik Visual change: a) thicker and longer icon to better resemble the human ear; b) improves pixel grid alignment and simplicity * Improving hearing_aid symbol due to preliminary discussion This version is based on number 28, with minor improvements and svg optimisations (number 43). This symbol depicts the human ear with an over-the-ear hearing aid being visually slightly separated from the ear, as well as with sound waves propagating from behind towards the hearing aid receiver. Attention was given to a) uniqueness, b) visual simplicity, c) rendering quality using kosmtik as well as png export with multiple scaling factors (1x and 2x). commit e06ea3c1a7be169d6a99673c57ad1dbaa7169a14 Merge: 2646c3d c39de66 Author: dch0ph <[email protected]> Date: Sun Dec 24 13:00:08 2023 +0000 Merge branch 'master' of https://github.com/dch0ph/openstreetmap-carto commit c39de66 Merge: a3ecd3f 47a96cb Author: dch0ph <[email protected]> Date: Sun Dec 24 11:54:33 2023 +0000 Merge branch 'gravitystorm:master' into master commit 2646c3d Merge: bfc49d0 9d3db81 Author: dch0ph <[email protected]> Date: Sun Nov 26 16:10:27 2023 +0000 Merge remote-tracking branch 'upstream/master' commit 47a96cb Author: imagico <[email protected]> Date: Sun Nov 26 17:52:14 2023 +0200 Updating changelog and preview for v5.8.0 commit 9d3db81 Author: Christoph Hormann <[email protected]> Date: Fri Nov 24 19:17:42 2023 +0200 fix merge errors in gravitystorm#3750 and restore functionality as intended by the PR (gravitystorm#4841) commit 2f23896 Author: Thomas Pétillon <[email protected]> Date: Fri Nov 17 13:50:59 2023 +0100 Mini-roundabouts: fixes and trunk road support (gravitystorm#4904) * Fix mini_roundabout/turning_circle fill for tertiary and unclassified * Fix mini_roundabout/turning_circle casing for primary and secondary * Add support for mini_roundabout/turning_circle on trunk roads commit 73ea404 Author: Mattijs Leon <[email protected]> Date: Thu Nov 9 22:33:35 2023 +0100 Fix rendering of highway=track that was broken in PR gravitystorm#4666 (gravitystorm#4895) Co-authored-by: Mattijs Leon <[email protected]> commit bfc49d0 Merge: fc884db fe6fd98 Author: dch0ph <[email protected]> Date: Sat Nov 4 13:05:52 2023 +0000 Merge remote-tracking branch 'upstream/master' commit fe6fd98 Author: Mattijs Leon <[email protected]> Date: Thu Nov 2 13:59:32 2023 +0100 Add rule to render landuse flowerbed (gravitystorm#4889) * Add rule to render landuse flowerbed * Add non-pictorial rendering for lower zooms and keep pictorial rendering for high zoom levels. * Implement PR comments --------- Co-authored-by: Mattijs Leon <[email protected]> commit fc884db Merge: c4b7dfd 4abe70d Author: dch0ph <[email protected]> Date: Sun Oct 29 17:32:30 2023 +0000 Merge remote-tracking branch 'upstream/master' commit 4abe70d Author: Justin Gruca <[email protected]> Date: Sun Oct 29 07:19:53 2023 -0500 Update pitch color to be less blue (gravitystorm#4480) * Update pitch color to be less blue * Update pitch to #88e0be per suggestion commit ffaedb6 Merge: 3c60a7b c7c8f4f Author: Paul Norman <[email protected]> Date: Thu Oct 26 19:49:42 2023 -0700 Merge pull request gravitystorm#4887 from mnalis/fix-osdn-mirror Use more reliable OSDN mirror commit c4b7dfd Merge: a3ecd3f 88f07af Author: dch0ph <[email protected]> Date: Tue Oct 24 18:59:32 2023 +0100 Merge branch 'tweak-to-run' commit 88f07af Author: dch0ph <[email protected]> Date: Mon Oct 23 21:32:34 2023 +0100 Tweaks to run on UKz14 setup Fonts -> Gillius No ice sheets commit c7c8f4f Author: Matija Nalis <[email protected]> Date: Wed Oct 18 18:36:22 2023 +0200 Use more reliable OSDN mirror Fixes gravitystorm#4864 commit 3c60a7b Author: Nicolas Peugnet <[email protected]> Date: Mon Oct 16 23:46:07 2023 +0200 Update OSM Bright link to Geofabric's maintained fork in README.md (gravitystorm#4880) The Geofabric fork is still maintained and it as updated installation instructions that works. commit 8f2b015 Author: dch0ph <[email protected]> Date: Mon Oct 16 19:41:22 2023 +0100 Remove unused code in amenity-points.mss (gravitystorm#4884) landuse_farm is incorrect tagging and is not rendered anyway (not selected by SQL query for text-point layer) commit eec4e9b Author: map-per <[email protected]> Date: Sat Oct 14 18:32:57 2023 +0200 Restored rendering for railway=platform + covered=yes (gravitystorm#4797) * Restored rendering for railway=platform + covered=yes * made linear platforms consistent with areas --------- Co-authored-by: map per <-> commit a3ecd3f Author: dch0ph <[email protected]> Date: Thu Oct 12 21:57:37 2023 +0100 Remove unused code in amenity-points.mss landuse_farm is incorrect tagging and is not rendered anyway (not selected by SQL query for text-point layer) commit 445e553 Author: Benjamin Schultz Larsen <[email protected]> Date: Thu Aug 17 00:02:06 2023 +0200 Removes amenity-points rendering for golf_hole (gravitystorm#4857) commit aef9179 Author: kaneap <[email protected]> Date: Tue Jul 4 10:45:43 2023 +0200 fix color of ref labef for subway entrance (gravitystorm#4835) commit 1b68d57 Merge: dae7527 1da7305 Author: Paul Norman <[email protected]> Date: Mon May 29 17:27:22 2023 -0700 Merge pull request gravitystorm#4666 from tjur0/feature/roller_coaster feat: Render roller_coaster=track ✨🎢 commit dae7527 Merge: 6591d7b 64ea80c Author: Paul Norman <[email protected]> Date: Thu Mar 9 10:33:36 2023 -0800 Merge pull request gravitystorm#4786 from thoughtful-explorer/doc-edits Formatting, spelling, and minor editorial corrections commit 64ea80c Author: Will Meredith <[email protected]> Date: Tue Mar 7 22:12:04 2023 -0500 Formatting, spelling, and minor editorial corrections commit 1da7305 Author: Mart-0 <[email protected]> Date: Fri Oct 21 21:24:16 2022 +0200 fix: :art: adjust bridge casing width commit d1809f5 Author: Mart-0 <[email protected]> Date: Thu Oct 20 21:40:11 2022 +0200 fix: set variable commit ff83a18 Author: Mart-0 <[email protected]> Date: Thu Oct 20 19:41:59 2022 +0200 refactor: :art: move the dashing outside of the gaps fill layer commit 5b65f08 Author: Mart-0 <[email protected]> Date: Thu Oct 20 19:22:20 2022 +0200 fix: :art: PR feedback change to black for bridges, eleminate duplicate code, add comment, change name of layer commit 7af20d5 Author: Mart-0 <[email protected]> Date: Mon Oct 17 10:37:47 2022 +0200 fix: add indoor bridge support and fix one variable commit ae4053b Author: Mart-0 <[email protected]> Date: Wed Oct 12 15:32:07 2022 +0200 fix: sql and forgot to remove one zoom line commit eef8ac1 Author: tjur0 <[email protected]> Date: Wed Oct 12 13:39:29 2022 +0200 fix: update WHERE statement Co-authored-by: Paul Norman <[email protected]> commit e29df01 Author: Mart-0 <[email protected]> Date: Mon Oct 10 10:52:44 2022 +0200 fix: fix pr feedback commit d65357f Author: Mart-0 <[email protected]> Date: Sat Sep 24 19:38:43 2022 +0200 refactor: :art: Add seperate casing layer, add same group by as the road layer commit db89734 Author: Mart-0 <[email protected]> Date: Sun Sep 18 16:33:57 2022 +0200 fix: :art: move code to sperate file, fixed feedback move code to seperate file, ajust widths, render dashes from 16 instead of 14. commit b0aea63 Author: Mart-0 <[email protected]> Date: Wed Aug 31 17:15:18 2022 +0200 refactor: :art: improve structure commit e88d8cc Author: Mart-0 <[email protected]> Date: Wed Aug 31 17:01:23 2022 +0200 feat: :sparkles: use attachments, add bridges split the rendering in layers to avoid gaps commit 542f8bc Author: Mart-0 <[email protected]> Date: Wed Aug 31 11:28:46 2022 +0200 refactor: :art: remove roller_coaster colum commit 0089d28 Author: Mart-0 <[email protected]> Date: Mon Aug 29 21:54:24 2022 +0200 style: white-space commit 590991d Author: Mart-0 <[email protected]> Date: Mon Aug 29 21:43:54 2022 +0200 fix: :art: remove name rendering, and fix other feedback commit dd83871 Author: Mart-0 <[email protected]> Date: Mon Aug 29 07:28:01 2022 +0200 fix: fix technical issues commit 7177887 Author: Mart-0 <[email protected]> Date: Sun Aug 28 18:41:01 2022 +0200 feat: Add roller coaster rendering
Fixes #214
Changes proposed in this pull request:
The code proposed has been extensively discussed in #214, but in summary:
SQL functions introduced that interpret mode-specific access tags in addition to the overall
access
tag.Tags considered are determined by a "primary mode" inferred from the highway types:
Vehicle road (primary mode: motorcar): motorcar > motor_vehicle > vehicle
cycleway: bicycle
bridleway: horse
footway, steps: foot
[Access tagging on
track
is unchanged, i.e. only determined byaccess
]In this initial PR, the interpretation of path is unchanged, i.e. path is considered to be a cycleway or bridleway if
bicycle=designated
orhorse=designated
respectively.The access tags are reduced to a single
int_access
tag tagging the valuesno
,restricted
andyes
(which is equivalent to NULL).restricted
used to indicate an intermediate "some restrictions apply" for vehicles. The access marking used is the the currentaccess=destination
, but the name change reflects the fact that other values are included, e.g.delivery
.The
int_access
is generated, as normal practice for this style, on-the-fly. An option to use a generated column to pre-calculate these values is commented out. In practice, the overhead of combining the access tags is likely to be small given the vast amount of in-line SQL in the roads query. Note that some cruft in the railway side of the roads query has been removed.Other global access tags, such as
access=forestry
, are also now interpreted (equivalent tono
).access=agriculture;forestry
is also accepted, although we don't typically interpret multiple-value tags.The code does not require a database re-load, but does require additional functions to be installed in the Postgres database. These have been placed into a file
functions.sql
so that there is a place where functions for the style can be gathered. This does require an additional step in installing the style, and so installation instructions and the CI test have been adjusted. The Docker set-up has not been touched and will need fixing by somebody who understands/uses it.Test rendering with links to the example places:
Destination marking
Residential highway tagged with
motor_vehicle=destination
.Before

After

No marking

Before
access=yes, motor_vehicle=no, psv=yes
After

Honouring foot
North-south footway tagged with
highway=footway, foot=private
Before

After

Honouring bicycle

highway=cycleway, bicycle=designated, access=no
Before
After

The last example needs discussion since it is a case where

access=no
has been added because the bridge is closed:The logic of access tagging is that the general
access=no
is overridden by the specificbicycle=designated
, and a router should allow bicycles across. So this usage is arguably tagging for the renderer: retaining perhaps a formal right of way (bicycle=designated
) but indicating that the way is closed by exploiting Carto's simple approach to access tagging.It is inevitable that a wider and more correct usage of the access tags will throw up such cases!