filters.matlab

The Matlab Filter allows Matlab software to be embedded in a Pipeline that interacts with a struct array of the data and allows you to modify those points. Additionally, some global Metadata is also available that Matlab functions can interact with.

The Matlab interpreter must exit and always set “ans==true” upon success. If “ans==false”, an error would be thrown and the Pipeline exited.

See also

writers.matlab can be used to write .mat files.

Note

filters.matlab embeds the entire Matlab interpreter, and it will require a fully licensed version of Matlab to execute your script.

Dynamic Plugin

This stage requires a dynamic plugin to operate

Example

[
    {
        "filename": "test\/data\/las\/1.2-with-color.las",
        "type": "readers.las"

    },
    {
        "type": "filters.matlab",
        "script": "matlab.m"

    },
    {
        "filename": "out.las",
        "type": "writers.las"
    }
]

Options

script

When reading a function from a separate Matlab file, the file name to read from. [Example: “functions.m”]

source

The literal Matlab code to execute, when the script option is not being used.

add_dimension

The name of a dimension to add to the pipeline that does not already exist.

struct

Array structure name to read [Default: “PDAL”]

where

An expression that limits points passed to a filter. Points that don’t pass the expression skip the stage but are available to subsequent stages in a pipeline. [Default: no filtering]

where_merge

A strategy for merging points skipped by a ‘where’ option when running in standard mode. If true, the skipped points are added to the first point view returned by the skipped filter. If false, skipped points are placed in their own point view. If auto, skipped points are merged into the returned point view provided that only one point view is returned and it has the same point count as it did when the filter was run. [Default: auto]