Package-level declarations

Types

Link copied to clipboard
class BitmapPackage(val bitmap: Bitmap, val texNum: Int, val id: String)

This is used for the early demo, will not be used in the final product

Link copied to clipboard
class DataPool
Link copied to clipboard
Link copied to clipboard

Runtime data provider backing one or more com.xweather.mapsgl.layers.tile.MapLayer instances.

Link copied to clipboard
typealias DataType = EncodedTimeSeriesData
Link copied to clipboard
class EncodedGridVectorTileSource(val id: String, encodedSource: XweatherEncodedTileSource, gridSpacing: Double, iconEncodedColorScale: ColorScaleOptions? = null, iconEncodedScalarMax: Double? = null, val timelineMeldInvalidatesMapboxTiles: Boolean = true, instancedQuadMonochromeWhite: Boolean = false) : VectorTileSource

Sidecar vector source for gridded/symbol layers backed by XweatherEncodedTileSource.

Link copied to clipboard

GPU uniform values for encoded-tile UV math (512 data + border padding in a square texture). Keep in sync with DataPool; fragment shaders read these via com.xweather.mapsgl.gl.programs.TriangleProgram.

Link copied to clipboard
open class EncodedTileSource(val id: String, var authenticator: XweatherAuthenticator? = null) : TileSource<DataType>

EncodedTileSource.kt

Link copied to clipboard

Runtime GeoJSON data source for map layers that consume geographic features (points, lines, polygons).

Link copied to clipboard
class ImageTileSource(val id: String, typeString: String, val authenticator: XweatherAuthenticator?) : TileSource<TileData>

ImageTileSource.kt

Link copied to clipboard
Link copied to clipboard
class PaddingManager(val size: Int, val padding: Int, val tileCache: TileCache<DataType>, val id: String)
Link copied to clipboard

This will be merged with DataSourceEvents

Link copied to clipboard
data class RequestOptions(val dataSetId: String, val dataMin: Double, val dataMax: Double, val outputMin: Double, val outputMax: Double, val outputNoDataValue: Double? = null, val validTimes: MutableList<Date>? = null)
Link copied to clipboard
open class RequestTileSuccess<DataType : TileData>

Result of an internal tile request: either new Data or a signal that the tile is already cached.

Link copied to clipboard
Link copied to clipboard

SourceMetadata.kt

Link copied to clipboard
Link copied to clipboard
interface TileDataParser

Decodes raw HTTP bytes into a typed TileData subclass for a given source.

Link copied to clipboard
abstract class TileSource<DataType : TileData> : DataSource

Base DataSource for tiled products: URL templates, zoom range, metadata, and a TileRequestManager.

Link copied to clipboard
typealias TileType = Tile<DataType>
Link copied to clipboard
class VectorData(val validTime: Date, val features: MutableList<Feature>) : TileData
Link copied to clipboard
Link copied to clipboard
data class VisibleGeoBounds(val west: Double, val south: Double, val east: Double, val north: Double)

Geographic rectangle in degrees (WGS84), same convention as Mapbox camera bounds.

Link copied to clipboard

XweatherEncodedTileSource.kt

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val TAG: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Alias for DataSource.kind (matches JS naming type).

Functions

Link copied to clipboard
fun calculateSignedArea(polygon: List<Point>): Double
Link copied to clipboard
fun <DataType : TileData> TileSource<DataType>.contains(coord: TileCoord): Boolean
Link copied to clipboard
fun getLatLonBoundsOfTile(tile: TileCoord): LatLonBounds

Calculates the geographic latitude/longitude bounding box for a given tile.

Link copied to clipboard
fun getTileBounds(tile: TileCoord): List<Point>
Link copied to clipboard
fun <DataType : TileData> TileSource<DataType>.init(id: String, authenticator: Authenticator<MediaSession.Token>?)
Link copied to clipboard
fun List<Point>.isClockwise(): Boolean
Link copied to clipboard

Checks if a polygon's vertices are in counter-clockwise (CCW) order. Assumes longitude as x and latitude as y. Conventionally, a positive signed area from the shoelace formula indicates CCW.

Link copied to clipboard
Link copied to clipboard
fun List<Point>.reversedIfClockwise(): List<Point>

Reverses the list if its winding order is clockwise. Useful for ensuring a polygon ring is counter-clockwise (e.g., GeoJSON outer rings).

Link copied to clipboard
fun List<Point>.reversedIfCounterClockwise(): List<Point>

Reverses the list if its winding order is counter-clockwise. Useful for ensuring a polygon ring is clockwise (e.g., GeoJSON inner rings/holes).

Link copied to clipboard