{"id":49745551,"url":"https://github.com/gistrec/geo-utils-cpp","last_synced_at":"2026-05-12T04:00:39.352Z","repository":{"id":187165215,"uuid":"221438895","full_name":"gistrec/geo-utils-cpp","owner":"gistrec","description":"Header-only C++ library for geographic (lat/lng) calculations: distance, bearing, area, point-in-polygon and path proximity","archived":false,"fork":false,"pushed_at":"2026-05-07T19:57:03.000Z","size":169,"stargazers_count":42,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-05-07T20:37:56.690Z","etag":null,"topics":["bearing","computational-geometry","cpp","geodesy","geometry","geospatial","gis","gps","haversine","header-only","latitude-longitude","navigation","point-in-polygon","spherical-geometry"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gistrec.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-13T11:01:04.000Z","updated_at":"2026-05-07T20:10:50.000Z","dependencies_parsed_at":"2023-08-09T08:25:17.707Z","dependency_job_id":null,"html_url":"https://github.com/gistrec/geo-utils-cpp","commit_stats":null,"previous_names":["gistrec/cpp-geometry-library","gistrec/geo-utils","gistrec/geo-utils-cpp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gistrec/geo-utils-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gistrec%2Fgeo-utils-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gistrec%2Fgeo-utils-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gistrec%2Fgeo-utils-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gistrec%2Fgeo-utils-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gistrec","download_url":"https://codeload.github.com/gistrec/geo-utils-cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gistrec%2Fgeo-utils-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32922890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"online","status_checked_at":"2026-05-12T02:00:06.338Z","response_time":102,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bearing","computational-geometry","cpp","geodesy","geometry","geospatial","gis","gps","haversine","header-only","latitude-longitude","navigation","point-in-polygon","spherical-geometry"],"created_at":"2026-05-10T04:00:21.041Z","updated_at":"2026-05-12T04:00:39.346Z","avatar_url":"https://github.com/gistrec.png","language":"C++","funding_links":[],"categories":["C++","Software"],"sub_categories":["Geospatial"],"readme":"# geo-utils-cpp\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://github.com/gistrec/geo-utils-cpp/actions/workflows/ci.yml\"\u003e\n        \u003cimg src=\"https://github.com/gistrec/geo-utils-cpp/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/gistrec/geo-utils-cpp/actions/workflows/vcpkg.yml\"\u003e\n        \u003cimg src=\"https://github.com/gistrec/geo-utils-cpp/actions/workflows/vcpkg.yml/badge.svg\" alt=\"vcpkg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://app.codacy.com/gh/gistrec/geo-utils-cpp/dashboard\"\u003e\n      \u003cimg src=\"https://img.shields.io/codacy/grade/bcff544711544d5fb7da95b68abf566d\" alt=\"Code quality\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/gistrec/geo-utils-cpp\"\u003e\n      \u003cimg src=\"https://codecov.io/gh/gistrec/geo-utils-cpp/graph/badge.svg\" alt=\"Coverage\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/gistrec/geo-utils-cpp/releases\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/gistrec/geo-utils-cpp\" alt=\"Release\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"#\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/C%2B%2B-17-blue\" alt=\"C++17\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/CMake-3.14%2B-064F8C?logo=cmake\u0026logoColor=white\" alt=\"CMake 3.14+\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/header--only-yes-brightgreen\" alt=\"Header-only\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/platform-Linux%20%C2%B7%20macOS%20%C2%B7%20Windows-brightgreen\" alt=\"Supported platforms\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/gistrec/geo-utils-cpp/blob/master/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/gistrec/geo-utils-cpp?color=brightgreen\" alt=\"License\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nHeader-only C++17 library for geographic (lat/lng) geometry (no dependencies).\n\nProvides utilities for distance, bearing, polygon area, point-in-polygon, and\npath proximity checks on Earth coordinates.\n\nAPI inspired by Google Maps geometry utilities.\nUses spherical Earth approximation (like Google Maps).\n\n## Features\n\n* **`geo::` spherical functions** — distance, bearing, area, interpolation\n* **`geo::` polygon functions** — point-in-polygon, path proximity, distance to segments\n\n## Why use this library?\n\n- Lightweight and header-only (no dependencies)\n- Simple API for common GPS/lat-lng calculations\n- Suitable for backend, GIS, navigation and tracking systems\n\n## When not to use\n\n- If you need high-precision geodesic calculations on an ellipsoid\n- If you need advanced spatial indexing (use S2 / CGAL instead)\n\n## Installation\n\n### FetchContent (recommended)\n\n```cmake\ninclude(FetchContent)\n\nFetchContent_Declare(\n    GeoUtilsCpp\n    GIT_REPOSITORY https://github.com/gistrec/geo-utils-cpp.git\n    GIT_TAG        v1.0.1\n)\nFetchContent_MakeAvailable(GeoUtilsCpp)\n\ntarget_link_libraries(your_target PRIVATE geo::utils)\n```\n\n### vcpkg\n\n```sh\nvcpkg install geo-utils-cpp\n```\n\nThen in your `CMakeLists.txt`:\n\n```cmake\nfind_package(GeoUtilsCpp 1.0.1 REQUIRED)\ntarget_link_libraries(your_target PRIVATE geo::utils)\n```\n\n### find_package\n\n```cmake\nfind_package(GeoUtilsCpp 1.0.1 REQUIRED)\ntarget_link_libraries(your_target PRIVATE geo::utils)\n```\n\n### Manual\n\nCopy the `include/` directory into your project and add it to your include path.\n\nFor more details see [docs/getting-started.md](docs/getting-started.md).\n\n## Usage\n\n```cpp\n#include \u003ciostream\u003e\n\n#include \u003cgeo/spherical.hpp\u003e\n\nint main() {\n    geo::LatLng newYork = { 40.7128, -74.0060 };\n    geo::LatLng london  = { 51.5074,  -0.1278 };\n\n    double distance = geo::distance_between(newYork, london);\n    double heading  = geo::heading(newYork, london);\n\n    std::cout \u003c\u003c \"Distance: \" \u003c\u003c distance / 1000.0 \u003c\u003c \" km\\n\";\n    std::cout \u003c\u003c \"Heading:  \" \u003c\u003c heading \u003c\u003c \" deg\\n\";\n}\n```\n\n## API Reference\n\nSee [docs/api.md](docs/api.md) for the full API reference.\n\n## Support\n\n[Please open an issue on GitHub](https://github.com/gistrec/geo-utils-cpp/issues)\n\n## License\n\nLicensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgistrec%2Fgeo-utils-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgistrec%2Fgeo-utils-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgistrec%2Fgeo-utils-cpp/lists"}