Commit Graph
4254 Commits
Author SHA1 Message Date
Sameh Khamis 53f0a32a1b Keep a Data Library entry whose layer fails to tear down
Remove dropped an entry from the selection and reported success even
when the manager could not disable or destroy its layer, leaving a
registered, possibly visible layer that Browse, share links and saved
state no longer knew. Remove now keeps the entry and reports failure,
so its row and Remove all still reach it and a later Remove can retry.
2026-11-12 15:57:02 -08:00
Sameh Khamis f33a6ada52 Refuse a Data Library entry past the 64-entry cap before it registers
Add registered and switched on an entry before the selection was cut to
its first 64, so a 65th was dropped from the selection but stayed on:
Browse showed it as not added, share links left it out and Remove all
missed it. Start-up registered a share's entries the same way past the
cap. Add now refuses an entry a full library cannot keep, and start-up
registers only what the selection keeps.
2026-11-12 15:53:29 -08:00
Sameh Khamis e25cce874d Read an ArcGIS load stopped at maxFeatures as truncated
Paging stopped once maxFeatures were read before it noted that the
upstream had more, so a page holding exactly the cap with
exceededTransferLimit set read as the whole dataset. FEMA USA
Structures (2,000 features, one page) never showed PARTIAL in a dense
view. Stopping at the cap or the last page with more upstream now marks
the load truncated.
2026-11-12 15:52:31 -08:00
Sameh Khamis 134239fa5a Read a view over an incomplete GeoParquet index as PARTIAL
The browser's partition index kept whether it was complete only to
schedule a rebuild and handed the partitions on without it, so a view
counted unread partitions from an index that might be missing some and
could read as complete, even empty, over an area it had never indexed.
A view over an incomplete index now reads PARTIAL until a rebuild
completes.
2026-11-12 15:51:52 -08:00
Sameh Khamis e05a9566e4 Retry a GeoParquet footer whose body fails mid-stream
Only a failed fetch() marked a footer read as worth retrying. A body cut
off after its headers arrived (a reset, the proxy's 20-second timeout)
was taken for an unparseable file: the partition was left out and the
index still read as complete, so the server cached it without that
partition for the entry's cacheSeconds (24 hours for EPC). Such a read
is now retried like any fetch failure; an oversized body is still final.
2026-11-12 15:50:46 -08:00
Sameh Khamis 7d91a1875b Cancel a view-bounded load when the camera returns to the drawn view
Moving from view A to B started B's request; moving back to A before it
finished returned early because A was already drawn, so B's request ran
on and its features replaced A's while the camera was at A. Returning to
the drawn view now cancels the request in between.
2026-11-12 15:49:56 -08:00
Sameh Khamis 0f13c0a1c2 Let a newer share switch off a library layer still switching on
A share restore skipped every entry whose settled state already matched
the share, but a layer still switching on for an earlier share reads as
off until it settles. Opening a second share in that window left the
first share's layer to come on anyway. The restore now compares with the
manager's effective visibility (the newest request), so the newer share
supersedes the earlier one.
2026-11-12 15:49:11 -08:00
Sameh Khamis d58ba23fba Refresh live Data Library datasets once older than cacheSeconds
A dataset layer loaded its features once and kept them until it was
removed: the parsed set survives disable/enable, so NWS alerts, GDACS and
EONET showed what they held when first switched on for the whole session.

A library dataset now asks the manager for a refresh every cacheSeconds.
Once its data is that old it loads again, and swaps the new set in only
when it is ready, so the old features stay drawn while the request runs
and stay if it fails. An enable after cacheSeconds also loads afresh.
Disable and destroy cancel a refresh in flight.
2026-11-12 15:48:14 -08:00
Said Turksever 1a2589d4ef Port the Data Library Browse dialog to Vue and Pinia
The dialog is now DataLibraryDialog.vue (with DataLibraryCard.vue for each
entry), placed with the Browse button by DataLibraryBrowse.vue in
LayerPanelsView and teleported to the body. It renders what the
gev-data-library store holds and sends clicks and typing to the owner.

src/ui/libraryBrowser.js is now the framework-free owner: it presents the
open state, filters, the rows they show, the stat summary and Remove all
through `publish`, and its controls answer the view. Its text helpers are
what the view renders with t(), so every label follows the locale without
rebuilding anything. Only showModal/close and focus moves stay imperative;
focus returns to Browse also when the browser closes the dialog on Escape
itself.

Component tests mount the view over the real owner (open, filters, Add to
Remove keeping focus, Zoom, Remove all, a language switch, clean view).
2026-11-12 23:01:00 +00:00
Sameh Khamis e9085e8df3 feat(render): the Cesium renderer passes every conformance check a page can run
- Cesium's own tweens (its flights) step on the renderer's clock, so the
  flight traces compare frame by frame; dispose gives the scene its own
  clock back.
- moveStart and moveEnd are measured each tick on that clock, by the
  shared move detection, a change of the field of view or aspect
  included; Cesium's own events timed them by the system clock.
- A follow of a drawn item tracks where the draw port draws it.
- Pick rays are summed from the eye's axes: Cesium's lose about 1e-9 of
  direction at a near plane of 0.1 m. Ellipsoid picks and the view
  rectangle use them; a canvas with no size has none, as in Cesium.
- The harness always runs the virtual clock and claims 120 checks: 119
  pass on the page and query.heights skips. The five pointer traces
  need a camera controller there, and are recorded from Cesium's own
  controller in Node.
- The package boundaries list the cesium plugin export and the modules
  its groups now import.
2026-11-12 14:59:45 -08:00
Said Turksever 24ccdd4dc3 Fix Data Library share restore, dense tile layers and EPC partition reads
- Share links: the compact /share/<code> format carries the switched-on
  library entries (field 29), so Copy Link keeps them; a share opened in the
  same tab restores them; any share decides what is on, so one with every
  library entry off no longer switches on the recipient's stored entries.
- A tile entry too dense at its minimum zoom (Norway cadastre z14, depth z11)
  is hidden below that scale via minimumTerrainLevel instead of allocating
  millions of tiles when zoomed out.
- EPC partitions keep the full extent for exclusion and the 98 % extent for
  ranking only; the old trimmed-only extents are retired.
- Partition index footers that fail transiently are retried; an incomplete
  index is never cached as complete, a complete prior index is kept, and it
  is rebuilt after five minutes.
- Views that leave touching partitions unread are partial; listing and
  footer bodies are capped and ranges validated.
- The Browse dialog relabels after a language switch.
2026-11-12 22:37:34 +00:00
Sameh Khamis 720932e1f9 test(render): the Cesium renderer claims five more conformance checks: lit shapes, a cancelled flight, flight callbacks, onCommand and camera.rect 2026-11-12 13:27:43 -08:00
Sameh Khamis 9fb39eb6da test(render): a GPU icon set's draw commands: translucent sets draw one blended pass in the opaque pass, LESS_OR_EQUAL with depth written; others an opaque and a translucent pass 2026-11-12 12:44:19 -08:00
Sameh Khamis 44c9ed6d5c fix(render): translucent icons stack in order, as Cesium's translucent billboards
Cesium draws BlendOption.TRANSLUCENT billboards in the opaque pass,
blended, LESS_OR_EQUAL with depth written, so overlapping ones stack in
their order, the last on top; in the translucent pass the scene's
order-independent blend averages them. A translucent GPU icon set now
draws its one pass there too, with the depth function Cesium names
LESS_OR_EQUAL (LEQUAL is not one of its names, and fell back to LESS: the
first row won). A set's blend no longer moves the commands of a
collection built translucent into the translucent pass.
2026-11-12 12:29:59 -08:00
Sameh Khamis 01788c1b10 docs(render): translucent icon sets blend as Cesium's translucent billboards, order-independently where the scene is; a test for a host that draws its blend itself 2026-11-12 12:14:47 -08:00
Sameh Khamis 06516819da fix(render): translucent icon sets on the GPU blend as Cesium's translucent billboards
A GPU icon set whose blend is translucent draws every row in one
alpha-blended pass in row order (LEQUAL, depth written), as
BlendOption.TRANSLUCENT billboards do, in place of the opaque and
translucent passes the set's blend only re-blended: overlapping icons
kept the first row's fill and lost the outlines of those over it. The
vessels, shipwrecks and FIRMS sets ask for that blend again, as their
billboard collections did.
2026-11-12 12:10:27 -08:00
Sameh Khamis aa58886e40 feat(render): the Cesium renderer can run an application's camera controller
createCesiumRendererPlugin({cameraController}) (render/cesium/plugin) puts
the camera port on the shared camera controller over a native camera on
Cesium's (controlledCamera.js): poses written exactly, out of any lookAt
transform, the vertical field of view as Cesium's wide-side fov and kept
on a resize. Cesium's own controls hold their input off and their
collision off while it drives; the controller runs before and after the
preUpdate listeners, and what it throws is reported. A followed item's
position is where its GPU icon set draws it (drawnPosition), and the
input port's camera holds are the controller's.

The conformance harness, given a controller, steps a virtual clock 1/60 s
a frame for ticks and pointer events, so flights and pointer scripts are
compared frame by frame.
2026-11-12 11:41:54 -08:00
Sameh Khamis 1a7ef7fc7a docs(data): the Bhote Koshi event layer's comments say event 2026-11-12 11:41:54 -08:00
Said Turksever 871b7f0fcc Remove Data Library entries whose licence or provider links are broken
A link check of every manifest found 404 licence or provider pages for
OpenSeaMap seamarks, EMODnet bathymetry and the PDOK, basemap.at, Geneva
SITG, ICGC Catalunya, Luxembourg and Vlaanderen aerial photos, and no
answer from the SEDAC GPW, Minnesota and Bangor hosts. Drop those 11
entries, renumber the unpublished share-token ledger, point the tests at
remaining entries and regenerate DATA_SOURCES.md.
2026-11-12 17:05:21 +00:00
Said TurkseverandMaher Kurdi 11706a68cb Add Amsterdam traffic and ANPR camera positions to the Data Library
The City of Amsterdam's verkeersinformatiesystemen register lists where
its ~500 traffic and ANPR cameras stand, with type and asset number, but
publishes no pictures. That fits a Data Library dataset better than a
CCTV pack: the register answers GeoJSON in WGS84 with CORS headers, so
the entry fetches it browser-direct with no proxy code.

The register names no licence ("public unless stated otherwise"), so the
entry stays operator opt-in, as #251 had it. The dataset and the
position-only camera idea come from @Maher-Reven's #251, which this
replaces; the entry lists them as maintainer and in its attribution.

Co-authored-by: Maher Kurdi <[email protected]>
2026-11-12 12:26:45 +00:00
Said Turksever db80d82b8d Add the Data Library: live regional datasets, tiles and packs
DATA LAYERS keeps its curated core layers; regional and niche sources
live in the Data Library, opened from Browse data library at the foot
of the panel. Each entry is a JSON manifest in src/library/entries/
pointing at a live upstream (query API, provider-hosted file or tile
endpoint), so nothing is bundled and a self-hosted instance hosts no
data. Sources without CORS go through one allowlisted /api/library
route. Kinds: dataset (GeoJSON, CSV, JSON records, ArcGIS, partitioned
GeoParquet), tiles (XYZ, WMS/ArcGIS bbox export, terrarium relief) and
pack. Selections persist and travel in share links as lib=, separate
from the core layer tokens. Library rows get Zoom and Remove icon
chips that work while the layer is off, rendered through RailChips.
Strings are translated in every locale.
2026-11-12 12:26:45 +00:00
Sameh Khamis 83255f2bdb maps: the globe engine's release tells an imagery spec with a destroy of its own, as Cesium's engine destroys a provider, so a source that keeps tokens for its layer stops renewing them 2026-11-11 22:46:03 -08:00
Sameh Khamis 90695db611 conformance: draw.shapes.lit shows the globe again however it ends 2026-11-11 20:57:51 -08:00
Sameh Khamis d440f5bfaf Cesium quads: the blob a quad draws is held by its material, not the quad, so a quad that moves to another source lets the old blob go once the old material is freed after the frame; a change to or from a blob-backed image takes a material of its own 2026-11-11 20:56:47 -08:00
Sameh Khamis 9549e561e5 Cesium imagery frames: a tile video whose seek timed out or failed is failed for the retry window like one that failed to load, so a url that always hangs is not waited on by every tile; expired failures are pruned and clear() forgets them 2026-11-11 20:55:02 -08:00
Sameh Khamis dbe026b109 render: setBase's settled is stated for overlapping calls: whether, when the call resolves, its base is still the one drawn and has settled; an earlier call resolving while a later style loads, or after it fails, is settled, and one resolving after a later call changed the base is not 2026-11-11 20:51:40 -08:00
Sameh Khamis 74e4ebcf65 vectorBase: a colour is drawn as the rgba() it parses to, so the canvas never ignores one CSS would not read (an hsl() without %, an rgb() alpha without a slash); hue angles in turn, rad and grad are read in their units; a value evaluating to NaN is the property's default again, so a label never reads NaN 2026-11-11 20:50:28 -08:00
Sameh Khamis 9160e48b40 test(conformance): draw.shapes.lit needs globeVisibility, hiding the globe, and shows it again after 2026-11-11 20:28:02 -08:00
Sameh Khamis a6d5590430 fix(render): a setBase whose style fails no longer unsettles the earlier call whose base is still drawn: settled follows the call that last changed the base, in the stub and the Cesium port 2026-11-11 20:28:02 -08:00
Sameh Khamis 2a1e2d9c0b Cesium draw: a material or quad drawing a blob keeps it alive
An image material loads its image on its first draw, and an atlas slot
given a new image no longer holds the old blob, so a hidden fill, pattern
or quad built from a slot could lose its blob to collection, its URL
revoked, before it was ever drawn. Each material built from a blob (shape
and ground image fills, line patterns) and each quad now holds the blob it
draws while it lives.
2026-11-11 20:25:55 -08:00
Sameh Khamis 151230f5fa Cesium imageryFrames: a video whose seek never ends is let go; a failed one waits before loading again
A video whose seeks never ended stayed seeking, so every frame seeked it
again and waited out the timeout behind the others, and it was never
replaced. A seek that times out now lets the video go, so the next frame
loads a fresh one. A video that failed to load or to give its length
fails its frames at once for 3 minutes instead of being downloaded again
for every tile.
2026-11-11 20:23:28 -08:00
Sameh Khamis ba0fad3c35 vectorBase: a value of the wrong kind is the property's default
A colour the canvas cannot read, a keyword its property does not take, or
a number given as a string was handed to the canvas, which ignored it and
drew the last feature's style. Colours now go through parseColor (which
now knows every CSS colour name), keywords are checked against their
property's values, and only finite numbers are numbers; anything else is
the property's default, as MapLibre coerces it. The style's background is
read the same way, so a value it cannot use is black at opacity 1 rather
than no background.
2026-11-11 20:22:44 -08:00
Sameh Khamis 727a6a2f5e Conformance: draw.shapes.lit, a lit extruded shape's walls shade by the light
A grey block 300 m tall, seen from 3.3 km south and 1.5 km up looking
north: the wall facing the eye must be brighter than half its colour, as
the renderer's own lit solids draw it, and its top must shade unlike its
wall. It reads pixels, so the stub skips it.
2026-11-11 20:13:19 -08:00
Sameh Khamis 143f4df049 Cesium vectorBase: test that removing the layer aborts its paints
Cesium cancels none of an imagery layer's requests itself; the port's
layer cancels its requests in flight as it is removed, which is what the
provider's cancelled check sees. A test now goes through that path.
2026-11-11 20:06:05 -08:00
Sameh Khamis 7f500a551c vectorBase: a value that cannot be evaluated is the property's default, as in MapLibre
A paint or layout value that throws for a feature (a type that does not
fit, step or interpolate over what is not a number) or comes to null,
undefined or NaN is now the property's default, and a legacy function's
miss is its default, else the property's; only a filter that cannot be
evaluated leaves the feature out. The canvas still never keeps the last
feature's colour or width. A background colour given as rgba numbers is
the style's background rather than none.
2026-11-11 20:05:25 -08:00
Sameh Khamis 7b07ddeefd Cesium imageryFrames: a timed-out seek is not drawn as done, and a failed video is not kept
After a seek timed out its video already had the target time, so the next
frame skipped seeking and drew whatever showed as a finished tile; a video
still seeking is now seeked again. The seek past its end that learns a
video's length waits 60 s, not the 10 s of a frame's seek, and a video whose
load or length probe failed is dropped, so the next frame starts over
instead of failing until the video is evicted.
2026-11-11 20:03:20 -08:00
Sameh Khamis b3c6f35023 Cesium: a blob's object URL is revoked once the blob is collected, not by time
Revoking a URL idle for a minute broke two things: the icon atlas, keyed by
URL and never freeing a slot, took a new slot each time a blob was drawn
again until it had no room; and an image material, which loads on its first
draw, made hidden and shown later fetched a revoked URL and never drew. A
blob now keeps one URL, revoked by a FinalizationRegistry once the blob
itself is collected: anything that can still draw it holds it.
2026-11-11 20:02:20 -08:00
Sameh Khamis db80c9f141 Stub setBase: imagery is added before photoreal is awaited
An unawaited setBase with photoreal and imagery, followed by another,
added its imagery after the later call had set its own, leaving both.
The imagery now goes in before anything is awaited, as the Cesium port
adds it, and an overtaken call resolves settled: false.
2026-11-11 20:01:20 -08:00
Sameh Khamis 10a788db78 Merge pull request #1683 from bilawalsidhu/sameh/news-cards-every-height
fix(news): an application's picture cards stay at every height
2026-11-11 19:52:44 -08:00
Sameh Khamis a105e819e0 fix(news): an application's picture cards stay at every height
Zoomed out, a hotspot's reports give way to its beacon, and the cards an application draws through pictureCards went with them; they came back only once the camera had stopped after zooming in. The cards now come from every report the close-up view would mark, at any height; the layer's own markers and beacons are unchanged.
2026-11-11 19:43:06 -08:00
Sameh Khamis ca82e23d94 Conformance: clamped rims and walls are picked; the vector base covers string stops, no background and its restore
draw.shapes.clamped picked only the outlined rectangle and the extruded
ellipse; it now also picks the outline-only rectangle on its rim and the
wall on its face, seen from the south. The stub picks both: a clamped
outline along its ring as a draped line of its outline width, a wall where
its panels cover the pixel.

