The ColumnRangeFilter operator allows filtering FeatureCollections. Users can define one or more data ranges for a column in the data table that is then filtered. The filter can be used for numerical as well as textual columns. Each range is inclusive, i.e., [start, end] includes as well the start as the end.
ColumnRangeFilter
FeatureCollection
[start, end]
start
end
For instance, you can filter a collection to only include column values that are either in the range 0-10 or 20-30. Moreover, you can specify the range a to k to dismiss all column values that start with larger letters in the alphabet.
a
k
column
"precipitation"
ranges
[[42,43]]
keepNulls
true
The ColumnRangeFilter operator expects exactly one vector input.
vector
SingleVectorSource
If the value in the column parameter is not a column of the feature collection, an error is thrown.
{ "type": "ColumnRangeFilter", "params": { "column": "population", "ranges": [[1000, 10000]], "keepNulls": false }, "sources": { "vector": { "type": "OgrSource", "params": { "data": { "type": "internal", "datasetId": "e977b123-ca47-4c5b-aace-481119826aaf" }, "attributeProjection": ["name", "population"] } } } }
{ "type": "ColumnRangeFilter", "params": { "column": "name", "ranges": [ ["a", "k"], ["v", "z"] ], "keepNulls": false }, "sources": { "vector": { "type": "OgrSource", "params": { "data": { "type": "internal", "datasetId": "e977b123-ca47-4c5b-aace-481119826aaf" }, "attributeProjection": ["name", "population"] } } } }