Skip to content
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

Switch addresses to use ST_PointOnSurface #3898

Merged
merged 3 commits into from
Sep 24, 2019

Conversation

jeisenbe
Copy link
Collaborator

Related to #1644

  • This appears to be the last relevant layer that needs to be switched now, unless we wish to switch all polygon layers to use ST_PointOnSurface

Changes proposed in this pull request:

  • Switch addresses to use ST_PointOnSurface
  • This makes addresses consistent with amenity-points and building names.
  • Address numbers will no longer be displayed separately than the POI or building name for oddly-shaped polygons

Test rendering:

https://www.openstreetmap.org/#map=19/50.63295/3.06320

Passage 57

Before
passage-57-before
After
z19-passage-57-after

Monop

Before
z19-monop-before
After
z19-monop-after

This makes addresses consistent with `amenity-points` and `building` names.
Address numbers will no longer be displayed separately than the POI or building name for oddly-shaped polygons
@matthijsmelissen
Copy link
Collaborator

I thinjk we can/should also get rid of text-placement: interior; in addressing.mss.

This line is no longer necessary, since all are now labeled on a point that is generated with ST_PointOnSurface
@jeisenbe
Copy link
Collaborator Author

Thanks, good idea. I have pushed a new commit that fixes this for addresses in this PR, but it looks like we also need to remove text-placement: interior from buildings-text and from amenity-points.mss in a separate PR

Copy link
Collaborator

@matthijsmelissen matthijsmelissen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Collaborator

@pnorman pnorman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add a way && !bbox! condition to both parts of the UNION ALL. As-is, this change would prevent index usage on planet_osm_polygon.

@jeisenbe
Copy link
Collaborator Author

Thanks, I've made the changes requested

@pnorman pnorman merged commit 870d530 into gravitystorm:master Sep 24, 2019
@jeisenbe jeisenbe deleted the addr-st_pointonsurface branch September 24, 2019 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants