-
Notifications
You must be signed in to change notification settings - Fork 821
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
Unify code of power=tower and power=pole #3561
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.
This needs an ORDER BY to get the ordering right.
If you feel comfortable with git, go back one commit and work from there, otherwise don't worry about which order you write things within the WHERE clause.
project.mml
Outdated
FROM planet_osm_point | ||
WHERE power = 'tower' | ||
WHERE power = 'pole' OR power = 'tower' |
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 an ORDER BY
clause to get the correct priority when a pole and tower are nearby.
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 modified the syntax to include ORDER BY condition. Is it correct ?
@jragusa What do plan to do with this code, do you want to make the requested changes? |
yes, I'm working on it. |
@jragusa - do you still intend to complete this? The current code does not work because of openstreetmap-carto/project.mml Lines 1724 to 1725 in 0000448
Also note if you don't use the prio column anywhere else you don't need it, you can just inline the CASE in the ORDER BY (like done in many of the road queries for example). |
@imagico I have modified according to your remark. What do you think ? |
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.
Looks good now.
* unify code of power=tower and power=pole * invert pole and tower * add ORDER condition * fix ORDER BY
* unify code of power=tower and power=pole * invert pole and tower * add ORDER condition * fix ORDER BY
Fixes #1179
Changes proposed in this pull request:
power-towers
andpower-poles
inproject.mml
power.mss
Test rendering with links to the example places:
there is no rendering differences
https://www.openstreetmap.org/#map=17/46.17629/6.23976
z=15
z=16
z=17