The attribute filter allows you to set the values of a selected dimension. Two scenarios are supported:
You can limit your queries based on OGR’s SQL support. If the filter has both a datasource and a query option, those will be used instead of the entire OGR data source. At this time it is not possible to further filter the OGR query based on a geometry but that may be added in the future.
Note
The OGR SQL support follows the rules specified in ExecuteSQL documentation, and it will pass SQL down to the underlying datasource if it can do so.
In this scenario, we are altering the attributes of the dimension ‘Classification’. Points from autzen-dd.las that lie within a feature will have their classification to match the ‘CLS’ field associated with that feature.
{
"pipeline":[
"autzen-dd.las",
{
"type":"filters.attribute",
"dimension":"Classification",
"datasource":"attributes.shp",
"layer":"attributes",
"column":"CLS"
},
{
"filename":"attributed.las",
"scale_x":0.0000001,
"scale_y":0.0000001
}
]
}
This pipeline sets the PointSourceId of all points from ‘autzen-dd.las’ to the value ‘26’.
{
"pipeline":[
"autzen-dd.las",
{
"type":"filters.attribute",
"dimension":"PointSourceId",
"value":26
},
{
"filename":"attributed.las",
"scale_x":0.0000001,
"scale_y":0.0000001
}
]
}
This example sets the Intensity attribute to CLS
values read from the
OGR SQL query.
{
"pipeline":[
"autzen-dd.las",
{
"type":"filters.attribute",
"dimension":"Intensity",
"datasource":"attributes.shp",
"query":"SELECT CLS FROM attributes where cls!=6",
"column":"CLS"
},
{
"filename":"attributed.las",
}
]
}