{"id":15887933,"url":"https://github.com/iwpnd/gittr","last_synced_at":"2025-07-31T00:40:37.942Z","repository":{"id":61958152,"uuid":"455876963","full_name":"iwpnd/gittr","owner":"iwpnd","description":"create a square grid from an input geojson feature","archived":false,"fork":false,"pushed_at":"2022-10-24T05:41:17.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T16:21:24.970Z","etag":null,"topics":["geometry","geospatial","geospatial-processing"],"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/iwpnd.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}},"created_at":"2022-02-05T13:26:34.000Z","updated_at":"2022-02-13T10:15:11.000Z","dependencies_parsed_at":"2022-10-24T06:45:19.003Z","dependency_job_id":null,"html_url":"https://github.com/iwpnd/gittr","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/iwpnd/gittr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fgittr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fgittr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fgittr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fgittr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iwpnd","download_url":"https://codeload.github.com/iwpnd/gittr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fgittr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267967720,"owners_count":24173566,"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-07-30T02:00:09.044Z","response_time":70,"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":["geometry","geospatial","geospatial-processing"],"created_at":"2024-10-06T06:05:43.899Z","updated_at":"2025-07-31T00:40:37.913Z","avatar_url":"https://github.com/iwpnd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gittr\n\nGittr (from Gitter /ˈɡɪtɐ/, the german word for grid) cuts an input polygon into equal sized grid cells. Grid cells are only created\nif they either touch or are within the input polygon. It also accounts for polygon holes.\n\n## Installation\n\n```\ngo get -u github.com/iwpnd/gittr\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/iwpnd/gittr\"\n)\n\nfunc main() {\n\traw := []byte(`{\n              \"type\": \"Feature\",\n              \"properties\": {\"id\": 3},\n              \"geometry\": {\n                  \"type\": \"Polygon\",\n                  \"coordinates\": [\n                      [\n                          [13.398424, 52.481369],\n                          [13.395336, 52.480271],\n                          [13.391905, 52.478598],\n                          [13.390017, 52.478076],\n                          [13.3871, 52.477971],\n                          [13.386929, 52.471384],\n                          [13.389503, 52.470338],\n                          [13.392076, 52.46924],\n                          [13.397395, 52.466626],\n                          [13.402971, 52.465527],\n                          [13.40992, 52.465789],\n                          [13.417384, 52.469867],\n                          [13.420558, 52.470338],\n                          [13.419185, 52.473946],\n                          [13.418499, 52.477501],\n                          [13.418756, 52.479592],\n                          [13.413781, 52.48048],\n                          [13.406489, 52.482153],\n                          [13.401856, 52.482728],\n                          [13.398424, 52.481369]\n                      ],\n                      [\n                          [13.391561, 52.475096],\n                          [13.414552, 52.476194],\n                          [13.415324, 52.47107],\n                          [13.391647, 52.470756],\n                          [13.391561, 52.475096]\n                      ]\n                  ]\n              }\n          }`)\n\n\tvar f gittr.Feature\n\terr := json.Unmarshal(raw, \u0026f)\n\tif err != nil {\n\t\tpanic(\"something went wrong\")\n\t}\n\n\t// create grid with a cell size of 100m\n\tgrid, err := f.ToGrid(100)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"cell count: %v\\n\", len(grid.Features))\n}\n```\n\n## License\n\nMIT\n\n## Maintainer\n\nBenjamin Ramser - [@iwpnd](https://github.com/iwpnd)\n\nProject Link: [https://github.com/iwpnd/gittr](https://github.com/iwpnd/gittr)\n\n## Acknowledgement\n\nPaul Mach - [go.geojson](https://github.com/paulmach/go.geojson)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwpnd%2Fgittr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiwpnd%2Fgittr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwpnd%2Fgittr/lists"}