--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: pdal excerpt: | DuckDB Community Extensions Extension that adds support for manipulating point cloud data using SQL. extension: name: pdal description: Extension that adds support for manipulating point cloud data using SQL. version: 0.7.0 language: C++ build: cmake excluded_platforms: "windows_amd64;windows_amd64_mingw;wasm_mvp;wasm_eh;wasm_threads" requires_toolchains: "parser_tools" license: MIT / Overall PDAL license (BSD) - https://pdal.org/en/latest/copyright.html maintainers: - ahuarte47 repo: github: ahuarte47/duckdb-pdal ref: fb98e432ac310956e4d0a02a28b7ed2245532713 docs: hello_world: | SELECT * FROM PDAL_Read('path/to/your/pointcloud.las'); --- ┌───────────┬───────────┬────────┬───────┐ │ X │ Y │ Z │ │ │ double │ double │ double │ ... │ ├───────────┼───────────┼────────┤───────┤ │ 637177.98 │ 849393.95 │ 411.19 │ ... │ │ 637177.30 │ 849396.95 │ 411.25 │ ... │ │ 637176.34 │ 849400.84 │ 411.01 │ ... │ │ 637175.45 │ 849404.62 │ 410.99 │ ... │ │ 637174.33 │ 849407.37 │ 411.38 │ ... │ └───────────┴───────────┴────────┴───────┘ WITH __input AS ( SELECT X, Y, RasterValue FROM PDAL_Pipeline('./test/data/overlay-sample.tiff', './test/data/overlay-sample-pipeline.json') ) SELECT COUNT(*) AS c, SUM(RasterValue) AS s FROM __input ; --- ┌───────┬──────────┐ │ c │ s │ │ int64 │ double │ ├───────┼──────────┤ │ 57600 │ 576000.0 │ └───────┴──────────┘ extended_description: | This is an extension for DuckDB for manipulating point cloud data using SQL. You can use the extension to read point cloud data from various formats (e.g., LAS, LAZ) and perform transformations on them. The extension is built on top of [PDAL (Point Data Abstraction Library)](https://pdal.io/), a C++ library that enables users to read, write, and process point cloud data and, with this extension, load the data directly into DuckDB using SQL queries. ```sql SELECT * FROM PDAL_Read('path/to/your/pointcloud.las'); ┌───────────┬───────────┬────────┬───────┐ │ X │ Y │ Z │ │ │ double │ double │ double │ ... │ ├───────────┼───────────┼────────┤───────┤ │ 637177.98 │ 849393.95 │ 411.19 │ ... │ │ 637177.30 │ 849396.95 │ 411.25 │ ... │ │ 637176.34 │ 849400.84 │ 411.01 │ ... │ │ 637175.45 │ 849404.62 │ 410.99 │ ... │ │ 637174.33 │ 849407.37 │ 411.38 │ ... │ └───────────┴───────────┴────────┴───────┘ ``` PDAL supports data pipelines, you can perform complex transformations before loading data points into DuckDB. For example, load a raster file, and using `filters.overlay`, extract attributes from a Geopackage: ```sql WITH __input AS ( SELECT X, Y, RasterValue FROM PDAL_Pipeline('./test/data/overlay-sample.tiff', './test/data/overlay-sample-pipeline.json') ) SELECT COUNT(*) AS c, SUM(RasterValue) AS s FROM __input ; ┌───────┬──────────┐ │ c │ s │ │ int64 │ double │ ├───────┼──────────┤ │ 57600 │ 576000.0 │ └───────┴──────────┘ ``` Where the pipeline is: ```json { "pipeline": [ { "type": "filters.assign", "value" : [ "RasterValue = 0.0" ] }, { "type": "filters.overlay", "datasource": "./test/data/overlay-sample.gpkg", "layer": "area", "column": "user_data", "dimension": "RasterValue" } ] } ``` The pipeline can be provided either as a JSON file or as an inline JSON string. If the second parameter value starts with "[" and ends with "]", it represents an inline JSON, otherwise it is a file path: ```sql SELECT COUNT(*) FROM PDAL_pipeline('./test/data/autzen_trim.las', '[ { "type": "filters.tail", "count": 10 } ]' ) ; ┌──────────────┐ │ count_star() │ │ int64 │ ├──────────────┤ │ 10 │ └──────────────┘ ``` The `PDAL_PipelineTable` function runs a PDAL pipeline on an input table. It is supposed that the input table contains columns compatible with PDAL point clouds. The pipeline can be provided either as a JSON file or as an inline JSON string as well. If the second parameter value starts with "[" and ends with "]", it represents an inline JSON, otherwise it is a file path: ```sql SELECT * FROM PDAL_PipelineTable((SELECT X,Y,Z FROM ...), '[ {"type": "filters.tail", "count": 10} ]') ; ``` extension_star_count: 30 extension_star_count_pretty: 30 extension_download_count: 923 extension_download_count_pretty: 923 image: '/images/community_extensions/social_preview/preview_community_extension_pdal.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Linux ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | macOS AMD64 | ✅ | ❌ | ✅ | ✅ | ❌ | | macOS ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Windows AMD64 | ✅ | ❌ | ✅ | ✅ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |--------------------|---------------|--------------------------------------------------------------------------------------------------|---------|------------------------------------------------------------------------------------------------------| | PDAL_Drivers | table | Returns the list of supported stage types of a PDAL Pipeline. | NULL | [SELECT * FROM PDAL_Drivers();] | | PDAL_Read | table | Read and import a variety of point cloud data file formats using the PDAL library. | NULL | [SELECT * FROM PDAL_Read('./test/data/autzen_trim.laz');] | | PDAL_Info | table | Read the metadata from point cloud file[s]. | NULL | [SELECT * FROM PDAL_Info('./test/data/autzen_trim.la*');] | | PDAL_Pipeline | table | Read and import a point cloud data file, applying also a custom processing pipeline to the data. | NULL | [SELECT * FROM PDAL_Pipeline('path/to/your/filename.las', 'path/to/your/pipeline.json');] | | PDAL_PipelineTable | table | Apply a custom processing pipeline to the input table. | NULL | [SELECT * FROM PDAL_PipelineTable((SELECT X,Y,Z FROM ...), '[ {type: filters.tail, count: 100} ]');] | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings | name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |