Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let package = Package(
name: "mvt-tools",
platforms: [
.iOS(.v15),
.macOS(.v13),
.macOS(.v14),
.tvOS(.v15),
.watchOS(.v8),
],
Expand All @@ -19,9 +19,9 @@ let package = Package(
targets: ["MVTTools"]),
],
dependencies: [
.package(url: "https://github.com/Outdooractive/gis-tools", from: "1.13.0"),
.package(url: "https://github.com/Outdooractive/gis-tools", from: "1.13.2"),
.package(url: "https://github.com/1024jp/GzipSwift.git", from: "5.2.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.6.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.6.1"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.6.4"),
.package(url: "https://github.com/apple/swift-protobuf", from: "1.30.0"),
],
Expand Down
3 changes: 2 additions & 1 deletion Sources/MVTTools/Merge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ extension VectorTile {
}

for layerName in other.layerNames {
guard let features = other.features(for: layerName) else { continue }
let features = other.features(for: layerName)
guard features.isNotEmpty else { continue }

appendFeatures(features, to: layerName)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/MVTTools/VectorTile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ extension VectorTile {
extension VectorTile {

/// Returns an array of GeoJson Features from the given layer
public func features(for layerName: String) -> [Feature]? {
layers[layerName]?.features
public func features(for layerName: String) -> [Feature] {
layers[layerName]?.features ?? []
}

/// Replace or add a layer with `features`
Expand Down
53 changes: 0 additions & 53 deletions Tests/MVTToolsTests/ArrayExtensionsTests.swift

This file was deleted.

Loading
Loading