{"_id":"@buildtheearth/projection","_rev":"2-53b8a175ac65a7c647ed7a316945aea5","name":"@buildtheearth/projection","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@buildtheearth/projection","version":"1.0.1","license":"MIT","_id":"@buildtheearth/projection@1.0.1","maintainers":[{"name":"xboxbedrock","email":"xboxbedrock@gmail.com"},{"name":"nudelsuppe42","email":"jufo.theo@gmail.com"}],"homepage":"https://github.com/BuildTheEarth/projection","dist":{"shasum":"518c3e8a9be86e1beb504aa2c3f4219ff7ab2423","tarball":"https://registry.npmjs.org/@buildtheearth/projection/-/projection-1.0.1.tgz","fileCount":40,"integrity":"sha512-t/vDBGRm/ultd6w2dPj7n3r2FboWuH0Yn9CJqfLrda0S8wKKOGY4ZqkGGYpahOj1yoJ2o+izB7ob01Jl7WunMQ==","signatures":[{"sig":"MEQCIE9IXpA30s4L9qzAyJ5gme9RBIANHAFvdf2lNpSQX8MxAiBmV7apYZBoxg+Eh7NH2E0LQUUk6nMcB4XGc64rh+NduQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86648},"main":"lib/index.js","types":"lib/index.d.ts","authors":["BuildTheEarth","Robin Ferch"],"gitHead":"960c8af34c9649ca63d01a04be6fbd0150207d53","scripts":{"test":"vitest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"nudelsuppe42","email":"jufo.theo@gmail.com"},"_npmVersion":"10.9.7","description":"Multilanguage implementation of the BuildTheEarth projection","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5","ts-node":"^10.9.1","typescript":"^4.9.4","@types/node":"^18.19.100"},"_npmOperationalInternal":{"tmp":"tmp/projection_1.0.1_1777230353882_0.4873483138071004","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@buildtheearth/projection","version":"1.0.2","description":"Multilanguage implementation of the BuildTheEarth projection","main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/BuildTheEarth/projection.git"},"scripts":{"build":"tsc","prepare":"npm run build","test":"vitest"},"authors":["BuildTheEarth","Robin Ferch"],"license":"MIT","homepage":"https://github.com/BuildTheEarth/projection","devDependencies":{"@types/node":"^18.19.100","ts-node":"^10.9.1","typescript":"^4.9.4","vitest":"^4.1.5"},"gitHead":"130a1dca27893c4c3af13dc24ae81ef73f7db85a","_id":"@buildtheearth/projection@1.0.2","bugs":{"url":"https://github.com/BuildTheEarth/projection/issues"},"_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-6pMMRD+P5Nu5Hw2XueqZKyw8UcDfiv5fmH/D9gxTKK/hpQGsCrFTLFAPjofKal1jusvIHqiVYwuoojUa1o5p9w==","shasum":"b393d86cc932f50d01d9b79a10659582593db9c3","tarball":"https://registry.npmjs.org/@buildtheearth/projection/-/projection-1.0.2.tgz","fileCount":38,"unpackedSize":76874,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@buildtheearth%2fprojection@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICR9KWx+nZXDiep/AJEuBjfu2zGtwaOlMRdGlXE1AHfJAiB4RU08rPIZAOyMJxADDLah9c/l+40V7jeMTKIzHe5KxA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:29f1a23f-9eaf-47e5-9cf1-09cbbd7c4c22"}},"directories":{},"maintainers":[{"name":"xboxbedrock","email":"xboxbedrock@gmail.com"},{"name":"nudelsuppe42","email":"jufo.theo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/projection_1.0.2_1777401846198_0.431263656238309"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-26T19:05:53.720Z","modified":"2026-04-28T18:44:06.639Z","1.0.1":"2026-04-26T19:05:54.023Z","1.0.2":"2026-04-28T18:44:06.343Z"},"license":"MIT","homepage":"https://github.com/BuildTheEarth/projection","description":"Multilanguage implementation of the BuildTheEarth projection","maintainers":[{"name":"xboxbedrock","email":"xboxbedrock@gmail.com"},{"name":"nudelsuppe42","email":"jufo.theo@gmail.com"}],"readme":"<!-- markdownlint-disable -->\n<div align=\"center\">\n\n<img width=\"128\" src=\"https://github.com/BuildTheEarth/assets/blob/main/logos/logo_tools.gif?raw=true\" />\n\n# @BuildTheEarth/projection\n\n_Typescript implementation of the BuildTheEarth projection._\n\n![official](https://go.buildtheearth.net/official-shield)\n[![chat](https://img.shields.io/discord/706317564904472627.svg?color=768AD4&label=discord&logo=https%3A%2F%2Fdiscordapp.com%2Fassets%2F8c9701b98ad4372b58f13fd9f65f966e.svg)](https://discord.gg/buildtheearth)\n\n</div>\n<!-- markdownlint-restore -->\n\n## Usage\n\nThe package exports two functions, `toGeo` and `fromGeo`. You can find their usage below:\n\n### `toGeo`\n\nConverts Minecraft `x` and `z` coordinates to geographical `lat` and `lon` pairs.\n\n```ts\nimport { toGeo } from \"@buildtheearth/projection\";\n\n// or: const minecraftCoordinates = {x: 4411832, z: -4736410};\nconst minecraftCoordinates = [4411832, -4736410];\n\n// or: const geographicalCoordinates = toGeo(minecraftCoordinates, {returnObject: true});\nconst geographicalCoordinates = toGeo(minecraftCoordinates);\n\nconsole.log(geographicalCoordinates); // [49.55843154291236, 22.810606562070433]\n// {lat: 49.55843154291236, lon: 22.810606562070433}\n```\n\n### `fromGeo`\n\nConverts geographical `lat` and `lon` coordinates to Minecraft `x` and `z` pairs.\n\n```ts\nimport { fromGeo } from \"@buildtheearth/projection\";\n\n// or: const geographicalCoordinates = {lat: 49.55843154291236, lon: 22.810606562070433};\nconst geographicalCoordinates = [49.55843154291236, 22.810606562070433];\n\n// or: const minecraftCoordinates = toGeo(geographicalCoordinates, {returnObject: true});\nconst minecraftCoordinates = fromGeo(geographicalCoordinates);\n\nconsole.log(minecraftCoordinates); //[4411832, -4736410]\n// {x: 4411832, z: -4736410}\n```\n\n## Contribute\n\nThis package is part of [a repository](https://github.com/BuildTheEarth/projection) containing the implementation of the projection in different languages. If you want to contribute a new language, please read thru the [specification](core-spec/SPECIFICATION.md).\n","readmeFilename":"README.md","repository":{"type":"git","url":"git+https://github.com/BuildTheEarth/projection.git"},"bugs":{"url":"https://github.com/BuildTheEarth/projection/issues"}}