mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-14 23:32:20 +00:00
Plan KML and KMZ drawing in one pure function, checked against Cesium
src/data/geoImportPlan.js decides what an imported file draws and with what: raised or clamped geometry, rings and holes, rotation near the poles and across 360 degrees, absolute and relative altitudes, draw order, canvas budgets and the vertex and ring limits, with no engine and no DOM. drawImportedFile draws that plan through the globe contract and keeps pin placement, yielding and cancellation. Every limit of the import lives in src/data/geoImportLimits.js with what it protects. scripts/fixtures/geo-import holds 13 files covering those cases, and reference.json what Cesium's own KML and GeoJSON data sources make of them; scripts/qa-geo-import-reference.mjs records it and compares the plan with it. Property tests on seeded random polygons check area, bounds, ring closure and winding. Writing the plan fixed three cases: overlays below the ellipsoid kept a negative height, raised plain-colour overlays now draw, and the vertex limit no longer depends on whether a ring repeats its first point.
This commit is contained in:
1 parent
9c2a2d6951
commit
9ae7dea918
32 files changed
+103263
-458
No files matched your search
@@ -350,12 +350,13 @@ Raised polygons (KML absolute or relative) draw their fills as meshes and
|
||||
their outlines as lines at the vertices' heights. A ground overlay's colour
|
||||
tints its image and its alpha fades it; a rotated overlay's image is turned
|
||||
on a canvas over the box around it, as Cesium turns its rectangle in degrees,
|
||||
and an absolute overlay is raised to its altitude (Cesium raises only
|
||||
absolute ones). The shared display has known limits against Cesium: wall
|
||||
fills and extruded prisms are omitted (their top geometry remains), and
|
||||
`gx:LatLonQuad`, a rotated overlay whose box passes a pole and a raised
|
||||
plain-colour overlay are omitted. These are counted as undrawn. Ground edges
|
||||
use great circles rather than rhumb lines.
|
||||
and an absolute image or plain-colour overlay is a mesh at its altitude,
|
||||
including negative heights (Cesium raises only absolute ones).
|
||||
The shared display has known limits against Cesium: wall fills and extruded
|
||||
prisms are omitted (their top geometry remains), and
|
||||
`gx:LatLonQuad` and a rotated overlay whose box passes a pole are omitted.
|
||||
These are counted as undrawn. Ground edges use great circles rather than
|
||||
rhumb lines.
|
||||
|
||||
## Input ownership
|
||||
|
||||
|
||||
Reference in new issue
Block a user