@bencevans/xyz-intersect

1.0.0 • Public • Published

@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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    8

Package Sidebar

Install

npm i @bencevans/xyz-intersect

Weekly Downloads

4

Version

1.0.0

License

GPLv3

Unpacked Size

13.4 kB

Total Files

6

Last publish

Collaborators

  • bencevans