xyzpdq
XYZ lookup that is pretty dang quick.
Usage
Install it:
npm install xyzpdq --save
Check if an XYZ tile coordinate is in Canada:
var xyzpdq = ; // Assuming `canada` is GeoJSON representing Canadavar lookup = ; // Check if tile coordinate x: 88, y: 175, z: 9 is in Canadalookup; // true // Check if tile coordinate x: 88, y: 176, z: 9 is in Canadalookup; // false
The xyzpdq
function takes any GeoJSON object and returns an object with a intersects
method that can be used to determine if an x, y, z tile coordinate intersects the provided GeoJSON.