The current analytics platform will be discontinued after January 31, 2024, and will be replaced by new advanced processing functionalities. This change will affect projects, workflows, jobs, data blocks, processing blocks, and custom blocks. For more information, see the blog post.
Description
A processing block that splits images into tiles ready for consumption by machine learning algorithms.
See this block on the marketplace.
How it works
The block is agnostic to spatial or spectral resolution, coordinate reference system and data type. This also means that if an input dataset has more than four bands, the output will have the same. Some machine learning algorithms can therefore have problems with the tiles if they only support RGB images.
Augmentation by using offsets is also supported, a mechanism that can be used when training supervised algorithms and effectively creating more training data.
If not enough image pixels are left to create a complete tile (at the right and bottom borders of an image), the missing pixels are filled with NoData pixels.
For change detection purposes, the match_extents
parameter is crucial. If the tiling block is provided multiple input images and this option is set, the resulting tiles will have the same extents across all input layers. This is achieved by computing a bounding box that covers all input images, and then filling in the missing pixels of each layer with nodata (0
). If the input images have an alpha band, it will set to 255
in the nodata areas.
Parameter | Overview |
---|---|
tile_width | integer / required The width of the tile, in pixels. The default value is 768 . |
tile_height | integer / required The height of the tile, in pixels. The default value is 768 . |
match_extents | boolean / required If true , the tile extents (bounding boxes) of all input layers will perfectly match. The default value is false . |
augmentation_factor | integer / required Factor used to create additional tiles by applying a pixel offset. The default value is 1 . |
output_prefix | string / required A prefix of tile names. The default behavior is to use input filename. |
discard_empty_tiles | boolean / required If true , tiles that only consist of zeros or nodata, as defined by an alpha band or a set nodata value, will not be returned. The default value is true . |
nodata | integer / required The value representing nodata within each raster band. If not set, defaults to the nodata value of the input raster. |
Example
A workflow using storage data with the help of Processing from Storage, and then applying tiling with match_extents
.
{
"up42-processing-from-storage:1": {
"asset_ids": ["00210895-5405-4c0r-9bca-ccca551776f9"]
},
"tiling:1": {
"tile_width": 768,
"tile_height": 768,
"match_extents": true,
"output_prefix": "",
"augmentation_factor": 1,
"nodata": 0
}
}
Capabilities
Input
Output
raster
custom | |
---|---|
match_extents | ${match_extents} |
augmentation_factor | ${augmentation_factor} |
up42_standard | |
---|---|
bands | > (propagated) |
dtype | > (propagated) |
format | GTiff |
sensor | > (propagated) |
resolution | > (propagated) |
tile_width | ${tile_width} |
tile_height | ${tile_height} |
processing_level | > (propagated) |