From ea83cad204b28c7ed4f6ac4ccbd62a98766c5f7b Mon Sep 17 00:00:00 2001 From: Jesse Crocker Date: Wed, 1 Nov 2023 16:34:18 -0600 Subject: [PATCH 1/2] Set projection on bbox coordinates --- Sources/GISTools/GeoJson/BoundingBox.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/GISTools/GeoJson/BoundingBox.swift b/Sources/GISTools/GeoJson/BoundingBox.swift index 29eaf79..f82946e 100644 --- a/Sources/GISTools/GeoJson/BoundingBox.swift +++ b/Sources/GISTools/GeoJson/BoundingBox.swift @@ -47,8 +47,8 @@ public struct BoundingBox: self.projection = coordinates.first?.projection ?? .epsg4326 - var southWest = Coordinate3D(latitude: .infinity, longitude: .infinity) - var northEast = Coordinate3D(latitude: -.infinity, longitude: -.infinity) + var southWest = Coordinate3D(latitude: .infinity, longitude: .infinity, projection: projection) + var northEast = Coordinate3D(latitude: -.infinity, longitude: -.infinity, projection: projection) for currentLocation in coordinates { let currentLocationLatitude = currentLocation.latitude From 1fb0d99808bf69841f6b9ca1e30f85f5b25584b4 Mon Sep 17 00:00:00 2001 From: Jesse Crocker Date: Wed, 1 Nov 2023 16:36:59 -0600 Subject: [PATCH 2/2] use correct initializer --- Sources/GISTools/GeoJson/BoundingBox.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/GISTools/GeoJson/BoundingBox.swift b/Sources/GISTools/GeoJson/BoundingBox.swift index f82946e..4e71413 100644 --- a/Sources/GISTools/GeoJson/BoundingBox.swift +++ b/Sources/GISTools/GeoJson/BoundingBox.swift @@ -47,8 +47,8 @@ public struct BoundingBox: self.projection = coordinates.first?.projection ?? .epsg4326 - var southWest = Coordinate3D(latitude: .infinity, longitude: .infinity, projection: projection) - var northEast = Coordinate3D(latitude: -.infinity, longitude: -.infinity, projection: projection) + var southWest = Coordinate3D(x: .infinity, y: .infinity, projection: projection) + var northEast = Coordinate3D(x: -.infinity, y: -.infinity, projection: projection) for currentLocation in coordinates { let currentLocationLatitude = currentLocation.latitude