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:
German Khokhlov committed 2026-11-10 15:26:10 +04:00
1 parent 9c2a2d6951
commit 9ae7dea918
32 files changed
+103263 -458

No files matched your search

+7 -3
View File
@@ -3590,7 +3590,9 @@
"src/data/imagingSensors.js",
"src/data/planespottersPhoto.js",
"src/globe/cesium/orbital.js",
"src/globe/cesium/worldTime.js"
"src/globe/cesium/worldTime.js",
"src/data/geoImportLimits.js",
"src/data/geoImportPlan.js"
],
"external": [
"hls.js",
@@ -4302,7 +4304,8 @@
"src/layers/satellites/sensors.js",
"src/data/ucsSatellites.js",
"src/data/imagingSensors.js",
"src/data/planespottersPhoto.js"
"src/data/planespottersPhoto.js",
"src/data/geoImportLimits.js"
],
"external": [
"hls.js",
@@ -5254,7 +5257,8 @@
"src/data/geoImportImages.js",
"src/data/geoImportRecords.js",
"src/data/geoImportKml.js",
"src/overlays/bindOverlayHost.js"
"src/overlays/bindOverlayHost.js",
"src/data/geoImportLimits.js"
],
"external": ["cesium"]
},