{"name":"@mapbox/tilebelt","version":"2.0.2","keywords":["tile","map","geojson"],"author":{"name":"morganherlocker"},"license":"MIT","_id":"@mapbox/tilebelt@2.0.2","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":"8176d82a05541acee8104fe1d280981ebd8d4b7a","tarball":"http://registry-npm.ywwl.com/@mapbox/tilebelt/download/@mapbox/tilebelt-2.0.2.tgz","fileCount":9,"integrity":"sha512-pzFgrmsCUjOAAeYns1MKJ1dJICYdEC+sYwtWLdxO7iJwmDlepGrEXDqP9ejApO/YUVctA/SYKDS4Oc0mBNNLZw==","signatures":[{"sig":"MEYCIQCEqroeKu86H3BcWyH8XhGbeEhyCfjYi5/4bMlP4jlX2wIhAM2pdXVG0CEhS0kv8WE1wAMgTc/jAd+jDVo7C/WzNXRZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52186,"size":11411,"noattachment":false,"key":"/@mapbox/tilebelt/-/@mapbox/tilebelt-2.0.2.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":"c2ce04c9938eff61683c44a571c76e7e977a3141","scripts":{"test":"vitest --config ./vitest.config.ts --coverage run","bench":"tsx test/bench.ts","build":"npm run clean && npm run build-cjs && npm run build-esm","clean":"rm -rf ./dist","format":"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","email":"accounts+npmjs@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":{"tsx":"^4.19.2","vitest":"^2.1.1","prettier":"^3.3.3","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.2_1731987293152_0.09657594645901724","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":1731987293343,"_cnpm_publish_time":1731987293343,"dist-tags":{"dev":"2.0.0-dev.1","latest":"2.0.3"}}