-
-
Notifications
You must be signed in to change notification settings - Fork 473
Open
Description
Implement resampling paint property to raster, hillshade, color relief layers
This issue tracks the implementation of resampling as a new style spec paint property for raster, hillshade, and color relief layers.
- Style spec issue: Add resampling paint property to color relief, hillshade layers maplibre-style-spec#1447
- GL JS issue: Implement
resamplingpaint property to raster, hillshade, color relief layers maplibre-gl-js#7154
Examples
layers: [
{
id: 'raster',
type: 'raster',
source: 'rasterSource',
paint: {
'resampling': 'nearest', // 'linear' or 'nearest'; default 'linear'
'raster-resampling': 'nearest', // Soft-deprecated
...
},
},
{
id: 'hills',
type: 'hillshade',
source: 'hillshadeSource',
paint: {
'resampling': 'nearest', // 'linear' or 'nearest'; default 'linear'
...
},
},
{
id: 'color-relief',
type: 'color-relief',
source: 'colorReliefSource',
paint: {
'resampling': 'nearest', // 'linear' or 'nearest'; default 'linear'
...
},
},
]resampling |
'nearest' |
'linear' |
|---|---|---|
| Hillshade | ![]() |
![]() |
| Color relief | ![]() |
![]() |
Impact
No change to existing functionality. The default resampling for raster, hillshade, and color relief remains bilinear. The new property lets us opt-in to nearest neighbor for color relief and hillshade layers, which was previously limited to only rater layers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels



