{"id":25651112,"url":"https://github.com/shanghuiyang/pbfmap","last_synced_at":"2026-05-17T03:04:48.467Z","repository":{"id":57576852,"uuid":"294426697","full_name":"shanghuiyang/pbfmap","owner":"shanghuiyang","description":"pbfmap is a reader of osm pbf in pure golang.","archived":false,"fork":false,"pushed_at":"2021-12-31T05:03:21.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T07:57:33.746Z","etag":null,"topics":["golang","openstreetmap","osm","pbf"],"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/shanghuiyang.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":"2020-09-10T14:01:42.000Z","updated_at":"2021-12-31T05:03:23.000Z","dependencies_parsed_at":"2022-09-12T00:00:19.825Z","dependency_job_id":null,"html_url":"https://github.com/shanghuiyang/pbfmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanghuiyang%2Fpbfmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanghuiyang%2Fpbfmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanghuiyang%2Fpbfmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanghuiyang%2Fpbfmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shanghuiyang","download_url":"https://codeload.github.com/shanghuiyang/pbfmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240339582,"owners_count":19785957,"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":["golang","openstreetmap","osm","pbf"],"created_at":"2025-02-23T16:17:39.550Z","updated_at":"2026-05-17T03:04:48.341Z","avatar_url":"https://github.com/shanghuiyang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pbfmap\n[![CI](https://github.com/shanghuiyang/pbfmap/actions/workflows/ci.yml/badge.svg)](https://github.com/shanghuiyang/pbfmap/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/shanghuiyang/pbfmap/blob/master/LICENSE)\n\npbfmap is a reader of osm pbf in pure golang.\n\n## usage\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/shanghuiyang/pbfmap\"\n)\n\nfunc main() {\n\tpbf := pbfmap.New()\n\tif err := pbf.Load(\"test.osm.pbf\"); err != nil {\n\t\tfmt.Printf(\"failed to load pbf, error: %v\", err)\n\t\treturn\n\t}\n\n\tfmt.Println(\"nodes    : \", len(pbf.Nodes))\n\tfmt.Println(\"ways     : \", len(pbf.Ways))\n\tfmt.Println(\"relations: \", len(pbf.Relations))\n\n\tfmt.Println(\"---------------\")\n\tn := pbf.GetNode(2651270709)\n\tif n == nil {\n\t\tfmt.Printf(\"node %v not found\\n\", 2651270709)\n\t\treturn\n\t}\n\tfmt.Println(n)\n\n\tfmt.Println(\"---------------\")\n\tw := pbf.GetWay(330213759)\n\tif w == nil {\n\t\tfmt.Printf(\"way %v not found\\n\", 330213759)\n\t\treturn\n\t}\n\tfmt.Println(w)\n\tfmt.Printf(\"length: %.4f m\\n\", w.Length())\n\n\tfmt.Println(\"---------------\")\n\tr := pbf.GetRelation(9146261)\n\tif r == nil {\n\t\tfmt.Printf(\"relation %v not found\\n\", 9146261)\n\t\treturn\n\t}\n\tfmt.Println(r)\n\n\treturn\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanghuiyang%2Fpbfmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshanghuiyang%2Fpbfmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanghuiyang%2Fpbfmap/lists"}