{"id":19784487,"url":"https://github.com/pdal/capi","last_synced_at":"2025-04-30T22:32:15.926Z","repository":{"id":40563648,"uuid":"165676626","full_name":"PDAL/CAPI","owner":"PDAL","description":"PDAL C API","archived":false,"fork":false,"pushed_at":"2024-04-06T14:03:10.000Z","size":834,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-26T23:09:33.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PDAL.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}},"created_at":"2019-01-14T14:35:23.000Z","updated_at":"2024-06-20T13:46:47.000Z","dependencies_parsed_at":"2024-04-05T12:46:29.452Z","dependency_job_id":null,"html_url":"https://github.com/PDAL/CAPI","commit_stats":{"total_commits":289,"total_committers":6,"mean_commits":"48.166666666666664","dds":0.4221453287197232,"last_synced_commit":"a2e73e40d897902e2e4c715efa32c07ffd8c7044"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDAL%2FCAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDAL%2FCAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDAL%2FCAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDAL%2FCAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PDAL","download_url":"https://codeload.github.com/PDAL/CAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251791761,"owners_count":21644453,"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":[],"created_at":"2024-11-12T06:11:37.515Z","updated_at":"2025-04-30T22:32:15.584Z","avatar_url":"https://github.com/PDAL.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"pdal-c: PDAL C API\n==================\n\n[//]: # (@cond Hide build status from Doxygen)\n[![Actions Status](https://github.com/PDAL/CAPI/workflows/OSX%20Build%20Test/badge.svg)](https://github.com/PDAL/CAPI/actions)\n[![Actions Status](https://github.com/PDAL/CAPI/workflows/Linux%20Build%20Test/badge.svg)](https://github.com/PDAL/CAPI/actions)\n[![Actions Status](https://github.com/PDAL/CAPI/workflows/Windows%20Build%20Test/badge.svg)](https://github.com/PDAL/CAPI/actions)\n\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pdal-c/badges/version.svg)](https://anaconda.org/conda-forge/pdal-c)\n[![openupm](https://img.shields.io/npm/v/com.virgis.pdal?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.virgis.pdal/)\n\n[//]: # (@endcond)\n\n# Basics\n\n*pdal-c* is a C API for the Point Data Abstraction Library ([PDAL](https://pdal.io))\nand is compatible with PDAL 1.7 and later.\n\n*pdal-c* is released under the [BSD 3-clause license](LICENSE.md).\n\n# Documentation\n\n[API Documentation](https://pdal.io/CAPI/doxygen/html/index.html)\n\n# Installation\n\nThe library can be installed as a package on Windows, Mac and Linux using Conda.\n\n```\nconda install -c conda-forge pdal-c\n```\n\nThe conda package includes a tool called `test_pdalc`. Run this to confirm that the API configuration is correct and to report on the version of PDAL that the API is connected to.\n\nThis interface is suitable for use with C# and with Unity.\n\nThere is a [Unity Package Manager (UPM) package for PDAL](https://openupm.com/packages/com.virgis.pdal/) based on this library.\n\n## Dependencies\n\nThe library is dependent on PDAL and has currently been tested up to v2.2.0.\n\n# Usage\n\nAn example of the use of the API is given in the `csharp` folder which contains an integration to PDAL in C#.\n\nNOTE - these scripts are provided for information only as examples and are not supported in any way!\n\n## Example C# Program\n\n``` c#\nusing System;\nusing System.Collections.Generic;\nusing Pdal;\nusing Newtonsoft.Json;\nusing g3;\n\nnamespace pdal_mesh\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            Console.WriteLine(\"Hello World!\");\n            Config pdal = new Config();\n            Console.WriteLine(pdal.Version);\n\n            List\u003cobject\u003e pipe = new List\u003cobject\u003e();\n            pipe.Add(\".../CAPI/tests/data/las/1.2-with-color.las\");\n            pipe.Add(new\n            {\n                type = \"filters.splitter\",\n                length = 1000\n            });\n            pipe.Add(new\n            {\n                type = \"filters.delaunay\"\n            });\n\n            string json = JsonConvert.SerializeObject(pipe.ToArray());\n\n            Pipeline pl = new Pipeline(json);\n\n            long count = pl.Execute();\n\n            Console.WriteLine($\"Point Count is {count}\");\n\n            using (PointViewIterator views = pl.Views) {\n                views.Reset();\n\n                while (views.HasNext())\n                {\n                    PointView view = views.Next;\n                    if (view != null)\n                    {\n                        Console.WriteLine($\"Point Count is {view.Size}\");\n                        Console.WriteLine($\"Triangle Count is {view.MeshSize}\");\n\n                        BpcData pc = view.GetBakedPointCloud();\n\n                        DMesh3 mesh = view.getMesh();\n\n                    }\n                }\n            }\n        }\n    }\n}\n```\n\nThis takes a LAS file, splits the file into tiles and then creates a Delaunay Triangulation (i.e. Mesh) for each one.\n\nThis code uses the sample bindings as-is and has a dependency on [Geometry3Sharp](https://github.com/gradientspace/geometry3Sharp) only.\n\nNote that `BcpData` is a custom data structure that holds the Point Cloud in a form suitable to create a [Baked PointCloud](https://medium.com/realities-io/point-cloud-rendering-7bd83c6220c8) suitable for rendering as a VFX graph in Unity. This is an efficient way to display point cloud data in VR and I have used it successfully with point clouds of 10 million points. \n\n# For Developers\n\n## Build on Windows\n\nThe library can be built on Windows using the following command - which assumes that you are in a conda environment that has the conda-forge `pdal` package loaded:\n\n```\ncd CAPI\nmake.bat\n```\n\n## Build on Linux and Mac\n\nThe library can be built on Linux and Mac using the following command - which assumes that you are in a conda environment that has the conda-forge `pdal` package loaded:\n\n```\ncd CAPI\ncmake -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release -DCONDA_BUILD=OFF .\nmake\nmake install\n```\n\nSetting `-DBUILD_SHARED_LIBS=OFF` enables the generation of a static (`.a`) library. \n\n## Code Style\n\nThis project enforces the PDAL code styles, which can checked as follows :\n\n- On Windows - as per `astylerc`\n- On Linux by running `./check_all.bash`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdal%2Fcapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdal%2Fcapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdal%2Fcapi/lists"}