{"name":"@mapbox/tilebelt","version":"2.0.1","keywords":["tile","map","geojson"],"author":{"name":"morganherlocker"},"license":"MIT","_id":"@mapbox/tilebelt@2.0.1","maintainers":[{"name":"mbx-npm-ci-production","email":"yannick.meeus+npm+production+ci@mapbox.com"},{"name":"mbx-npm-ci-staging","email":"yannick.meeus+npm+staging+ci@mapbox.com"},{"name":"mbx-npm-advanced-actions-production","email":"yannick.meeus+npm+prod+advanced+actions@mapbox.com"},{"name":"mbx-npm-advanced-actions-staging","email":"yannick.meeus+npm+staging+advanced+actions@mapbox.com"},{"name":"mbx-npm-09-production","email":"yannick.meeus+npm+prod+09@mapbox.com"},{"name":"mbx-npm-08-production","email":"yannick.meeus+npm+prod+08@mapbox.com"},{"name":"mbx-npm-07-production","email":"yannick.meeus+npm+prod+07@mapbox.com"},{"name":"mbx-npm-06-production","email":"yannick.meeus+npm+prod+06@mapbox.com"},{"name":"mbx-npm-05-production","email":"yannick.meeus+npm+prod+05@mapbox.com"},{"name":"mbx-npm-04-production","email":"yannick.meeus+npm+prod+04@mapbox.com"},{"name":"mbx-npm-03-production","email":"yannick.meeus+npm+prod+03@mapbox.com"},{"name":"mbx-npm-02-production","email":"yannick.meeus+npm+prod+02@mapbox.com"},{"name":"mbx-npm-01-production","email":"yannick.meeus+npm+prod+01@mapbox.com"},{"name":"mbx-npm-02-staging","email":"yannick.meeus@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-07","email":"accounts+npmjs-07@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-05","email":"accounts+npmjs-05@mapbox.com"},{"name":"mapbox-npm-06","email":"accounts+npmjs-06@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-advanced-actions","email":"accounts+npmjs-advanced-actions@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-admin","email":"accounts@mapbox.com"},{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"}],"homepage":"https://github.com/mapbox/tilebelt","bugs":{"url":"https://github.com/mapbox/tilebelt/issues"},"dist":{"shasum":"f97a27d2db61f8c5437562f1309264301c11fb8a","tarball":"http://registry-npm.ywwl.com/@mapbox/tilebelt/download/@mapbox/tilebelt-2.0.1.tgz","fileCount":9,"integrity":"sha512-bd3WIqyR/5e2v7BvE4jtB3tWKNB0xaMisiLKoEPiBtAR8LGnNARmiRo9oN53P9ivCeYKvaf3eptjyC4zvGSYPA==","signatures":[{"sig":"MEUCIQDbGWJRh/+r+U4ynVQrIr2bDQ9ZNaYh1PQkCKpxrztyQwIgfn9pSZAzHW8Dvv2vGPNwKuTemUa3dWG2AwlP7dmt8JA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52208,"size":11414,"noattachment":false,"key":"/@mapbox/tilebelt/-/@mapbox/tilebelt-2.0.1.tgz"},"type":"module","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"gitHead":"72fb86caf137af108b767b79b768c5c550b4553c","scripts":{"test":"vitest --config ./vitest.config.ts --coverage run","bench":"ts-node test/bench.ts","build":"npm run clean && npm run build-cjs && npm run build-esm","clean":"rm -rf ./dist","format":"npx prettier src test --write --single-quote","build-cjs":"tsc -p . --module commonjs --outDir ./dist/cjs && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json","build-esm":"tsc -p . --module nodenext --outDir ./dist/esm && echo '{\"type\": \"module\"}' > ./dist/esm/package.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},"repository":{"url":"git+https://github.com/mapbox/tilebelt.git","type":"git"},"_npmVersion":"10.8.2","description":"simple tile utilities","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.1","ts-node":"^10.9.2","typescript":"^5.6.2","benchmarkify":"^4.0.0","@types/geojson":"^7946.0.14","@vitest/coverage-v8":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/tilebelt_2.0.1_1731984782560_0.508512804867578","host":"s3://npm-registry-packages"},"readme":"# tilebelt\n\n[![Run tests](https://github.com/mapbox/tilebelt/actions/workflows/test.yml/badge.svg)](https://github.com/mapbox/tilebelt/actions/workflows/test.yml)\n\nsimple [tile](http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) utilities\n\n## install\n\n```bash\nnpm install @mapbox/tilebelt\n```\n\n## usage\n\n```js\nimport * as tilebelt from '@mapbox/tilebelt';\n\nconst tile = [10, 15, 8] // x,y,z\n\ntilebelt.tileToGeoJSON(tile);\n// {\n//   \"type\": \"Polygon\",\n//   \"coordinates\": [\n//     [\n//       [ -165.9375, 82.8533822917608 ],\n//       [ -165.9375, 82.67628497834903 ],\n//       [ -164.53125, 82.67628497834903 ],\n//       [ -164.53125, 82.8533822917608 ],\n//       [ -165.9375, 82.8533822917608 ]\n//     ]\n//   ]\n// }\n\ntilebelt.getParent(tile);\n// [ 5, 7, 7 ]\n```\n\n## features\n\nfunction | description\n---|---\n`tileToGeoJSON(tile)` | get a geojson representation of a tile\n`tileToBBOX(tile)` | get the bbox of a tile\n`bboxToTile(bbox)` | get the smallest tile to cover a bbox\n`getChildren(tile)` | get the 4 tiles one zoom level higher\n`getParent(tile)` | get the tile one zoom level lower\n`getSiblings(tile)` | get the 4 sibling tiles for a tile\n`hasSiblings(tiles, tile)` | check to see if an array of tiles contains a tiles siblings\n`hasTile(tiles, tile)` | check to see if an array of tiles contains a particular tile\n`tilesEqual(tile1, tile2)` | check to see if two tiles are the same\n`tileToQuadkey(tile)` | get the quadkey for a tile\n`quadkeyToTile(quadkey)` | get the tile for a quadkey\n`pointToTile(lon, lat, zoom)` | get the tile for a point at a specified zoom level\n`pointToTileFraction(lon, lat, zoom)` | get the precise fractional tile location for a point at a zoom level\n\n## developing\n\n```sh\nnpm ci          # install deps\nnpm test        # tests\nnpm run bench   # run benchmarks\nnpm run format  # format using prettier\n```\n","publish_time":1731984782803,"_cnpm_publish_time":1731984782803,"dist-tags":{"dev":"2.0.0-dev.1","latest":"2.0.3"}}