{"id":27349444,"url":"https://github.com/rockrobotic/copc-lib","last_synced_at":"2025-04-12T19:17:27.547Z","repository":{"id":37940543,"uuid":"399158942","full_name":"RockRobotic/copc-lib","owner":"RockRobotic","description":"copc-lib provides an easy-to-use reader and writer interface for creating and reading Cloud Optimized Point Clouds, with bindings for Python and C++","archived":false,"fork":false,"pushed_at":"2025-02-04T00:43:18.000Z","size":727,"stargazers_count":49,"open_issues_count":10,"forks_count":15,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-12T19:17:17.878Z","etag":null,"topics":["copc","cpp","las","laz","point-cloud","python","spatial"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RockRobotic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-08-23T15:41:05.000Z","updated_at":"2025-03-16T15:26:16.000Z","dependencies_parsed_at":"2023-02-14T10:16:32.142Z","dependency_job_id":"9e7d0305-bf68-4fa3-8960-f68bfbcd3783","html_url":"https://github.com/RockRobotic/copc-lib","commit_stats":{"total_commits":128,"total_committers":4,"mean_commits":32.0,"dds":0.3125,"last_synced_commit":"dbd4d416c0e9b4e362fdb97d63fd9832d0c7d044"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockRobotic%2Fcopc-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockRobotic%2Fcopc-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockRobotic%2Fcopc-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockRobotic%2Fcopc-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RockRobotic","download_url":"https://codeload.github.com/RockRobotic/copc-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618268,"owners_count":21134202,"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":["copc","cpp","las","laz","point-cloud","python","spatial"],"created_at":"2025-04-12T19:17:26.637Z","updated_at":"2025-04-12T19:17:27.541Z","avatar_url":"https://github.com/RockRobotic.png","language":"C++","readme":"# copc-lib\n\ncopc-lib provides an easy-to-use reader and writer interface for [COPC](https://copc.io/) point clouds, with bindings for python and C++.\n\n## Installation\n\nThe quickest way to get started with copc-lib is with our conda and pip packages.\n\n### Conda\nConda includes both the C++ and python bindings:\n\n```bash\nconda install -c conda-forge copc-lib\n```\n\n### Pip\nPip provide only python bindings:\n\n```bash\npip install copclib\n```\n\n### Building from source\n\n#### Dependencies\n\ncopc-lib has the following dependencies:\n\n- laz-perf\u003e=[3.0.0](https://github.com/hobu/laz-perf/releases/tag/3.0.0)\n- Catch2 v2.x (test suite only)\n- Pybind11 (python bindings only)\n\nTo install all dependencies:\n```bash\nconda install -c conda-forge \"laz-perf\u003e=3.0\" Catch2=2.13 pybind11\n```\n\n#### C++\n\n```bash\ngit clone https://github.com/RockRobotic/copc-lib.git\ncd copc-lib\nmkdir build \u0026\u0026 cd build\ncmake ..\ncmake --build .\nsudo cmake --install .\n```\n\n#### Python\n\n```bash\ngit clone https://github.com/RockRobotic/copc-lib.git\npip install ./copc-lib\n```\n\n#### Example Files \u0026 Unit Tests\n\nTo build the copc-lib examples and unit tests along with the main library, you must enable them:\n\n```bash\nmkdir build \u0026\u0026 cd build\ncmake .. -DWITH_TESTS=ON -DWITH_PYTHON=ON\ncmake --build .\nctest # All tests should pass\n```\n\n## Usage\n\nThe `Reader` and `Writer` objects provide the primary means of interfacing with your COPC files. For more complex use cases, we also provide additional objects such as LAZ Compressors and Decompressors (see [example/example-writer.cpp](example/example-writer.cpp)).\n\nFor common use cases, see the `example` and `test` folders for full examples.\n\n### C++\n\ncopc-lib is compatible with CMake. Assuming copc-lib and lazperf are installed on the system, you can link with them in your `CMakeLists.txt`:\n\n```CMake\nfind_package(COPCLIB REQUIRED)\nfind_package(LAZPERF REQUIRED)\n\nadd_executable(funlib fun-main.cpp)\ntarget_link_libraries(funlib COPCLIB::copc-lib LAZPERF::lazperf)\n```\n\nThe primary public interface will be your [FileReader](./cpp/include/copc-lib/io/copc_reader.hpp) and [FileWriter](./cpp/include/copc-lib/io/copc_writer.hpp) objects. Check the headers and [example files](./example) for documentation.\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003ccopc-lib/io/reader.hpp\u003e\n\nvoid main()\n{\n    // Create a reader object\n    FileReader reader(\"autzen-classified.copc.laz\");\n\n    // Get the node metadata from the hierarchy\n    auto node = reader.FindNode(copc.VoxelKey(0, 0, 0, 0));\n    // Fetch the points of a node\n    auto points = reader.GetPoints(node);\n\n    // Iterate through each point\n    for (const auto \u0026point : points)\n        std::cout \u003c\u003c \"X: \" \u003c\u003c point.X \", Y: \" \u003c\u003c point.Y \u003c\u003c \", Z: \" \u003c\u003c point.Z  \u003c\u003c std::endl;\n}\n```\n\n### Python\n\n[Example files](./example) are also provided for python.\n\n```python\nimport copclib as copc\n\n# Create a reader object\nreader = copc.FileReader(\"autzen-classified.copc.laz\")\n\n# Get the node metadata from the hierarchy\nnode = reader.FindNode(copc.VoxelKey(0, 0, 0, 0))\n# Fetch the points of a node\npoints = reader.GetPoints(node)\n\n# Iterate through each point\nfor point in points:\n    print(point.x, point.y, point.z)\n```\n\nNote that, in python, dimension names for points follow the [laspy naming scheme](https://laspy.readthedocs.io/en/latest/intro.html#point-format-6), with the exception of `scan_angle`.\n\n## Helpful Links\n\n- [COPC Spec](https://copc.io/)\n- [copc.js](https://github.com/connormanning/copc.js) - TypeScript library for reading COPC files\n- [copc.js for browser](https://github.com/connormanning/copc.js/pull/1) - Webpacked version of copc.js for the browser\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\nPlease see [LICENSE.md](LICENSE.md)\n\n## Credits\n\ncopc-lib is created and maintained by [Chris Lee](https://github.com/CCInc), [Leo Stanislas](https://github.com/leo-stan) and other members of [RockRobotic](https://github.com/RockRobotic).\n\nThe [COPC file format](https://copc.io) is created and maintained by HOBU Inc.\nSome code has been adopted from [PDAL](https://github.com/PDAL/PDAL) and [lazperf](https://github.com/hobu/laz-perf), both of which are maintained by HOBU Inc.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockrobotic%2Fcopc-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frockrobotic%2Fcopc-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockrobotic%2Fcopc-lib/lists"}