Skip to content

fix(map): Normalize winding order to CCW & replace d3-geo with turf LINDASSUP-247#2542

Draft
hupf wants to merge 1 commit intomainfrom
bug/LINDASSUP-247
Draft

fix(map): Normalize winding order to CCW & replace d3-geo with turf LINDASSUP-247#2542
hupf wants to merge 1 commit intomainfrom
bug/LINDASSUP-247

Conversation

@hupf
Copy link
Contributor

@hupf hupf commented Mar 26, 2026

Closes LINDASSUP-247

  • Previously the winding order of polygons has not been modified caused issues with helpers requesting a specific winding order. We now "rewind" the polygons to CCW ("right hand rule"), as is the standard with GeoJSON, right after parsing.
  • The d3-geo helpers expected CW winding order, which required a rewinding before every call. Therefore d3-geo is now replaced equivalent helpers from turf, that use the CCW winding order.

How to test

  • Create a map visualization for Heavy Metal Soil Contamination: The map should be zoomed to Switzerland, not the whole world (this was the current bug).
  • Create a map visualization for Heavy Metal Soil Contamination: The map should (still) be zoomed to Switzerland.
  • Symbols on maps should render correctly (how to test?)
  • Overlapping smaller regions should be in front of larger regions such they can be hovered and display a tooltip.

  • I added a CHANGELOG entry
  • I made a self-review of my own code
  • I wrote tests for the changes (if applicable)
  • I wrote configurator and chart config migrations (if applicable)

…INDASSUP-247

- Previously the winding order of polygons has not
  been modified caused issues with helpers
  requesting a specific winding order. We now
  "rewind" the polygons to CCW ("right hand
  rule"), as is the standard with GeoJSON, right
  after parsing.
- The d3-geo helpers expected CW winding order,
  which required a rewinding before every call.
  Therefore d3-geo is now replaced equivalent
  helpers from turf, that use the CCW winding
  order.
@hupf hupf self-assigned this Mar 26, 2026
@vercel
Copy link
Contributor

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
visualization-tool Error Error Mar 26, 2026 4:22pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant