CesiumGS / CesiumGS/cesium

Artifacts in Polygon Fill (Holes) and Camera Zoom Issues with Custom Lambert Conformal Conic Projection in 2D Mode

Open
#13,149 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs triage type - bug
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

What happened?

I am implementing a custom MapProjection (Lambert Conformal Conic) in Cesium. I am loading a GeoJSON datasource (countries) in SCENE2D with MapMode2D.ROTATE.

While the polygon borders (outlines) are projected and rendered correctly, the fills are rendering with significant artifacts (holes/gaps) or missing entirely. Additionally, the camera zoom behavior is erratic; I am unable to zoom in or out effectively.

Image
Reproduction steps

Create a custom class implementing MapProjection using LCC math.

Initialize Viewer with sceneMode: SceneMode.SCENE2D and mapMode2D: MapMode2D.ROTATE.

Load a GeoJSON file containing country polygons.

Observe that borders align with the projection, but fills are broken.

Expected Behavior: The polygon fill should completely cover the area defined by the border, adapting to the curvature of the custom projection.

Actual Behavior: The fill appears fragmented with visible holes, suggesting a triangulation or granularity mismatch. The camera also locks up or fails to zoom.

Sandcastle example

https://sandcastle.cesium.com/#c=tVnrc+I4Ev9XtLkPYzKODcxm5o489lggs2wRSOUxW7dFVUrYAjQxlleSkzC7879fS/IbO1BXe86H2FL3rx/qbrWEe3w85/MQHaMJ3iwIl2jAwiXjGxyoN+qhG86+Ek9SFiJrMhi00AuVa/SZsF/vZlPD66p/XoCFSFEyEI1RgPhTc8DjsVBIHnuScYtFak608ln1JKPoInv76y/05/czRVOkc13UcdCQLHEcSIGsUcxZRE4GJJSceq0iqRaKhqOr/sPk/vG2Pxw/3AH+xw+f/tn58Mlpn6Fm6sls2gbazqkiS543qPv3HaD+sXsodReoTz9VqIscck2F8yiiNeHkFvs0Vp5JXeeUxn+4uEBx6JMlDYnfQj+hWqpexRFnu9KWOBBkhIWk4aoorTTeKK1E1UNtMK5BxJRx+KqRkU28LSQjy6XsSiJBQCPBqA9SQvKCBkTQeOOM0mF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pyFPPAchxXkk2kLjmEu4hhh4BsFeoKODx3U5Zznz4j6l/U7INI/1ACM8s4CFTQzo8uz12gL7Eles6eCYdCrEjWncuJGXQc59yFz10uyViwwLyA+F8

Linked ticket :
https://github.com/CesiumGS/cesium/issues/3877
https://github.com/CesiumGS/cesium/issues/11096

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Sandcastle example and the custom MapProjection implementation, reproducing the GeoJSON country polygons in SCENE2D with MapMode2D.ROTATE. Compare the behavior with issues #3877 and #11096; done means polygon fills cover their projected borders without holes and camera zoom works reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.