NowcastQuery
public struct NowcastQuery
Use NowcastQuery to get filtered data as an array of NowcastItem objects or a GeoJSON string.
It will query locally cached data received previously.
Used in SkyPath.nowcast(with:).
-
Forecast hours to return data for.
Declaration
Swift
public var hours: NowcastHours -
An altitude range to query.
Should be round to a thousand feet. The default is 0…52000. Measured in feet.
Declaration
Swift
public var altRange: ClosedRange<Double>? -
How to provide queried data.
The default is
geoJSON.Declaration
Swift
public var resultOptions: NowcastResultOptions -
Aggregate data by the tile to have only one most severe per tile.
The default is
true.Declaration
Swift
public var aggregate: Bool -
Set of tile keys generated by
Tile.keyorTile.keyByCoord.Use it to query in the specific tiles.
Declaration
Swift
public var tiles: Set<String>? -
Set of tile keys generated by
Tile.keyorTile.keyByCoord.Used to not include data in the specific tiles. Typically to show only Observed or Nowcast data in the same tile.
Declaration
Swift
public var excludeTiles: Set<String>? -
Nowcast severities to query.
When it’s
nilall will be used. Optional.Declaration
Swift
public var sevs: Set<NowcastSeverity>? -
Polygon is a geo-fence area to fetch data inside only.
Should be a closed ring. By default, it uses
DataQuery.polygon. Typically you don’t need to set it. Optional.It is possible to set a custom polygon but the query is made among the locally stored data received by
DataQueryconfiguration. So if the polygons are different there could be no data available locally.Declaration
Swift
public var polygon: [CLLocationCoordinate2D]? -
Viewport is a geo-fence area to fetch data inside only.
Should be a closed ring. By default, it uses
DataQuery.viewport. Typically you don’t need to set it. Optional.It is possible to set a custom viewport but the query is made among the locally stored data received by
DataQueryconfiguration. So if the viewports are different there could be no data available locally.Declaration
Swift
public var viewport: [CLLocationCoordinate2D]? -
Default initializer.
Declaration
Swift
public init(hours: NowcastHours = .now, altRange: ClosedRange<Double>? = nil, resultOptions: NowcastResultOptions = .geoJSON, aggregate: Bool = true, sevs: Set<NowcastSeverity>? = nil)Parameters
hoursSee
NowcastHoursfor available options. The default isnow.altRangeWhen it’s
nilall altitudes are used. Measured in feet. Optional.resultOptionsSee
NowcastResultOptionsfor available options. The default isgeoJSON.aggregateAggregate reports per tile, taking the highest severity. The default is
true.sevsNowcast severities to query. When it’s
nilall will be used. Optional.
NowcastQuery Structure Reference