Add Ellipse graphics support to exportKml#13622
Open
laurenlliu wants to merge 3 commits into
Open
Conversation
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
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exportKmlcurrently exports Point, Billboard, Model, Path, Polygon, and Polyline entities, but silently skipsEllipseentities (no error, the ellipse just doesn't appear in the exported KML).This adds
createEllipse/getEllipseBoundary, which:EllipseGeometryLibrary.computeEllipsePositions, the same math the renderer itself uses forEllipseOutlineGeometry, so the exported footprint matches what's rendered on screen.<Polygon>, since KML has no native ellipse element — this mirrors howRectangleis already exported as a<Polygon>in this same file.fill/material/outline/extrude/altitudeModestyling logic already used forPolygon, so anEllipseentity's appearance carries over consistently.Fixes #9344
Test plan
npx eslint packages/engine/Source/DataSources/exportKml.jspasses cleanlygulp build && gulp test) in my environment for this PR — flagging this explicitly rather than claiming it's verified. Happy to add a spec toexportKmlSpec.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.