-
Notifications
You must be signed in to change notification settings - Fork 819
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
Adding rendering for amenity=parking_entrance [WIP] #2875
Conversation
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 MSS looks okay, but the SQL needs some changes.
The icon looks okay, but I haven't reviewed it for pixel alignment.
@@ -1427,6 +1427,7 @@ Layer: | |||
tags->'power_source' as power_source, | |||
tags->'icao' as icao, | |||
tags->'iata' as iata, | |||
tags->'parking' as parking, |
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.
What does another column do to the number of combinations, and does it cause problems with a combinatorial explosion?
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.
I have no deeper understanding of SQL in layers - I just try to make it work and look similar to other features. Some guidelines or tutorial for adding things would be welcome.
What you think should be done here?
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.
https://vimeo.com/68093876 talks about the problem starting at 10:52-14:21. The best way to check this isn't a problem here is to compare the line count of the XML output. If it increases by a dozen lines, that's fine. If it increases by 10000 lines, it's a problem.
I suspect this is okay, but I'm not 100% sure. If you added something that styled all objects with some parking value then it would definitely be a problem.
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.
Most of the code I have ever added to osm-carto was some SVG XML for icons, so that's probably not the case for me.
I understand the combinatorial explosion principle, my problem is rather what you can see at 16:40. Some common layers are so complex, that they don't even fit on the screen, so it's hard to know which visual section is needed and how should it look like.
I refer to "visual sections", because with so many elements it's hard to see the logical structure and know what is nested inside something other - even with all the indents. Maybe putting some of the lists into variables or including them from other files would help, if it's possible?
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.
Where can I find those generated XML files, in particular having a setup closely following
https://github.com/gravitystorm/openstreetmap-carto/blob/master/DOCKER.md
?
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 just need CartoCSS:
https://github.com/mapbox/carto#installation
Then you can just run:
carto openstreetmap-carto/project.mml > project.xml
It might be easier to go inside the running container and use existing Kosmtik module:
docker exec -it openstreetmapcarto_kosmtik_1 \
/usr/lib/node_modules/kosmtik/node_modules/carto/bin/carto \
/openstreetmap-carto/project.mml > project.xml
You might remember that carto can be run against desired API version using -a
.
@@ -1457,6 +1458,7 @@ Layer: | |||
OR historic IN ('memorial', 'monument', 'archaeological_site') | |||
OR tags->'memorial' IN ('plaque') | |||
OR highway IN ('bus_stop', 'elevator', 'traffic_signals') | |||
OR tags->'parking' IN ('underground') |
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.
I don't see that we need to change the WHERE clause
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.
What do you suggest tu put here?
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.
Nothing.
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.
Indeed, this case should be already covered by "OR amenity IS NOT NULL"
@@ -1499,7 +1501,7 @@ Layer: | |||
'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', | |||
'fast_food', 'telephone', 'taxi', 'theatre', 'toilets', 'drinking_water', | |||
'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', | |||
'charging_station', 'arts_centre', 'ferry_terminal') THEN amenity ELSE NULL END, | |||
'charging_station', 'arts_centre', 'ferry_terminal', 'parking_entrance') THEN amenity ELSE NULL 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.
Are there other cases where we've added something to this query, but not the one above?
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 mean amenity-points
but not amenity-points-poly
? I don't know, I just saw on the wiki that it's allowed only on nodes. I'm still undecided however if should I add it to amenity-line
, since it makes sense to tag the service highway.
What's your opinion?
@@ -1564,6 +1567,7 @@ Layer: | |||
OR tags @> 'emergency=>phone' | |||
OR highway IN ('bus_stop', 'elevator', 'traffic_signals') | |||
OR tags @> 'ford=>yes' OR tags @> 'ford=>stepping_stones' | |||
OR tags->'parking' IN ('underground') |
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.
As above with the WHERE clause
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.
How should I correct it?
I've tried to make "P" 1 px wide where possible, but that makes it hardly visible, so now it's mostly rescaled parking icon. Arrow uses points on the matrix, but since it's diagonal, I would rather not call it pixel aligned. |
You're going to need to rebase the SQL changes since I merged #2866, but that makes the changes simpler. With those changes, |
0b5bb0f
to
8cd87da
Compare
@kocio-pl Are you planning to continue working on this? |
Yes, I can resolve conflicts soon, but there are still some unanswered questions and that's why this code is still waiting. |
Here is a pixel aligned version of the icon. |
So much better - thanks! |
Questions answered, but we still need to know the change in lines of XML so we know if it's causing a combinatorial problem or not. |
The icon should be transparent when an access tag is set. Probably just copy the two lines as used for parking. |
I prefer not to show any of the private entrances - it's too many of them and they would clutter the view. |
Both (transparent or not at all) is fine with me. Just did not see that in the code yet. |
what about rendering private ones really late? |
I'm suspicious, but not completely against. z19+ might work - it just needs testing to make sure. |
I would love to see parking entrances rendered. How can I help to get this PR merged? |
Could you review code comments and probably make a fork with a proper code I could test? |
Resolves #270.
Related to #552 (comment).
This is a draft which renders such entrances but only for
parking=underground
, because other parkings are visible in our style anyway. I plan to:access=yes
andaccess=permissive
(there's too many of private underground parkings)Example: