{"id":19558735,"url":"https://github.com/jblindsay/lidario","last_synced_at":"2025-07-09T20:07:34.126Z","repository":{"id":52217470,"uuid":"87005835","full_name":"jblindsay/lidario","owner":"jblindsay","description":"A small Go library for reading and writing LiDAR (LAS) files","archived":false,"fork":false,"pushed_at":"2021-05-04T19:58:35.000Z","size":90978,"stargazers_count":31,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-26T23:32:20.129Z","etag":null,"topics":["gis","gis-data","las","lidar"],"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/jblindsay.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":"2017-04-02T18:15:15.000Z","updated_at":"2024-11-25T14:38:04.000Z","dependencies_parsed_at":"2022-08-23T21:20:36.556Z","dependency_job_id":null,"html_url":"https://github.com/jblindsay/lidario","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jblindsay/lidario","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jblindsay%2Flidario","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jblindsay%2Flidario/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jblindsay%2Flidario/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jblindsay%2Flidario/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jblindsay","download_url":"https://codeload.github.com/jblindsay/lidario/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jblindsay%2Flidario/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502621,"owners_count":23618658,"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":["gis","gis-data","las","lidar"],"created_at":"2024-11-11T04:48:02.225Z","updated_at":"2025-07-09T20:07:29.113Z","avatar_url":"https://github.com/jblindsay.png","language":"Go","funding_links":[],"categories":["Geospatial Library","Lidar"],"sub_categories":["Go"],"readme":"lidario\n=======\n\nDescription\n-----------\n\nlidario is a simple library for reading and writing LiDAR files stored in LAS format. The library is written using the Go programing language. Use the *build.py* file to build/install the source code. The script can also be used to run the tests.\n\nExample Usage\n--------------\n\n```Go\nimport \"github.com/jblindsay/lidario\"\n\nfunc main() {\n    // Reading a LAS file\n    fileName := \"testdata/sample.las\"\n    var lf *lidario.LasFile\n    var err error\n    lf, err = lidario.NewLasFile(fileName, \"r\")\n    if err != nil {\n        fmt.Println(err)\n    }\n    defer lf.Close()\n\n    // Print the data contained in the LAS Header\n    fmt.Printf(\"%v\\n\", lf.Header)\n\n    // Print the VLR data\n    fmt.Println(\"VLRs:\")\n    for _, vlr := range lf.VlrData {\n        fmt.Println(vlr)\n    }\n\n    // Get the X,Y,Z data for a single point\n    x, y, z, err := lf.GetXYZ(1000)\n    fmt.Printf(\"Point %v: (%f, %f, %f) Error: %v\\n\", j, x, y, z, err)\n\t\n    // Get an entire point, including all parts\n    var p lidario.LasPointer\n    p, err = lf.LasPoint(1000)\n    if err != nil {\n        fmt.Println(err)\n        t.Fatal()\n    }\n    fmt.Println(\"Point format:\", p.Format())\n\n    // Read all the points\n    oldProgress := -1\n    progress := 0\n    for i := 0; i \u003c int(lf.Header.NumberPoints); i++ {\n        if p, err := lf.LasPoint(i); err != nil {\n            fmt.Println(err)\n            t.Fatal()\n        } else {\n            if i \u003c 10 {\n                pd := p.PointData()\n                fmt.Printf(\"Point %v: (%f, %f, %f, %v, %v, %f)\\n\", i, pd.X, pd.Y, pd.X, pd.Intensity, pd.ClassBitField.ClassificationString(), p.GpsTimeData())\n            }\n            progress = int(100.0 * float64(i) / float64(lf.Header.NumberPoints))\n            if progress != oldProgress {\n                oldProgress = progress\n                if progress%10 == 0 {\n                    fmt.Printf(\"Progress: %v\\n\", progress)\n                }\n            }\n        }\n    }\n\n    // Create a new LAS file\n    newFileName := \"testdata/newFile.las\"\n    newLf, err := lidario.InitializeUsingFile(newFileName, lf)\n    if err != nil {\n        fmt.Println(err)\n        t.Fail()\n    }\n    defer newLf.Close()\n\n    progress = 0\n    oldProgress = -1\n    for i := 0; i \u003c int(lf.Header.NumberPoints); i++ {\n        if p, err := lf.LasPoint(i); err != nil {\n            fmt.Println(err)\n            t.Fatal()\n        } else {\n            if p.PointData().Z \u003c 100.0 { // only output the point if the elevation is less than 100.0 m\n                newLf.AddLasPoint(p)\n            }\n        }\n        progress = int(100.0 * float64(i) / float64(lf.Header.NumberPoints))\n        if progress != oldProgress {\n            oldProgress = progress\n            if progress%10 == 0 {\n                fmt.Printf(\"Progress: %v\\n\", progress)\n            }\n        }\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjblindsay%2Flidario","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjblindsay%2Flidario","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjblindsay%2Flidario/lists"}