{"id":41269812,"url":"https://github.com/sams96/rgeo","last_synced_at":"2026-01-23T02:22:43.225Z","repository":{"id":44933860,"uuid":"240575127","full_name":"sams96/rgeo","owner":"sams96","description":"Go package for basic, fast, local reverse geocoding","archived":false,"fork":false,"pushed_at":"2025-04-21T16:44:35.000Z","size":75203,"stargazers_count":62,"open_issues_count":2,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T06:51:36.469Z","etag":null,"topics":["geo","geolocation","go","golang","golang-package","reverse-geocoding","rgeo"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/sams96/rgeo","language":"Go","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/sams96.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}},"created_at":"2020-02-14T18:36:08.000Z","updated_at":"2025-07-10T11:42:10.000Z","dependencies_parsed_at":"2024-06-18T22:42:47.571Z","dependency_job_id":"83705867-9310-4725-8f28-0c7eb43f8ab0","html_url":"https://github.com/sams96/rgeo","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/sams96/rgeo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sams96%2Frgeo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sams96%2Frgeo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sams96%2Frgeo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sams96%2Frgeo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sams96","download_url":"https://codeload.github.com/sams96/rgeo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sams96%2Frgeo/sbom","scorecard":{"id":798047,"data":{"date":"2025-08-11","repo":{"name":"github.com/sams96/rgeo","commit":"d54b8630ed529e1515ee8ae0bcfd37ad0e2ec109"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":2,"reason":"Found 3/15 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/continuous-integration.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/sams96/rgeo/continuous-integration.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T09:35:59.359Z","repository_id":44933860,"created_at":"2025-08-23T09:35:59.359Z","updated_at":"2025-08-23T09:35:59.359Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28678152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"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":["geo","geolocation","go","golang","golang-package","reverse-geocoding","rgeo"],"created_at":"2026-01-23T02:22:42.596Z","updated_at":"2026-01-23T02:22:43.216Z","avatar_url":"https://github.com/sams96.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rgeo\n[![](https://img.shields.io/github/actions/workflow/status/sams96/rgeo/continuous-integration.yml?branch=master\u0026style=for-the-badge)](https://github.com/sams96/rgeo/actions?query=workflow%3Acontinuous-integration)\n[![](https://goreportcard.com/badge/github.com/sams96/rgeo?style=for-the-badge)](https://goreportcard.com/report/github.com/sams96/rgeo)\n[![Codecov](https://img.shields.io/codecov/c/github/sams96/rgeo?logo=codecov\u0026style=for-the-badge)](https://codecov.io/gh/sams96/rgeo)\n[![Release](https://img.shields.io/github/tag/sams96/rgeo.svg?label=release\u0026color=24B898\u0026logo=github\u0026style=for-the-badge)](https://github.com/sams96/rgeo/releases/latest)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=for-the-badge)](https://pkg.go.dev/github.com/sams96/rgeo)\n\nRgeo is a fast, simple solution for local reverse geocoding, Rather than relying\non external software or online APIs, rgeo packages all of the data it needs in\nyour binary. This means it will only ever work down to the level of cities , but\nif that's all you need then this is the library for you.\n\nRgeo uses data from [naturalearthdata.com](https://naturalearthdata.com), if\nyour coordinates are going to be near specific borders I would advise checking\nthe data beforehand (links to which are in the files). If you want to use your\nown dataset, check out\n[datagen](https://github.com/sams96/rgeo/tree/master/datagen).\n\n## Current status\n\nRgeo is not being activly developed. I will try to keep dependencies up to date\nbut no new features will be added. You can read more\n[here](https://sams96.github.io/rgeo-5-years-on) if you are interested. If you\nare looking for an alternative, I recommend:\n - [smilyorg/tinygpkg](https://github.com/smilyorg/tinygpkg) - Very nice package\n inspired by Rgeo. It uses a different approach to vastly reduce startup time at\n the cost of slightly slower queries.\n - [authenticvision/rgeo](https://github.com/authenticvision/rgeo) - The most\n active fork of Rgeo, and most of the contributions I’ve had have come from\n these guys.\nOtherwise it should be fine to keep using Rgeo with its existing features.\n\n## Key Features\n\n - **Fast** - So I haven't _actually_ benchmarked other reverse geocoding tools\n   but on my laptop rgeo can run at under 800ns/op.\n - **Local** - Rgeo doesn't require pinging some API, most of which either cost\n   money to use or have severe rate limits.\n - **Lightweight** - The rgeo repo is 32MB, which is large for a Go package but\n   compared to the 800GB needed for a full planet install of\n   [Nominatim](https://nominatim.org/release-docs/latest/admin/Installation/#hardware)\n   it's miniscule.\n\n## Installation\n\nDownload with\n\n\tgo get github.com/sams96/rgeo\n\nand add\n\n```go\nimport \"github.com/sams96/rgeo\"\n```\n\nto the top of your Go file to include it in your project.\n\n## Usage\n\n```go\nr, err := New(Provinces10, Cities10)\nif err != nil {\n\t// Handle error\n}\n\nloc, err := r.ReverseGeocode([]float64{141.35, 43.07})\nif err != nil {\n\t// Handle error\n}\n\nfmt.Println(loc)\n// Output: \u003cLocation\u003e Sapporo, Hokkaidō, Japan (JPN), Asia\n```\n\nFirst initialise rgeo using `rgeo.New`,\n```go\nfunc New(datasets ...func() []byte) (*Rgeo, error)\n```\nwhich takes any non-zero number of datasets as arguments. The included datasets\nare:\n - `Countries110` - Just country information, smallest and lowest detail of the\n   included datasets.\n - `Countries10` - The same as above but with more detail.\n - `Provinces10` - Includes province information as well as country, so can\n   still be used alone.\n - `Cities10` - Just city information, if you want provinces and/or countries as\n   well use one of the above datasets with it.\nOnce initialised you can use `ReverseGeocode` on the value returned by `New`,\nwith your coordinates to get the location information. See the [Go\nDocs](https://pkg.go.dev/github.com/sams96/rgeo) for more information on usage.\n\nThen use `ReverseGeocode` to get the location information of the given coordinate.\n\n```go\nfunc (r *Rgeo) ReverseGeocode(loc geom.Coord) (Location, error)\n```\n\nThe input is a [`geom.Coord`](https://github.com/twpayne/go-geom), which is just\na `[]float64` with the longitude in the zeroth position and the latitude in the\nfirst position (i.e. `[]float64{lon, lat}`). `ReverseGeocode` returns a\n`Location`, which looks like this:\n\n```go\ntype Location struct {\n\t// Commonly used country name\n\tCountry string `json:\"country,omitempty\"`\n\n\t// Formal name of country\n\tCountryLong string `json:\"country_long,omitempty\"`\n\n\t// ISO 3166-1 alpha-1 and alpha-2 codes\n\tCountryCode2 string `json:\"country_code_2,omitempty\"`\n\tCountryCode3 string `json:\"country_code_3,omitempty\"`\n\n\tContinent string `json:\"continent,omitempty\"`\n\tRegion    string `json:\"region,omitempty\"`\n\tSubRegion string `json:\"subregion,omitempty\"`\n\n\tProvince string `json:\"province,omitempty\"`\n\n\t// ISO 3166-2 code\n\tProvinceCode string `json:\"province_code,omitempty\"`\n\n\tCity string `json:\"city,omitempty\"`\n}\n```\n\nSo, to put it all together:\n\n```go\nr, err := rgeo.New(Countries110)\nif err != nil {\n\t// Handle error\n}\n\nloc, err := r.ReverseGeocode([]float64{0, 52})\nif err != nil {\n\t// Handle error\n}\n\nfmt.Printf(\"%s\\n\", loc.Country)\nfmt.Printf(\"%s\\n\", loc.CountryLong)\nfmt.Printf(\"%s\\n\", loc.CountryCode2)\nfmt.Printf(\"%s\\n\", loc.CountryCode3)\nfmt.Printf(\"%s\\n\", loc.Continent)\nfmt.Printf(\"%s\\n\", loc.Region)\nfmt.Printf(\"%s\\n\", loc.SubRegion)\n\n// Output: United Kingdom\n// United Kingdom of Great Britain and Northern Ireland\n// GB\n// GBR\n// Europe\n// Europe\n// Northern Europe\n```\n\n## Contributing\n\nI'm not accepting new features for the time being, see above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsams96%2Frgeo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsams96%2Frgeo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsams96%2Frgeo/lists"}