99import Foundation
1010
1111/// Representation of a [GeoJSON](https://geojson.org) document
12- public struct GeoJSON : Hashable {
13-
12+ public struct GeoJSON : Hashable , @ unchecked Sendable {
13+
1414 /// A latitude or longitude in degrees. Should use `WGS84`.
1515 public typealias Degrees = Double
1616
@@ -31,7 +31,7 @@ public struct GeoJSON: Hashable {
3131 /// A GeoJSON object may represent a region of space (a Geometry), a
3232 /// spatially bounded entity (a Feature), or a list of Features (a
3333 /// FeatureCollection).
34- public enum GeoJSONObject : Hashable {
34+ public enum GeoJSONObject : Hashable , Sendable {
3535 /// A region of space
3636 case geometry( GeometryObject )
3737
@@ -45,7 +45,7 @@ public struct GeoJSON: Hashable {
4545 /// GeoJSON supports the following geometry types:
4646 /// Point, LineString, Polygon, MultiPoint, MultiLineString,
4747 /// MultiPolygon, and GeometryCollection.
48- public enum GeometryObject : Hashable {
48+ public enum GeometryObject : Hashable , Sendable {
4949 /// A single region of space
5050 case single( Geometry )
5151
@@ -133,7 +133,7 @@ public struct GeoJSON: Hashable {
133133 }
134134
135135 /// The type of a GeoJSON, representing the value of the top-level "type" field in the JSON
136- public enum GeoJSONType : String , Codable , CaseIterable {
136+ public enum GeoJSONType : String , Codable , CaseIterable , Sendable {
137137 case feature = " Feature "
138138 case featureCollection = " FeatureCollection "
139139 case point = " Point "
@@ -146,7 +146,7 @@ public struct GeoJSON: Hashable {
146146 }
147147
148148 /// A GeoJSON Position, with latitude, longitude and optional altitude
149- public struct Position : Hashable {
149+ public struct Position : Hashable , Sendable {
150150 public var latitude : Degrees
151151 public var longitude : Degrees
152152 public var altitude : Distance ?
@@ -183,7 +183,7 @@ public struct GeoJSON: Hashable {
183183 }
184184 }
185185
186- public struct LineString : Hashable {
186+ public struct LineString : Hashable , Sendable {
187187 public var positions : [ Position ]
188188
189189 // We precompute this as it's static, but slow to re-compute
@@ -202,8 +202,8 @@ public struct GeoJSON: Hashable {
202202 }
203203 }
204204
205- public struct Polygon : Hashable {
206- public struct LinearRing : Hashable {
205+ public struct Polygon : Hashable , Sendable {
206+ public struct LinearRing : Hashable , Sendable {
207207 public var positions : [ Position ]
208208
209209 // We precompute this as it's static, but slow to re-compute
@@ -273,7 +273,7 @@ public struct GeoJSON: Hashable {
273273 }
274274 }
275275
276- public enum Geometry : Hashable {
276+ public enum Geometry : Hashable , Sendable {
277277 // identified by coordinates + geometries
278278
279279 case point( Position )
@@ -317,7 +317,7 @@ public struct GeoJSON: Hashable {
317317 }
318318
319319 /// Features in GeoJSON contain a Geometry object and additional properties.
320- public struct Feature : Hashable {
320+ public struct Feature : Hashable , @ unchecked Sendable {
321321 public var geometry : GeometryObject
322322
323323 /// Optional properties, as a dictionary.
@@ -355,7 +355,7 @@ public struct GeoJSON: Hashable {
355355 }
356356 }
357357
358- public struct BoundingBox : Hashable {
358+ public struct BoundingBox : Hashable , Sendable {
359359 public let southWesterlyLatitude : Degrees
360360 public let southWesterlyLongitude : Degrees
361361 public let northEasterlyLatitude : Degrees
0 commit comments