-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1427,6 +1427,7 @@ Layer: | |
tags->'power_source' as power_source, | ||
tags->'icao' as icao, | ||
tags->'iata' as iata, | ||
tags->'parking' as parking, | ||
CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', | ||
'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', | ||
'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', | ||
|
@@ -1450,6 +1451,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 commentThe 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 commentThe 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 commentThe 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 commentThe 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" |
||
OR (power = 'generator' AND (tags @> '"generator:source"=>wind' OR tags @> 'power_source=>wind')) | ||
ORDER BY way_area desc | ||
) AS amenity_points_poly | ||
|
@@ -1492,7 +1494,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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. You mean What's your opinion? |
||
'emergency_' || CASE WHEN tags->'emergency' IN ('phone') THEN tags->'emergency' ELSE NULL END, | ||
'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END, | ||
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', | ||
|
@@ -1524,6 +1526,7 @@ Layer: | |
tags->'power_source' as power_source, | ||
tags->'icao' as icao, | ||
tags->'iata' as iata, | ||
tags->'parking' as parking, | ||
CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', | ||
'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', | ||
'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', | ||
|
@@ -1550,6 +1553,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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. How should I correct it? |
||
OR (power = 'generator' AND (tags @> '"generator:source"=>wind' OR tags @> 'power_source=>wind')) | ||
ORDER BY score DESC NULLS LAST | ||
) AS amenity_points | ||
|
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:
You might remember that carto can be run against desired API version using
-a
.