skytracker.storage.queries.state.LatestBatchMapQuery#
- class skytracker.storage.queries.state.LatestBatchMapQuery(limit: int = 0, lat_min: float | None = None, lat_max: float | None = None, lon_min: float | None = None, lon_max: float | None = None)#
Bases:
TableQuery[MapState]Query to select the latest aircraft simple map states (with optional bounding box)
Properties
allows_cachefieldsMethods
Initialize query with optional arguments
Filter a cached list of states using stored settings
Query a list of states from server database
Parse raw table data into a simple map state
- __init__(limit: int = 0, lat_min: float | None = None, lat_max: float | None = None, lon_min: float | None = None, lon_max: float | None = None) None#
Initialize query with optional arguments
- Parameters:
limit (int, optional) – maximum number of states to get (0=all). Defaults to 0.
lat_min (float, optional) – minimum latitude. Defaults to None.
lat_max (float, optional) – maximum latitude. Defaults to None.
lon_min (float, optional) – minimum longitude. Defaults to None.
lon_max (float, optional) – maximum longitude. Defaults to None.
- async from_cache(states: list[State]) list[MapState]#
Filter a cached list of states using stored settings
- async from_server(table: str, db: DatabaseManager) list[MapState]#
Query a list of states from server database
- Parameters:
table (str) – name of database table
db (DatabaseManager) – database manager instance
- Returns:
selected list of simple map states
- Return type:
list[MapState]