CesiumGS / CesiumGS/cesium

GeoJsonPrimitive: Fix tessellation at poles and antimeridian

Open
#13,593 0 comments 0 reactions 0 assignees View on GitHub
category - vector data type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

### What happened?

GeoJsonPrimitive polygon triangulation fails near the north pole and for polygons that cross the antimeridian. I haven't debugged further yet but I expect that we'll need to split polygons crossing the antimeridian.

Also see iTwin.js examples on greedy tessellation between line strings:
https://www.itwinjs.org/learning/geometry/triangulation/

### Reproduction steps

See:

- [countries.json](https://github.com/user-attachments/files/28318836/countries.json)
- https://github.com/CesiumGS/cesium/pull/13505#issuecomment-4550205669

### Sandcastle example

_No response_

### Environment

n/a

### AI acknowledgment

- [ ] I used AI to generate this issue report.
- [ ] (If the above is checked) I have reviewed the AI-generated content before submitting.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the triangulation failure with countries.json and compare the behavior with the iTwin.js greedy tessellation example. Trace the GeoJsonPrimitive polygon triangulation entry point, then verify that polygons near the north pole and crossing the antimeridian triangulate correctly without the reported failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.