Spatial filtering
Description¶
In general this transformation should be applicable to models that contain spatially referenced data. As of 03-08-2020, only gridded models (such as from a dfs2 or netcdf file) can be filtered. The transformation allows users to select only a subset of the spatial domain for further processing. In case of gridded data, the result of the filter is again a grid (the envelope/bounding box of the input geometry is applied).
Example¶
This request to /api/conversion/upload-convert
{
"readerName": "<reader name>",
"writerName": "<writer name>",
...
"transformations": [
{
type: "SpatialFilterTransformation",
spatialFilter: {
geometry: '<wkt of a geometry>'
}
}
]
}
var transferResult = await transferClient
.CreateFileImport(projectId, "<local file>")
...
.WithSpatialFilteringTransformation("<wkt of a geometry>")
...
.ExecuteAsync();
will only select the grid that is contained within the specified geometry.
For more information refer to the swagger documentation of the Metadata service.