CesiumGS / CesiumGS/cesium

KML line positions not being clamped to terrain

Open
#8,238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This KML uses the clampToGround altitude mode and tessellate = false by default. The line positions should be clamped to terrain but the lines themselves should not (they should cut through the terrain). In Cesium the heights are set to zero so it clamps to the ellipsoid instead of terrain.

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Folder>
      <Placemark>
        <LineString>
          <coordinates>-94.2853118971204,34.0604044149558,200.0
            -95.2849440296246,34.0600224952286,200.0</coordinates>
        </LineString>
      </Placemark>
    </Folder>
  </Document>
</kml>

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

Begin with the supplied KML example using clampToGround and tessellate=false, then trace the KML loading path that handles LineString positions and altitude modes. Compare the resulting line positions with terrain and ellipsoid heights; done means positions follow terrain while the line geometry still cuts through it.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.