# filters.divider

The Divider Filter breaks a point view into a set of smaller point views based on simple criteria. The number of subsets can be specified explicitly, or one can specify a maximum point count for each subset. Additionally, points can be placed into each subset sequentially (as they appear in the input) or in round-robin fashion.

Normally points are divided into subsets to facilitate output by writers that support creating multiple output files with a template (LAS and BPF are notable examples).

Default Embedded Stage

This stage is enabled by default

## Example

This pipeline will create 10 output files from the input file readers.las.

    [
        "example.las",
        {
            "type":"filters.divider",
            "count":"10"
        },
        {
            "type":"writers.las",
            "filename":"out_#.las"
        }
    ]

## Options

mode

  A mode of “partition” will write sequential points to an output view until the view meets its predetermined size. “round_robin” mode will iterate through the output views as it writes sequential points. [Default: “partition”]

count

  Number of output views. [Default: none]

capacity

  Maximum number of points in each output view. Views will contain approximately equal numbers of points. [Default: none]

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`]

Warning

You must specify exactly one of either count or capacity.