{"id":18624057,"url":"https://github.com/mitghi/gepo","last_synced_at":"2025-11-03T18:30:36.745Z","repository":{"id":181576904,"uuid":"666951780","full_name":"mitghi/gepo","owner":"mitghi","description":"Minimal NNS (Proximity search) in Go","archived":false,"fork":false,"pushed_at":"2023-07-16T09:20:04.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T05:25:29.892Z","etag":null,"topics":["geo","geospatial","golang","nearest-neighbor-search","spatial","tilemap"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mitghi.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}},"created_at":"2023-07-16T06:18:39.000Z","updated_at":"2023-07-16T09:11:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"8d361afa-e5c2-47ad-8796-78a18089d754","html_url":"https://github.com/mitghi/gepo","commit_stats":null,"previous_names":["mitghi/gepo"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitghi%2Fgepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitghi%2Fgepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitghi%2Fgepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitghi%2Fgepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitghi","download_url":"https://codeload.github.com/mitghi/gepo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239418576,"owners_count":19635208,"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":["geo","geospatial","golang","nearest-neighbor-search","spatial","tilemap"],"created_at":"2024-11-07T04:27:11.722Z","updated_at":"2025-11-03T18:30:36.712Z","avatar_url":"https://github.com/mitghi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gepo\n\n[\u003cimg src=\"https://img.shields.io/badge/godocs-gepo-mitghi\"\u003e\u003c/img\u003e](https://pkg.go.dev/github.com/mitghi/gepo)\n![GitHub](https://img.shields.io/github/license/mitghi/gepo)\n\nGepo is simple implementation of NNS (Proximity search) algorithm. It provides minimal, simple and easy to use api \nto insert and search nearest points on a plane which is divided into tiles.\n\nThe library has no dependencies other than standard library.\n\n```\n$ go get -u github.com/mitghi/gepo\n```\n\nfollowing is an example of using the api:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/mitghi/gepo\"\n)\n\nfunc main() {\n\t// initialize the plane\n\t// with resolution of 20 Kilometer\n\tplane := gepo.New(gepo.Km(20))\n\n\tberlinMitte := gepo.NewPoint(\"Berlin Mitte\", 52.519294, 13.405868)\n\tberlinPanaromaStr := gepo.NewPoint(\"Berlin Panaroma str\", 52.520783, 13.409578)\n\tberlinMall := gepo.NewPoint(\"Berlin Mall\", 52.510415, 13.381302)\n\tberlinPostdamerPlatz := gepo.NewPoint(\"Berlin Postdamer Platz\", 52.509678, 13.375129)\n\n\t// add points to the plane\n\t// the points are inserted\n\t// based on tile division\n\tplane.AddPoints([]*gepo.Point{\n\t\tberlinMitte,\n\t\tberlinPanaromaStr,\n\t\tberlinMall,\n\t\tberlinPostdamerPlatz}...)\n\n\t// this closure is for extra control\n\t// over what gets included in the final\n\t// results; that is the user can decide\n\t// whether certain points are unfit for\n\t// inclusion\n\tjustAccept := func(_ *gepo.Point) bool { return true }\n\n\t// perform serach\n\n\t// returns an slice containing (berlinMitte, berlinPanaromaStr)\n\tneighbours := plane.Nearest(berlinMitte, 2000, gepo.Km(1), justAccept)\n\tfmt.Println(\"from berlinMitte:\", neighbours)\n\t// ...\n\n\t// return (berilnPanaromaStr, berlinMitte, berlinMall)\n\tneighbours = plane.Nearest(berlinPanaromaStr, 2000, gepo.Km(3.4), justAccept)\n\tfmt.Println(\"from berlinPanaromaStr:\", neighbours)\n\t// ...\n\n\t// return (berlinMall, berilnPostdamerPlatz)\n\tneighbours = plane.Nearest(berlinMall, 2000, gepo.Km(1), justAccept)\n\tfmt.Println(\"from berlinMall:\", neighbours)\n\t// ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitghi%2Fgepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitghi%2Fgepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitghi%2Fgepo/lists"}