-
Sébastien Guimmara authored
All layer types can now benefit from the no-data filling algorithm, as opposed to only elevation layers before. The algorithm can now be tuned to specify a max distance, and an alpha replacement value. The max distance parameter replaces all no-data pixels with the nearest valid pixel within the distance. no-data pixels beyond the distance are replaced by (0, 0, 0, 0). The alpha replacement value specifies the alpha value of replaced pixels (within the distance). The main use case is the following: - To eliminate wall artifacts at the edges of elevation rasters, use an alpha of zero. - To fill no-data holes in a raster (mask or color), use an alpha of 1. The `discardNoData` option is also removed from the Map, as it has become redundant with the no-data parameters. BREAKING CHANGE: The API for no-data filling has changed. The options related to no-data manipulation are now in the `NoDataOptions` interface passed to the layer constructor. The `discardNoData` option is removed in the `Map`, as the same behaviour can be achieved with layer manipulation. See the example for more information.
Loading