Skip to content

Commit

Permalink
Added BoundingBox.tileCover(atZoom:)
Browse files Browse the repository at this point in the history
  • Loading branch information
trasch committed May 23, 2024
1 parent 7509168 commit 19ff21b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/GISTools/Algorithms/RhumbDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Foundation
extension Coordinate3D {

/// Returns the destination coordinate having travelled the given distance along a Rhumb line from the
/// origin with the (varant) given bearing.
/// origin with the given bearing.
///
/// - Parameters:
/// - distance: The distance from the receiver, in meters
Expand Down Expand Up @@ -51,7 +51,7 @@ extension Coordinate3D {
}

// Returns the destination point having travelled along a rhumb line from origin point the given
// distance on the given bearing.
// distance with the given bearing.
// Adapted from Geodesy: http://www.movable-type.co.uk/scripts/latlong.html#rhumblines
private static func calculateRhumbDestination(
from: Coordinate3D,
Expand Down Expand Up @@ -100,7 +100,7 @@ extension Coordinate3D {
extension Point {

/// Returns the destination coordinate having travelled the given distance along a Rhumb line from the
/// origin with the (varant) given bearing.
/// origin with the given bearing.
///
/// - Parameters:
/// - distance: The distance from the receiver, in meters
Expand Down
8 changes: 8 additions & 0 deletions Sources/GISTools/Algorithms/TileCover.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ extension GeoJson {
}

}

extension BoundingBox {

public func tileCover(atZoom zoom: Int) -> [MapTile] {
boundingBoxPolygon.tileCover(atZoom: zoom)
}

}

0 comments on commit 19ff21b

Please sign in to comment.