{"id":21243262,"url":"https://github.com/clarisma/libgeodesk","last_synced_at":"2025-08-22T17:15:19.433Z","repository":{"id":263820996,"uuid":"887879077","full_name":"clarisma/libgeodesk","owner":"clarisma","description":"Fast and storage-efficient spatial database engine for OpenStreetMap data","archived":false,"fork":false,"pushed_at":"2025-08-19T11:22:06.000Z","size":1934,"stargazers_count":8,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T12:28:51.200Z","etag":null,"topics":["database","geodesk","geospatial","geospatial-analysis","gis","openstreetmap","osm"],"latest_commit_sha":null,"homepage":"https://docs.geodesk.com/cpp","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clarisma.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-13T12:50:43.000Z","updated_at":"2025-08-16T12:30:08.000Z","dependencies_parsed_at":"2024-11-20T13:38:24.275Z","dependency_job_id":"b7be7318-a607-42d0-87da-c6da6332c895","html_url":"https://github.com/clarisma/libgeodesk","commit_stats":null,"previous_names":["clarisma/libgeodesk"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/clarisma/libgeodesk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarisma%2Flibgeodesk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarisma%2Flibgeodesk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarisma%2Flibgeodesk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarisma%2Flibgeodesk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clarisma","download_url":"https://codeload.github.com/clarisma/libgeodesk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarisma%2Flibgeodesk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271673289,"owners_count":24800708,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"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":["database","geodesk","geospatial","geospatial-analysis","gis","openstreetmap","osm"],"created_at":"2024-11-21T01:11:18.737Z","updated_at":"2025-08-22T17:15:19.396Z","avatar_url":"https://github.com/clarisma.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://docs.geodesk.com/img/github-header.png\"\u003e\n\nGeoDesk is a fast and storage-efficient geospatial database for OpenStreetMap data. \nAlso available [for Python](http://www.github.com/clarisma/geodesk-py) and [for Java](http://www.github.com/clarisma/geodesk).\n\n## Why GeoDesk?\n\n- **Small storage footprint** \u0026mdash; GeoDesk's GOL files are only 20% to 50% larger than the original OSM data in PBF format \u0026mdash; that's less than a tenth of the storage consumed by a traditional SQL-based database.\n\n- **Fast queries** \u0026mdash; typically 50 times faster than SQL. \n\n- **Fast to get started** \u0026mdash; Converting `.osm.pbf` data to a GOL is 20 times faster than an import into an SQL database. Alternatively, download pre-made data tiles for just the regions you need and automatically assemble them into a GOL.\n\n- **Intuitive API** \u0026mdash; No need for object-relational mapping; GeoDesk queries return lightweight C++ objects. Quickly discover tags, way-nodes and relation members. Get a feature's geometry, measure its length/area. \n \n- **Proper handling of relations** \u0026mdash; (Traditional geospatial databases deal with geometric shapes and require workarounds to support this unique and powerful aspect of OSM data.)\n\n- **Optional integration with GEOS** for advanced geometric operations, such as buffer, union, simplify, convex and concave hulls, Voronoi diagrams, and much more.\n\n- **Modest hardware requirements** \u0026mdash; any 64-bit Windows, Linux or MacOS system will run GeoDesk.\n\n- **Lightweight** \u0026mdash; the full query engine adds less than 250 KB and has no link-time dependencies. \n  It runs entirely in-process, no database server required.\n \n## Get Started\n\n### Requirements\n\n- [CMake](https://cmake.org/download) 3.14 or later\n- C++20 compiler with a Standard Library for Windows, Linux or MacOS\n- Java 16 or above (to run the [GOL Tool](https://docs.geodesk.com/gol))\n \n### Build \u0026 Link\n\nIf your project uses **CMake**, add this to your `CMakeLists.txt`:\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(geodesk GIT_REPOSITORY \n    https://github.com/clarisma/libgeodesk.git\n    GIT_TAG main)\nFetchContent_MakeAvailable(geodesk)\n\ntarget_link_libraries(my_program geodesk)\n```\n\nAlternatively, build GeoDesk explicitly:\n\n```\ngit clone https://github.com/clarisma/libgeodesk.git\ncd libgeodesk\nmkdir build\ncd build\ncmake ..\ncmake --build .\n```\n\n### Create a GOL\n\nCreate a Geographic Object Library based on any `.osm.pbf` file, using the \n[GOL Tool](https://www.geodesk.com/download) (Requires Java 16+).\n\nFor example:\n\n```\ngol build switzerland switzerland-latest.osm.pbf\n```\n\n### Example Application\n\nFind all the pubs in Zurich (Switzerland) and print their names:\n\n```cpp\n#include \u003cgeodesk/geodesk.h\u003e\n\nusing namespace geodesk;\n\nint main(int argc, char* argv[])\n{\n    // Open switzerland.gol\n    Features features(\"switzerland\");      \n\n    // Get the feature that represents the area of the city of Zurich\n    Feature zurich = features(\n        \"a[boundary=administrative][admin_level=8]\"\n        \"[name:en=Zurich]\").one();\n\n    // Define a set that contains nodes and areas that are pubs\n    Features pubs = features(\"na[amenity=pub]\");\n\n    // Iterate through the pubs that are contained \n    // in the area of Zurich and print their names\n    for (Feature pub: pubs.within(zurich))\n    {\n        std::cout \u003c\u003c pub[\"name\"] \u003c\u003c std::endl;\n    }\n}\n```\n\n### More Examples\n\nFind all movie theaters within 500 meters from a given point:\n\n```cpp\nFeatures movieTheaters = features(\"na[amenity=cinema]\")\n    .maxMetersFromLonLat(500, myLon, myLat);\n```\n\n*Remember, OSM uses British English for its terminology.*\n\nDiscover the bus routes that traverse a given street:\n\n```cpp\nfor (Relation route: street.parents(\"[route=bus]\"))\n{\n    std::cout \u003c\u003c route[\"ref\"] \n        \u003c\u003c \" from \" \u003c\u003c route[\"from\"] \n        \u003c\u003c \" to \" \u003c\u003c route[\"to\"] \u003c\u003c std::endl;\n}\n```\n\nCount the number of entrances of a building:\n\n```cpp\nint numberOfEntrances = building.nodes(\"[entrance]\").count();\n```\n\n## Documentation\n\n- [GeoDesk Developer's Guide](https://docs.geodesk.com/cpp)\n- [API Reference](https://cppdoc.geodesk.com)\n\n## Related Repositories\n\n- [geodesk](http://www.github.com/clarisma/geodesk) \u0026mdash; GeoDesk for Java\n- [geodesk-py](http://www.github.com/clarisma/geodesk) \u0026mdash; GeoDesk for Python\n- [gol-tool](http://www.github.com/clarisma/gol-tool) \u0026mdash; command-line utility for building, maintaining and querying GOL files\n\n---\n\n*OpenStreetMap is a trademark of the OpenStreetMap Foundation, and is used with their permission. GeoDesk is not endorsed by or affiliated with the OpenStreetMap Foundation.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarisma%2Flibgeodesk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclarisma%2Flibgeodesk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarisma%2Flibgeodesk/lists"}