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

WebGL / only check polygons winding order for RenderFeature #15114

Merged
merged 1 commit into from Sep 11, 2023

Conversation

jahow
Copy link
Contributor

@jahow jahow commented Sep 11, 2023

This PR takes advantage of #15113 to correctly handle RenderFeatures of type polygon, in case these contain multipolygons with several outer rings.

Polygon holes should now properly render both for Vector and VectorTile sources, i.e. for Feature and RenderFeature instances.

Replaces #15090
Fixes #15089
Fixes #14949

],
[
[40, 41],
[42, 43],
[44, 45],
[46, 47],
[46, -47],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These coordinates have been changed so that the winding orders are correct for the outer and inner rings (before that not much attention had been given to it)

The Feature instances should already come with correctly separated multi-
polygons. The RenderFeature instances can contain multipolygons in the form of
polygons with several outer rings; to handle this we use the inflateEnds
utility which recreates the polygon ends according to the winding order.

Added a rendering test to make sure holes correctly render for Feature instances.
@jahow jahow force-pushed the fix-webgl-polygon-hole-rendering branch from ba3e02c to 1361a79 Compare September 11, 2023 14:51
@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-15114--ol-site.netlify.app/.

@jahow jahow merged commit 0b97a9f into openlayers:main Sep 11, 2023
8 checks passed
@jahow jahow deleted the fix-webgl-polygon-hole-rendering branch September 11, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants