TurbulencePolygonsQuery
public struct TurbulencePolygonsQuery
Use TurbulencePolygonsQuery
to get filtered data as a GeoJSON string.
It will query locally cached data received previously.
Used in SkyPath.turbulencePolygons(with:)
.
-
An altitude range to query. Should be round to a thousand feet.
The default is 0…52000. Measured in feet.
Declaration
Swift
public let altRange: ClosedRange<Double>
-
How to provide queried data.
The default is
geoJSON
.Declaration
Swift
public let resultOptions: TurbulencePolygonsResultOptions
-
History time to query data for.
When it’s
nil
theSkyPath.dataHistoryTime
value is used. Optional.Declaration
Swift
public var dataHistoryTime: DataHistoryTime?
-
Turbulence severities to query.
When it’s
nil
theDataQuery.sevs
will be used. Optional.Declaration
Swift
public var sevs: [TurbulenceSeverity]?
-
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
DataQuery
configuration. So if the polygons are different there could be no data available locally.Declaration
Swift
public var polygon: [CLLocationCoordinate2D]?
-
Default initializer.
Declaration
Swift
public init(altRange: ClosedRange<Double> = 0...52000, resultOptions: TurbulencePolygonsResultOptions = .geoJSON, dataHistoryTime: DataHistoryTime? = nil)
Parameters
altRange
An altitude range to query. The default is 0…52000. Measured in feet.
resultOptions
See
TurbulencePolygonsResultOptions
for available options. The default isgeoJSON
.dataHistoryTime
History time to query data. When it’s
nil
theSkyPath.dataHistoryTime
value is used. Optional.