{"id":23510832,"url":"https://github.com/danielkov/geodaisy","last_synced_at":"2025-07-08T03:37:00.335Z","repository":{"id":40307214,"uuid":"248739548","full_name":"danielkov/geodaisy","owner":"danielkov","description":"🌎Geolocation related algorithms for browser and web","archived":false,"fork":false,"pushed_at":"2025-04-30T19:31:29.000Z","size":2927,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T20:37:04.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielkov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-20T11:32:00.000Z","updated_at":"2022-01-11T00:27:41.000Z","dependencies_parsed_at":"2024-04-19T23:30:20.331Z","dependency_job_id":"eb2d754a-91a5-4d8b-8862-9bd060538dba","html_url":"https://github.com/danielkov/geodaisy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fgeodaisy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fgeodaisy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fgeodaisy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fgeodaisy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielkov","download_url":"https://codeload.github.com/danielkov/geodaisy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990504,"owners_count":21995776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T12:12:33.176Z","updated_at":"2025-05-13T17:17:20.025Z","avatar_url":"https://github.com/danielkov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌎Geodaisy - simple geodesic utilities for NodeJS and Web\n\n## Get started\n\n```bash\nnpm install geodaisy\n```\n\nUsage in JavaScript or TypeScript (typings are available):\n\n### Distance utilities - Haversine\n\nUses the [Haversine Formula](https://en.wikipedia.org/wiki/Haversine_formula) to calculate the distance between two earthly points of coordinates.\n\n```ts\nimport { haversine } from 'geodaisy';\n\nconst atlanta = {\n  latitude: 33.749,\n  longitude: -84.388,\n};\n\nconst london = {\n  latitude: 51.5074,\n  longitude: -0.1278,\n};\n\nconst distance = haversine(\n  atlanta.longitude,\n  atlanta.latitude,\n  london.longitude,\n  london.latitude,\n);\n\nconsole.log(distance); // \u003e 6769.949658450232\n```\n\n### Distance utilities - distanceWithLatitude\n\nGiven a distance as a number (this formula does not care about units) and the distance between the elevation change between two points - calculates the real distance between the two points in a straight line, e.g.:\n\n```ts\nimport { distanceWithLatitude } from 'geodaisy';\n\nconst distance = 13800; // m\nconst elevation = 1120; // m\n\nconst realDistance = distanceWithLatitude(distance, elevation);\n\nconsole.log(realDistance); // \u003e 13845.374678931588\n```\n\n### Conversion utilities\n\nThe following conversion utilities are also available:\n\n```ts\nimport {\n  kmToMile,\n  mileToKm,\n  yardToMetre,\n  metreToYard,\n  inchToCm,\n  cmToInch,\n} from 'geodaisy';\n\nconsole.log(kmToMile(1)); // \u003e 0.621371\nconsole.log(mileToKm(1)); // \u003e 1.6093444978925633\nconsole.log(yardToMetre(1)); // \u003e 0.9144\nconsole.log(metreToYard(1)); // \u003e 1.0936132983377078\nconsole.log(inchToCm(1)); // \u003e 2.54\nconsole.log(cmToInch(1)); // \u003e 0.39370078740157477\n```\n\n### Missing features\n\nThe following features I'd love to have in this library but just don't have the time to implement yet. If you'd like to help, feel free to contribute!\n\n- [ ] Bearing calculation\n- [ ] Destination point calculation\n- [ ] Intersection calculation\n- [ ] Path finding\n- [ ] Closest point to the poles\n- [ ] Rhumb lines\n- [ ] Vincenty's formula\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fgeodaisy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielkov%2Fgeodaisy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fgeodaisy/lists"}