Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tile-cover

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tile-cover - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

32

index.js
var isInside = require('turf-inside'),
bboxPolygon = require('turf-bbox-polygon'),
intersect = require('turf-intersect')
bboxPolygon = require('turf-bbox-polygon'),
intersect = require('turf-intersect');

@@ -12,4 +12,4 @@ module.exports.geojson = function(geom, limits) {

var tileFeatures = locked.map(function(t){
return tileToGeojson(t)
var tileFeatures = locked.map(function(t) {
return tileToGeojson(t);
});

@@ -19,3 +19,3 @@ return {

features: tileFeatures
}
};
}

@@ -84,3 +84,3 @@

splitSeek(t, geom, locked, limits);
})
});
} else if(tileCovers){

@@ -112,3 +112,3 @@ locked.push(tile);

properties: {}
}
};
}

@@ -120,3 +120,3 @@

features: [feat]
}
};
}

@@ -130,3 +130,3 @@

[tile[0]*2, tile[1]*2+1, tile[2]+1],
]
];
}

@@ -137,15 +137,15 @@

if(tile[0]%2===0 && tile[1]%2===0){
return [tile[0]/2, tile[1]/2, tile[2]-1]
return [tile[0]/2, tile[1]/2, tile[2]-1];
}
// bottom left
else if((tile[0]%2===0) && (!tile[1]%2===0)){
return [tile[0]/2, (tile[1]-1)/2, tile[2]-1]
return [tile[0]/2, (tile[1]-1)/2, tile[2]-1];
}
// top right
else if((!tile[0]%2===0) && (tile[1]%2===0)){
return [(tile[0]-1)/2, (tile[1])/2, tile[2]-1]
return [(tile[0]-1)/2, (tile[1])/2, tile[2]-1];
}
// bottom right
else {
return [(tile[0]-1)/2, (tile[1]-1)/2, tile[2]-1]
return [(tile[0]-1)/2, (tile[1]-1)/2, tile[2]-1];
}

@@ -155,3 +155,3 @@ }

function getSiblings(tile){
return getChildren(getParent(tile))
return getChildren(getParent(tile));
}

@@ -166,3 +166,3 @@

}
})
});
return hasAll;

@@ -177,3 +177,3 @@ }

}
})
});
return tileFound;

@@ -180,0 +180,0 @@ }

{
"name": "tile-cover",
"version": "0.1.1",
"version": "0.1.2",
"description": "generate the minimum number of tiles to cover a geojson geometry",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc