CesiumGS / CesiumGS/cesium

KML lines can only be clamped when tessellate is set to true

Open
#8,760 0 comments 2 reactions 0 assignees View on GitHub
category - kml type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

In CesiumJS, loading in a KML that has lines and setting `clampToGround: true` will not clamp the line unless you have `1`. We added a warning about this here: https://github.com/CesiumGS/cesium/pull/8428. But opening this issue because this behavior does not match what you see when loading the KML in Google Earth, and wanted to document that we should consider changing this behavior in the future.

You can test [with an inline KML in this Sandcastle](https://sandcastle.cesium.com/index.html#c=fVVtj5s4EP4rVu5DEykFA7aBLaV36puq7l4jbXr3JR/qgLNBa3Bkm2TT0/33G3CSJdnm+AB4PM888+LxbLlG20rshEZvUSN26L0wVVt7f/Wy8auiX75XjeVVI/SrKfpn0SB4rNAaRDOttlUp9M0RWGjBrfhbaVnOncp4smj+nbxZNFvgUhtbqcYA2cFOwWuhObo5eOGZQjTCc9LpUQWg5qVKJz2qSF5v5uqzVm1T3iCrWwGkwOlYH2vZhSAaC8Q/sndPtURboQ248nYxCjy8GCHRFKqsmgcQfJ9/ep0sRu/yRZMBFIF6Y0C+tnZz4/u73c5TG9E8VMZrhPVBxQ+9cDHKO2eyD6poa6DKnWtZA7HkM27XJvP7/4O8FKbQVZ+P/OMT+C+FQWqFNp2qh/5UViC75hZe8COMEVLyTsYfUGXQco9KseKttM4eQkaArkLYQ19WaK9atONNL3E1GdgokYRqmmlneo/q1li0FIi3dq20KI/2xkojUVagPkFlpUVh5R5VDfp6d+tl/tD9Q0T3di8FqkpI1R6I1O4WWD5rIZqZkvtDfnrNbqPXPolAWCipdB6vMF7Bk/luPVDYVaVd5yTz3c/Jmv/SXNYx/i8DxpcMmX8Jyvyz1UzyQtRcPz5D+oL+sTRKtpDhj09w8kpRnhX6otRzzRuz4bo7jA9dbqBMUqJdZdfIZQ2p1vb1+VWSwZrpfPquZf7bL7Kc+afti2xrONzDZHBpKwve3qlS5GcNlPlnewPM8xHKg8wfrM6SrDQ0EkhNjl4HAbQGpThOaBTFcRpMI+bhOKUkpWFAKCPxNIxo/GwAHUEkDeMYR2kcJT0oCYIYJxGIgzC8BqIhxRSzFLPIgUKGYxZEOA7j9BqIEUpwQJMoZg4UpZQxTJMETF0DJTiMkjRmhKQORIMArGBCkiC6BuqCTkiSYojAgRISgdNRGqXkCohBEAGLSAx6DsSCENaUAPpaTCzEcUTChNFDSAzsBGnn5dWMsygKMaQ3gdocQQEN0oRhDIW7AoL4WZQQ+JIjKIa8pISG8dWQKEtZSinpAnAg4ExTDHUjDoQGR8ofnqnLth+ca+jgsxbN/MFlnHUXdf7jNBSgB81p7H34djfr1+PjpAJlAMO20/P6zyetasc4fp4pU7QYWfFkfZgTi1GPd4Pqp1L1XI0Pq5Jbfq9aDSPV42U5PgzMr8Bz2vGk4uXYUU+Pw3IymbwZTUeu7w+R/l7VG6UtarUcex50IoyPLjv+si0ehfUKYzpHDrdBF31Zbd3VfDHSYfRB85tuvq1aKe+rnwJuarh6qu0ZrPMM4v4Gc1Py7jLP1kF+64SeBwMBli9RVim55Hpg8T8). Set `0` and the line will no longer clamp.

[Here are two KML files you can also test with](https://github.com/AnalyticalGraphicsInc/cesium/files/3911497/two_kml_lines.zip). Both of these are clamped in Earth, only one is clamped in CesiumJS (the one that has tesselate to true).

This originally came up here https://github.com/CesiumGS/cesium/issues/8404 and it took me a while to figure out that tesselating was a requirement. It just came up again [on the forum here](https://community.cesium.com/t/problem-rendering-kml-file-with-3d-terrain/9307/4).

Contributor guide

Open the contributing guide

Research direction

Start with the linked Sandcastle example and compare the two KML files, especially their tessellate settings, using clampToGround: true. Confirm the current mismatch with Google Earth, then define and verify behavior in which KML lines clamp without requiring tessellate to be enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.