Encoded Grid Vector Tile Source
Sidecar vector source for gridded/symbol layers backed by XweatherEncodedTileSource.
Mapbox requests geometry per tile via requestTile; features are placed on a global Web Mercator world-pixel grid (512×2^zoom) for even screen spacing. Wind uses G/B u/v (atan2(u,-v); sampleFieldsFromEncodedRgb). Maritime *_dir.fill (instancedQuadMonochromeWhite) uses blue-only scalar degrees like JS EXPRESSION_ANGLE (norm * 360 - 180, wrapped to 0–360°).
Constructors
Properties
True when metadata exposes valid times and tiles should cache multiple intervals per z/x/y. Excludes isAdminSource — static OSM/basemap products (open-street-map*) reuse the same "layers" + "validTimes" JSON shape as interval weather vectors (hail-threats, road-wx, lightning-threat-zones) but are not per-interval-tiled. Treating those basemaps as time-series pulls place labels / roads into the playback gate; their tiles are never cached under a playback interval, so resolveVectorTileData fails forever and stalls every layer via the shared readiness map. Weather products that share this metadata shape must remain time-series so timeline play can swap /vector/{code}/{time}/… tiles.
High-level source family (raster, encoded, vector, …).
com.xweather.mapsgl.map.MapController.mapSessionId that owns in-flight / ready tile bookkeeping.
MVT layer name values from product metadata (e.g. fires-obs for fires observation points).
Retain raw MVT bytes in native memory for time-series tiles (rules 6 & 7).
Mapbox symbol overlays need timeline meld invalidation so custom-geometry tiles refetch blended icons. Instanced GL wind barbs meld on the GPU (com.xweather.mapsgl.anim.Timeline.dataMeld) and skip this work.
Optional interval filter for time-series products; drives tile requests with timeline state.
Alias for DataSource.kind (matches JS naming type).
Valid times from product metadata; drives interval time-series tile caching.
Functions
Register a layer that should receive updates when this source loads or changes.
Invoked on the tile decode thread after each successful parse, after glStencilMaskTileListener.
Ensures parseVectorTile includes sourceLayerTag in decoded MVT layers (refcounted).
Used by prepareTileRequest() to increment or decremnet the time and reformate it for sources with time offets
Rebuilds the CPU palette used for instanced wind barb/arrow RGB when SamplePaint.colorScale or SamplePaint.encodedScalarNormMax changes. Safe to call when reusing a cached gridVector sidecar source.
Packed instanced wind barbs: endpoint phase A and B only (no Timeline.dataMeld in sampling). Matches encoded raster layers: the GPU applies dataMeld each frame so timeline crossfade stays smooth without rebuilding this buffer at playback frame rate.
Cached tile coords at zoom z that already hold parsed VectorData. Used when viewport enumeration yields no coords but MVTs have loaded (e.g. alert point legends).
Cancels every queued/active time-series download (e.g. before playback gate at z−1).
Cancels in-flight MVT downloads outside keepSpatialHashes (rule 5).
Clears every raw-path declaration for consumerLayerId (e.g. on layer removal).
Demo/debug-only: raw MVT byte size retained for one intervalMs of the spatial tile at coord. Time-series sources retain raw bytes per interval in mvtNativeCache (see storeNativeMvtBytes), so this is both the download and stored size for that interval. Null when this source isn't time-series or that interval's bytes were trimmed/never fetched.
Demo/debug-only: epoch-ms time intervals with parsed data currently cached for the spatial tile at coord, sorted ascending. Null when this source isn't a time-series source (there's only ever one interval per tile); empty when the tile hasn't been fetched yet.
Demo/debug-only: where coord currently sits in the fetch/parse pipeline. DebugTileStage.DOWNLOADED_NOT_PROCESSED is normally short-lived (parsing happens inline right after a successful fetch) but can persist under load, e.g. while multiple tiles wait on vectorParseSemaphore for a free decode slot.
See neededPropertyKeysByConsumerLayerId. Pass null to clear a previously-declared restriction.
Returns the metadata for the source, which can be loaded from a remote source.
Finds a cached vector tile by nominal z/x/y. Tries the validTime key first, then scans the cache so draws still resolve tiles after subtle key drift (e.g. time format rounding).
True when the spatial time-series tile already holds parsed data for intervalMs.
Retained MVT bytes exist but VectorTimeSeriesData has no parsed snapshot yet.
Count of (spatial tile, interval) MVT HTTP requests actively downloading.
Data inspector for maritime *_dir.fill: bilinear sample at lon/latDeg using the same placement zoom as buildInstancedWindBufferDualPhase (stablePlacementZoomInt\(mapZoom\)), then vector-blend phases like the GPU. Nearest-neighbor tile bytes in EncodedTileLayer do not match instanced sampling.
Plain ISO-8601 for URL path {time} segments (encoded tile GET). Cache keys and POST validTimes still use bracketed ["…"] strings.
convert from \"2025-04-22T03:49:31Z\" to 20250422030000
Timeline-only invalidation: keep cached placement geometry, refresh only sampled icon properties.
True while any time-series tile HTTP requests are still in flight.
True when consumerLayerId currently declares itself raw-path eligible for any tile layer.
Same feature generation as the Mapbox sidecar path, merged for OpenGL instanced drawing (no Mapbox vector layer).
Pins z/x/y's MVT bytes for intervalMs against native-cache eviction — see pinFillTriangulationNative for the eviction-priority semantics this declares.
Unregister a layer previously added with addConsumer.
Declares whether consumerLayerId currently allows the raw fast path for tileLayerName. null means the consumer has no sourceLayer restriction (matches whichever tile-layer it ends up needing) — stored under a wildcard key so rawPathEligibleForLayer can still resolve it against any concrete tile-layer name.
Epoch ms key used for MVT fetch and VectorTimeSeriesData lookup.
JS GridPaint.spacing is in logical px; instanced gridded placement uses authored × density × 0.5 (same density convention as com.xweather.mapsgl.renderers.GridLayerRenderer icon sizing). Safe when reusing a cached sidecar: bumps spacing and invalidates placement caches when the effective value changes.