Skip to content

Commit

Permalink
Merge pull request #35 from JesseCrocker/bounding-box-projection
Browse files Browse the repository at this point in the history
Set coordinate projection when creating a bounding box from a list of coordinates
  • Loading branch information
trasch authored Nov 2, 2023
2 parents 8e9d269 + 1fb0d99 commit 0e77a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/GISTools/GeoJson/BoundingBox.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(x: .infinity, y: .infinity, projection: projection)
var northEast = Coordinate3D(x: -.infinity, y: -.infinity, projection: projection)

for currentLocation in coordinates {
let currentLocationLatitude = currentLocation.latitude
Expand Down

0 comments on commit 0e77a34

Please sign in to comment.