@mapbox/timespace
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "@mapbox/timespace", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "compute fuzzy local time from a location", | ||
@@ -8,2 +8,3 @@ "main": "index.js", | ||
"@mapbox/tilebelt": "^1.0.1", | ||
"@mapbox/tile-cover": "^3.0.2", | ||
"d3-queue": "^3.0.3", | ||
@@ -10,0 +11,0 @@ "mkdirp": "^0.5.1", |
@@ -69,15 +69,16 @@ /** | ||
try { | ||
cover.tiles(zone.geometry, opts).forEach(function(tile) { | ||
var id = tile.join('/'); | ||
var poly = turf.polygon(tilebelt.tileToGeoJSON(tile).coordinates); | ||
cover.tiles(zone.geometry, opts).forEach(function(tile) { | ||
var id = tile.join('/'); | ||
var poly = turf.polygon(tilebelt.tileToGeoJSON(tile).coordinates); | ||
try { | ||
var overlap = turf.area(turf.intersect(zone, poly)); | ||
if (!tiles[id] || tiles[id].overlap < overlap) | ||
tiles[id] = {name: zone.properties.tzid, overlap: overlap}; | ||
}); | ||
} catch (e) { | ||
console.log('Error detected:', e.message, '; skipping zone'); | ||
} | ||
} catch (e) { | ||
console.log('Error detected: ' + e.message + '; zone: ' + zone.properties.tzid + '; tile: ' + id); | ||
} | ||
}); | ||
zonesDone++; | ||
@@ -84,0 +85,0 @@ console.info('Processed', zonesDone + '/' + totalZones) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
161177013
17
0
9
+ Added@mapbox/tile-cover@^3.0.2
+ Added@mapbox/tile-cover@3.0.2(transitive)