{"id":15536503,"url":"https://github.com/turbo87/flat-projection-rs","last_synced_at":"2025-04-13T09:44:07.154Z","repository":{"id":28762532,"uuid":"119263188","full_name":"Turbo87/flat-projection-rs","owner":"Turbo87","description":"Fast geodesic distance approximations via flat surface projection","archived":false,"fork":false,"pushed_at":"2025-03-19T10:02:19.000Z","size":57,"stargazers_count":20,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T01:11:27.346Z","etag":null,"topics":["geospatial","projection","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Turbo87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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},"funding":{"github":"Turbo87","custom":"https://paypal.me/tobiasbieniek"}},"created_at":"2018-01-28T13:58:55.000Z","updated_at":"2024-05-04T01:54:05.000Z","dependencies_parsed_at":"2023-01-14T09:31:27.523Z","dependency_job_id":"0da8aabb-93fd-4fda-91d3-e60ae4873fff","html_url":"https://github.com/Turbo87/flat-projection-rs","commit_stats":{"total_commits":74,"total_committers":8,"mean_commits":9.25,"dds":0.5,"last_synced_commit":"e97a8acf1b7384777ad3bff2f8f1323cc0c3b9ce"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turbo87%2Fflat-projection-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turbo87%2Fflat-projection-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turbo87%2Fflat-projection-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turbo87%2Fflat-projection-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Turbo87","download_url":"https://codeload.github.com/Turbo87/flat-projection-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248694086,"owners_count":21146931,"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","projection","rust"],"created_at":"2024-10-02T11:52:12.746Z","updated_at":"2025-04-13T09:44:07.122Z","avatar_url":"https://github.com/Turbo87.png","language":"Rust","funding_links":["https://github.com/sponsors/Turbo87","https://paypal.me/tobiasbieniek"],"categories":[],"sub_categories":[],"readme":"\nflat-projection\n==============================================================================\n\n[![Build Status](https://travis-ci.org/Turbo87/flat-projection-rs.svg?branch=master)](https://travis-ci.org/Turbo87/flat-projection-rs)\n\nFast geodesic distance approximations via flat surface projection\n\nThe `FlatProjection` struct can by used to project geographical\ncoordinates from [WGS84] into a cartesian coordinate system.\nIn the projected form approximated distance and bearing calculations\ncan be performed much faster than on a sphere. The precision of these\ncalculations is very precise for distances up to about 500 km.\n\n[WGS84]: https://en.wikipedia.org/wiki/World_Geodetic_System\n\n\nUsage\n------------------------------------------------------------------------------\n\n```rust\nextern crate flat_projection;\n\nuse flat_projection::FlatProjection;\n\nfn main() {\n    let (lon1, lat1) = (6.186389, 50.823194);\n    let (lon2, lat2) = (6.953333, 51.301389);\n\n    let proj = FlatProjection::new(51.05);\n\n    let p1 = proj.project(lon1, lat1);\n    let p2 = proj.project(lon2, lat2);\n\n    let distance = p1.distance(\u0026p2);\n    // -\u003e 75.648 km\n}\n```\n\n\nBenchmark\n------------------------------------------------------------------------------\n\n```\n$ cargo bench\n\ndistance/flat           time:   [322.21 ps 323.82 ps 326.41 ps]\ndistance/haversine      time:   [12.604 ns 12.831 ns 13.162 ns]\ndistance/vincenty       time:   [346.79 ns 348.00 ns 349.61 ns]\n```\n\nAccording to these results the flat surface approximation is about 40x faster\nthan the [Haversine] formula.\n\n[Haversine]: https://en.wikipedia.org/wiki/Haversine_formula\n\n\nRelated\n------------------------------------------------------------------------------\n\n- [cheap-ruler] – Similar calculations in JavaScripts\n- [cheap-ruler-cpp] – C++ port of cheap-ruler\n\n[cheap-ruler]: https://github.com/mapbox/cheap-ruler\n[cheap-ruler-cpp]: https://github.com/mapbox/cheap-ruler-cpp\n\n\nLicense\n-------------------------------------------------------------------------------\n\nThis project is released under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturbo87%2Fflat-projection-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturbo87%2Fflat-projection-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturbo87%2Fflat-projection-rs/lists"}