{"_id":"@bridgerb/horizon","_rev":"3-8c9b8d0d72203710b7e77b8d5fabc6b4","name":"@bridgerb/horizon","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@bridgerb/horizon","version":"1.0.0","keywords":["horizon","elevation","terrain","gdal","geotiff","solar"],"author":{"name":"BridgerB"},"license":"Unlicense","_id":"@bridgerb/horizon@1.0.0","maintainers":[{"name":"bridgerb","email":"git@bridgerb.com"}],"homepage":"https://github.com/BridgerB/horizon#readme","bugs":{"url":"https://github.com/BridgerB/horizon/issues"},"dist":{"shasum":"3ec4b1c5a861370510d166ab04be84f670b16bbd","tarball":"https://registry.npmjs.org/@bridgerb/horizon/-/horizon-1.0.0.tgz","fileCount":12,"integrity":"sha512-9OjX7VmrbjXkx28RtIf7Hr17L3sfAI9k4Syxkj3B7ATupAFGW5aDDvdelIxeWYba6wyXdGbKHctXzGnQ2yLdag==","signatures":[{"sig":"MEYCIQCdd4f2SD5Cu2zCyeWrsqSrQzDIu4w/QYv8ZeyxObqmowIhANAGhJxNZ2E+dAQpMnoar4AKn1psU1LAaAAKCcvWTWJq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7043},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"gitHead":"6b8ee9b6c25c18d29fa98abcd42c61e1ebf0d011","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"bridgerb","email":"git@bridgerb.com"},"repository":{"url":"git+https://github.com/BridgerB/horizon.git","type":"git"},"_npmVersion":"11.6.2","description":"Calculate 360-degree horizon elevation angles from elevation data","directories":{},"_nodeVersion":"24.12.0","dependencies":{"proj4":"^2.20.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^22.0.0"},"peerDependencies":{"gdal-async":">=3.8.0"},"_npmOperationalInternal":{"tmp":"tmp/horizon_1.0.0_1766946714251_0.17194422546563826","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bridgerb/horizon","version":"1.0.3","keywords":["horizon","elevation","terrain","gdal","geotiff","solar"],"author":{"name":"BridgerB"},"license":"Unlicense","_id":"@bridgerb/horizon@1.0.3","maintainers":[{"name":"bridgerb","email":"git@bridgerb.com"}],"homepage":"https://github.com/BridgerB/horizon#readme","bugs":{"url":"https://github.com/BridgerB/horizon/issues"},"dist":{"shasum":"3d6e64ec577a68e1f7238f9ddd251894fe5dc86f","tarball":"https://registry.npmjs.org/@bridgerb/horizon/-/horizon-1.0.3.tgz","fileCount":12,"integrity":"sha512-2ThzaB6fdKab5uk4EwWRvaZg98wJwaSRNWEcSTrJcmzTHVBESBai46fLMYigSFjG0/PqxhDHi+joo6i8TBGVtA==","signatures":[{"sig":"MEUCIE0iwZGwafAp1y/+Z4ryjrW1KmJg6pH8Wq7rvEEfuWIBAiEAvu+MCkYjXOtF+Ay+3AqFCsQi1XC+WQMgmMa8T+Jk5Rk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bridgerb%2fhorizon@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7382},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"gitHead":"620d9baab889062617aa3bcc48481ce19d945e90","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:884786f7-a210-44b3-9c9e-d77faf51c8c1"}},"repository":{"url":"git+https://github.com/BridgerB/horizon.git","type":"git"},"_npmVersion":"11.7.0","description":"Calculate 360-degree horizon elevation angles from elevation data","directories":{},"_nodeVersion":"22.21.1","dependencies":{"proj4":"^2.20.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^22.0.0"},"peerDependencies":{"gdal-async":">=3.8.0"},"_npmOperationalInternal":{"tmp":"tmp/horizon_1.0.3_1766951639536_0.0795711967609789","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bridgerb/horizon","version":"2.0.0","description":"Calculate 360-degree horizon elevation angles from elevation data","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"keywords":["horizon","elevation","terrain","gdal","geotiff","solar"],"author":{"name":"BridgerB"},"license":"Unlicense","repository":{"type":"git","url":"git+https://github.com/BridgerB/horizon.git"},"engines":{"node":">=22"},"peerDependencies":{"gdal-async":">=3.8.0"},"dependencies":{"proj4":"^2.20.2"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.9.3"},"gitHead":"e60eae4f9666028427237c6ef67cf4a7d2b3e45a","_id":"@bridgerb/horizon@2.0.0","bugs":{"url":"https://github.com/BridgerB/horizon/issues"},"homepage":"https://github.com/BridgerB/horizon#readme","_nodeVersion":"22.21.1","_npmVersion":"11.7.0","dist":{"integrity":"sha512-9Hisy/EDJPPUb7m8vCaV4M7ykT1rKK/0TViIlOtolH7YDI5AYn3acNh3ekpS/pdIRDTtw2brVYSSl8f9cu8Nlg==","shasum":"1a9d06cc851dc734bb1250ccbbc87f64302adc12","tarball":"https://registry.npmjs.org/@bridgerb/horizon/-/horizon-2.0.0.tgz","fileCount":12,"unpackedSize":12918,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bridgerb%2fhorizon@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDM53yOwdYH1FsFEhMGLdVysVHAT6bBNHNSImxo3rdr7wIhAMmgEhIJBgmQGxFbhE+8fACbg8zMAfnz0Ccv7UqESX6D"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:884786f7-a210-44b3-9c9e-d77faf51c8c1"}},"directories":{},"maintainers":[{"name":"bridgerb","email":"git@bridgerb.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/horizon_2.0.0_1766992599996_0.9180154976686732"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-28T18:31:54.165Z","modified":"2025-12-29T07:16:40.524Z","1.0.0":"2025-12-28T18:31:54.390Z","1.0.3":"2025-12-28T19:53:59.669Z","2.0.0":"2025-12-29T07:16:40.149Z"},"bugs":{"url":"https://github.com/BridgerB/horizon/issues"},"author":{"name":"BridgerB"},"license":"Unlicense","homepage":"https://github.com/BridgerB/horizon#readme","keywords":["horizon","elevation","terrain","gdal","geotiff","solar"],"repository":{"type":"git","url":"git+https://github.com/BridgerB/horizon.git"},"description":"Calculate 360-degree horizon elevation angles from elevation data","maintainers":[{"name":"bridgerb","email":"git@bridgerb.com"}],"readme":"# Calculate 360-degree horizon elevation angles from GeoTIFF elevation data.\n\n## Requirements\n\n- Node.js 22+\n- GDAL (`brew install gdal` / `apt install gdal-bin`)\n\n## Install\n\n```bash\nnpm install @bridgerb/horizon gdal-async\n```\n\n## Usage\n\n```typescript\nimport { loadElevationData } from \"@bridgerb/horizon\";\n\nconst elevation = await loadElevationData(\"path/to/elevation.tif\");\n\nconst horizon = elevation.calculateHorizon(40.311259, -111.659330);\n// Returns 360 results, one per degree\n\nconst partial = elevation.calculateHorizon(40.311259, -111.659330, 45, 135);\n// Only directions 45° to 135°\n```\n\n## API\n\n### loadElevationData(tifPath: string): Promise\\<ElevationData\\>\n\nLoads a GeoTIFF elevation file. Call once, then query many times.\n\n### ElevationData.calculateHorizon(lat, lng, start?, end?): HorizonResult[]\n\n- `lat` - Latitude in degrees\n- `lng` - Longitude in degrees\n- `start` - Start direction (default: 0)\n- `end` - End direction (default: 359)\n\n### HorizonResult\n\n- `direction` - Compass direction in degrees (0 = North)\n- `elevationAngleDegrees` - Angle to horizon\n- `distance_km` - Distance to horizon point\n\n## License\n\nUnlicense - Public Domain\n","readmeFilename":"README.md"}