1.0.0 • Published 5 years ago

@bencevans/xyz-intersect v1.0.0

Weekly downloads
1
License
GPLv3
Repository
github
Last release
5 years ago

@bencevans/xyz-intersect

Find Slippy Map / XYZ Tiles that cover a GeoJSON Feature.

Example

> const findTiles = require('@bencevans/xyz-intersect')

> const zoom = 10

> findTiles.fromPoint(geojsonPointFeature, zoom)
[ 510, 340 ]

> findTiles.fromPolygon(geojsonPolygonFeature, zoom)
[ [ 32680, 21784 ], [ 32681, 21784 ], [ 32682, 21784 ] ]

> findTiles.toGeoJSON(
    findTiles.fromPolygon(geojsonPolygonFeature, zoom)
  )
# Outputs GeoJSON representation of each of the tiles.

Licence

GPL-3.0