globe.base.vector also draws roads whose join and cap are legacy zoom
functions of strings, checks that a style with no background shows the
globe through rather than black, and ends by switching to a base without
the vector style, which must draw none of it and drop its credit.
2026-11-11 19:39:26 -08:00
Sameh Khamis 748dc0a156 Cesium: revoke blob object URLs no longer drawn
The object URL store keeps its blob alive, so a blob image's URL, never
revoked, kept every blob ever drawn. A blob's URL is now revoked once it has
not been asked for in a minute with two frames drawn since (so a material,
which loads in the next frame, has started its load); images already
loading or loaded are unaffected, and a blob drawn again gets a new URL.
2026-11-11 19:34:43 -08:00
Sameh Khamis a3ffb33563 Cesium imageryFrames: frames waiting on a tile video let go fail
An evicted (or cleared) tile video is emptied, so it never loads or seeks
again, and every frame queued on it waited forever, leaving its tiles
never finished. Letting a video go now fails what waits on it, and a seek
that does not end within 10 s fails its frame.
2026-11-11 19:30:31 -08:00
Sameh Khamis 9d3e99c831 Cesium draw: a clustered icon set clusters again after setColumns
The wrapper that marks a clustered set for clustering again ran before
setColumns was assigned, so column changes never reclustered; with no rows
moving, positions or shown written by columns left the old clusters drawn.
setColumns is now assigned first and wrapped with the rest.
2026-11-11 19:29:04 -08:00
Sameh Khamis 750dab0123 Cesium vectorBase: transparent where the style paints no background; cancelled tiles not painted
The provider said it had no alpha channel, so a style with no or a
translucent background drew black there. And its requestImage ignored the
Cesium request, so tiles of a removed layer were still painted once their
source tiles arrived; a cancelled request now aborts the paint.
2026-11-11 19:28:13 -08:00
Sameh Khamis 09d1133d90 vectorBase: evaluate as the style specification does; leave out features with no value
- A legacy function without a type is exponential only on a property that
  interpolates and interval on any other (line-join, text-transform, ...);
  a property function with string outputs is no longer categorical.
