Skip to content

Add Ellipse graphics support to exportKml#13622

Open
laurenlliu wants to merge 3 commits into
CesiumGS:mainfrom
laurenlliu:feat/export-kml-ellipse
Open

Add Ellipse graphics support to exportKml#13622
laurenlliu wants to merge 3 commits into
CesiumGS:mainfrom
laurenlliu:feat/export-kml-ellipse

Conversation

@laurenlliu

Copy link
Copy Markdown

Summary

exportKml currently exports Point, Billboard, Model, Path, Polygon, and Polyline entities, but silently skips Ellipse entities (no error, the ellipse just doesn't appear in the exported KML).

This adds createEllipse/getEllipseBoundary, which:

  • Sample the ellipse boundary using EllipseGeometryLibrary.computeEllipsePositions, the same math the renderer itself uses for EllipseOutlineGeometry, so the exported footprint matches what's rendered on screen.
  • Export the sampled boundary as a KML <Polygon>, since KML has no native ellipse element — this mirrors how Rectangle is already exported as a <Polygon> in this same file.
  • Reuse the existing fill/material/outline/extrude/altitudeMode styling logic already used for Polygon, so an Ellipse entity's appearance carries over consistently.

Fixes #9344

Test plan

  • npx eslint packages/engine/Source/DataSources/exportKml.js passes cleanly
  • I was not able to run the full Karma/browser test suite (gulp build && gulp test) in my environment for this PR — flagging this explicitly rather than claiming it's verified. Happy to add a spec to exportKmlSpec.js (e.g. mirroring the existing Polygon export spec, asserting the exported <Polygon> boundary coordinates for a simple Ellipse entity) if a maintainer can point me to the right fixture pattern, or if CI surfaces something I should fix.

exportKml previously exported Point, Billboard, Model, Path, Polygon,
and Polyline entities but silently skipped Ellipse entities. Add
createEllipse/getEllipseBoundary, which sample the ellipse boundary
using the same EllipseGeometryLibrary math the renderer itself uses
and export it as a KML <Polygon>, matching how Rectangle/Polygon are
already handled (fill/material/outline styling, extrude, altitudeMode).

Fixes CesiumGS#9344
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for the pull request, @laurenlliu! Welcome to the Cesium community!

In order for us to review your PR, please complete the following steps:

Review Pull Request Guidelines to make sure your PR gets accepted quickly.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add exportKML support for entity instances with Elipse graphics

1 participant