-
Notifications
You must be signed in to change notification settings - Fork 823
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
Change text-poly-low-zoom to use ST_PointOnSurface #3921
Conversation
Also remove unneeded text-placment: interior
@@ -1992,7 +1992,8 @@ Layer: | |||
name, | |||
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions | |||
FROM planet_osm_polygon | |||
WHERE (landuse IN ('forest', 'military', 'farmland') | |||
WHERE way && !bbox! | |||
AND (landuse IN ('forest', 'military', 'farmland') |
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.
AND has higher precedence than OR In SQL, so we need a pair or brackers around all the OR statements.
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.
In addition to the pair here?
AND (landuse IN....
...
OR leisure IN ('nature_reserve'))
Where should the brackets be? It seems to work currently
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 brackets look good to me as-is.
@matthijsmelissen - the current code works. I don't see where the brackets are missing. Could you advise? |
@matthijsmelissen there is a pair of brackets around all the OR statements:
|
@matthijsmelissen could you respond to the comments above? |
@matthijsmelissen please respond to my answer to your comment above, it has been 3 months now. |
I might have mislooked, brackets look fine to me. |
Thank you for the help. If you have time, would you be able to approve this PR? |
Related to #3201 - migration to server-side vector tiles
Changes proposed in this pull request:
text-poly-low-zoom
layer to useST_PointOnSurface
- this is necessary to use this style with vector tiles, and this makes the low zoom rendering consistent with the label placement at higher zoom levels (z10 and uptext-placment: interior
for the polygon features affected - this code is no longer needed, because the labels are placed on a point, not in a polygon, by Mapnik at the time of rendering.Test rendering:
z8 Libya
https://www.openstreetmap.org/#map=8/27.330/17.216
z9 Wan am namus
https://www.openstreetmap.org/#map=9/24.8628/17.7742