- step over what is not a number fails, leaving the feature out.
- has, get and legacy filters see a feature's own properties, never
  inherited names such as toString.
- A value that comes to null, undefined or NaN leaves the feature out
  instead of being written to the canvas, which ignored it and drew the
  last feature's colour or width.
- A layer's labels are placed in their features' order, as MapLibre
  places them, not reversed.
2026-11-11 19:27:33 -08:00
Sameh Khamis 72d8dd606d setBase: the last call wins; an overtaken or disposed one changes nothing
A vector setBase awaited its style before changing anything, with no
generation guard, so a slow earlier call landed over a later one, and one
in flight at disposal rejected. Cesium and the stub now count calls like
setPhotoreal and setTerrain, abort the overtaken style load, and resolve
an overtaken call with imagery: [] and settled: false.
2026-11-11 19:25:04 -08:00
Sameh Khamis 5fae3cf485 Draw vectorBase: a MapLibre style's vector tiles painted as imagery
src/render/vectorBase/ is a Cesium-free painter: loadVectorStyle loads
a style and its TileJSON sources and compiles its layers (skipping, with a
reason, what it does not draw), and paintVectorTile paints a Web Mercator
tile on a canvas: background, fill, line and circle layers with filters in
both syntaxes, legacy functions and a listed subset of expressions, and
symbol text labels placed clear of each other inside the tile. Sources are
decoded with pbf and @mapbox/vector-tile, already dependencies. The Cesium
port loads the style before changing the base, draws it as Web Mercator
imagery under the base's other imagery, credits its sources, and claims
vectorBase; the stub loads the style. globe.base.vector serves a style and
tile from data URLs and reads the drawn fill.
2026-11-11 18:24:49 -08:00
Sameh Khamis d9ad7da9d5 GPU icon sets cluster their rows where their segments put them
clusterScreenPoints over each GPU set's shown rows at the frame's
motion-clock time (on their ground when clamped), the members' rows hidden
and one icon a cluster drawn at its seed's size in the set's cluster
billboards, picked as each member. Clustered again after the camera moves
or the set changes (setColumns included), and every frame while rows still
move. Conformance checks take several capabilities; draw.motion.cluster
clusters members that come to rest on their segments.
2026-11-11 18:09:38 -08:00
Sameh Khamis 933969b7da GPU icons draw offsets, anchors, rotations, fades, display ranges and clamped heights
Each row reads its extras from a float texture by instance (texelFetch on
gl_InstanceID), so the 16 vertex attributes hold: pixel offset, vertical
anchor, screen rotation and aligned axis (turned as billboards turn),
fadeByDistance, displayRange, and a ground mode with the heights under its
segment's two ends. Clamped rows are sampled after a frame draws, budgeted
across the port's sets (terrain first, then the drawn surface), and again
when the globe's tiles finish loading. WebGL 1 still refuses these; GPU sets
still refuse clustering. The stub picks icons offset, anchored, turned and
clamped to its ellipsoid, and draw.motion.look checks each on a moving icon.
2026-11-11 17:58:40 -08:00