{"id":19412778,"url":"https://github.com/techshot25/haversine.jl","last_synced_at":"2026-06-20T10:32:00.742Z","repository":{"id":46973315,"uuid":"336417342","full_name":"techshot25/Haversine.jl","owner":"techshot25","description":"Greater Circle tools for Julia to be used for fast and broadcastable geospatial calculations using spherical coordinates","archived":false,"fork":false,"pushed_at":"2021-09-19T19:58:40.000Z","size":25,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T14:39:33.392Z","etag":null,"topics":["geospatial","haversine","julia"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/techshot25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-05T23:56:35.000Z","updated_at":"2023-11-25T23:36:58.000Z","dependencies_parsed_at":"2022-08-28T14:02:51.678Z","dependency_job_id":null,"html_url":"https://github.com/techshot25/Haversine.jl","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techshot25%2FHaversine.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techshot25%2FHaversine.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techshot25%2FHaversine.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techshot25%2FHaversine.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techshot25","download_url":"https://codeload.github.com/techshot25/Haversine.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240593169,"owners_count":19825930,"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":["geospatial","haversine","julia"],"created_at":"2024-11-10T12:28:12.414Z","updated_at":"2026-06-20T10:32:00.714Z","avatar_url":"https://github.com/techshot25.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haversine.jl\n\n[![Build status](https://ci.appveyor.com/api/projects/status/r28nu7ghasrwgwcj?svg=true)](https://ci.appveyor.com/project/techshot25/haversine-jl)\n[![codecov](https://codecov.io/gh/techshot25/Haversine.jl/branch/master/graph/badge.svg?token=W0VM6KD0CW)](https://codecov.io/gh/techshot25/Haversine.jl)\n\n---\n\nHaversine (Great Circle) distance tools for Julia\n\nThis project contains helper geospatial tools using Haversine which assume a perfectly spherical earth to compute special geospatial functions. All the functions included are using pairwise distance and will require mapping to work on arrays. Contributions are welcome, submit a PR and I will review it as soon as I can.\n\n### HaversineDistance\nThis uses the great circle distance to find the approximate distance between two coordinates assuming a perfectly spherical earth\n\n```julia\nusing Haversine\n\np1 = GeoLocation(λ=1, ϕ=2)\np2 = GeoLocation(3, 4) # (lon, lat) in degrees\n\n# returns distance in meters\nHaversineDistance(p1, p2)\n\u003e\u003e\u003e 314283.25507368386\n```\n\n### HaversineBearing\nThis returns the bearing/heading between from point 1 to point 2 in degrees\n\n```julia\nusing Haversine\n\np1 = GeoLocation(λ=1, ϕ=2)\np2 = GeoLocation(3, 4)\n\n# returns heading in degrees\nHaversineBearing(p1, p2)\n\u003e\u003e\u003e 44.91272645906142\n```\n\n### HaversineDestination\nGiven a point, bearing, and distance, show the coordinates of the final destination\n\n```julia\nusing Haversine\n\np = [1, 2] # (lon, lat) in degrees\nθ = 30 # heading in degrees\nd = 2 # distance in meters\n\n# returns destination coordinates as Array[lon, lat]\nHaversineDestination(p, θ, d)\n\u003e\u003e\u003e 2-element Array{Float64,1}:\n\u003e\u003e\u003e  1.0000089986979082\n\u003e\u003e\u003e  2.000015576707113\n```\n\n### Broadcasting\nAll functions as of version 1.0.0 can now support broadcasting. Arguments can broadcast to support array-like inputs\n\n```julia\nusing Haversine\n\np = GeoLocation(5, 4) # initial location\nθ = [30, 60] # multiple headings\nd = [10, 900000] # destination for each heading\n\nHaversineDestination(p, θ, d)\n\u003e\u003e\u003e 2-element Vector{GeoLocation}:\n\u003e\u003e\u003e  GeoLocation(5.000045075887166, 4.0000778835344555)\n\u003e\u003e\u003e  GeoLocation(12.072951161820168, 8.006647216172182\n```\n\n```julia\nusing Haversine\n\np1 = [GeoLocation(1, 2), GeoLocation(3, 4)] # multiple points\np2 = [GeoLocation(5, 1), GeoLocation(0, 9)]\n\nHaversineBearing(p1, p2)\n\u003e\u003e\u003e 2-element Array{Float64,1}:\n\u003e\u003e\u003e  103.98283865771535\n\u003e\u003e\u003e  -30.644744331249175\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechshot25%2Fhaversine.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechshot25%2Fhaversine.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechshot25%2Fhaversine.jl/lists"}