Xweather Encoded Tile Source
XweatherEncodedTileSource.kt
A subclass of EncodedTileSource that is used to request and process encoded tile data from the MapsGL server.
Based on the IOS version.
Author
Jason Suto 01/08/24
Types
Properties
High-level source family (raster, encoded, vector, …).
com.xweather.mapsgl.map.MapController.mapSessionId that owns in-flight / ready tile bookkeeping.
Optional interval filter for time-series products; drives tile requests with timeline state.
Client-side transform for derived products, copied from com.xweather.mapsgl.sources.source.spec.EncodedSourceDescriptor.transformerId. Null for ordinary sources, which skip the transform step entirely.
Alias for DataSource.kind (matches JS naming type).
Functions
Register a layer that should receive updates when this source loads or changes.
Used by prepareTileRequest() to increment or decremnet the time and reformate it for sources with time offets
Stops downloads for tiles that are no longer in keepSpatialKeys. Keys are TileCoord.hashShort. Ancestors the camera is still using as a fallback belong in the keep set.
Returns the data range for the specified channel.
Never throws for a load failure: the result reaches TilePyramid and TileLayer on the main dispatcher, where an escaped exception kills the host app. SourceMetadata.load rethrows com.xweather.mapsgl.error.AuthenticationError (a java.lang.Error), so this catches Throwable. Cancellation still propagates.
Test function to detect color format of image
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
Returns the metadata for the specified channel, if available.
Removes a consumer. When it was the last one, releases the source's downloads, decoded pixels and fold state: with no layer left, a decoded tile is never bound, so its pixels would otherwise stay on the Java heap (~1.1 MB per tile per interval) for the life of the map.