-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add raster-resampling raster paint property (#6411)
- Loading branch information
1 parent
e71c5e9
commit f546de2
Showing
13 changed files
with
200 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions
49
test/integration/render-tests/image/raster-resampling/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 64, | ||
"height": 64 | ||
} | ||
}, | ||
"center": [ | ||
-122.514526, | ||
37.562984 | ||
], | ||
"zoom": 20, | ||
"sources": { | ||
"image": { | ||
"type": "image", | ||
"coordinates": [ | ||
[ | ||
-122.51596391201019, | ||
37.56238816766053 | ||
], | ||
[ | ||
-122.51467645168304, | ||
37.56410183312965 | ||
], | ||
[ | ||
-122.51309394836426, | ||
37.563391708549425 | ||
], | ||
[ | ||
-122.51423120498657, | ||
37.56161849366671 | ||
] | ||
], | ||
"url": "local://image/0.png" | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "image", | ||
"type": "raster", | ||
"source": "image", | ||
"paint": { | ||
"raster-fade-duration": 0, | ||
"raster-resampling": "nearest" | ||
} | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
test/integration/render-tests/raster-resampling/default/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256 | ||
} | ||
}, | ||
"center": [ | ||
13.418056, | ||
52.499167 | ||
], | ||
"zoom": 20, | ||
"sources": { | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"maxzoom": 17, | ||
"tileSize": 256 | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "raster", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+2.71 KB
test/integration/render-tests/raster-resampling/function/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions
45
test/integration/render-tests/raster-resampling/function/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256 | ||
} | ||
}, | ||
"center": [ | ||
13.418056, | ||
52.499167 | ||
], | ||
"zoom": 20, | ||
"sources": { | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"maxzoom": 17, | ||
"tileSize": 256 | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "raster", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0, | ||
"raster-resampling": { | ||
"stops": [ | ||
[ | ||
19, | ||
"linear" | ||
], | ||
[ | ||
20, | ||
"nearest" | ||
] | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
test/integration/render-tests/raster-resampling/literal/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256 | ||
} | ||
}, | ||
"center": [ | ||
13.418056, | ||
52.499167 | ||
], | ||
"zoom": 20, | ||
"sources": { | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"maxzoom": 17, | ||
"tileSize": 256 | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "raster", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0, | ||
"raster-resampling": "nearest" | ||
} | ||
} | ||
] | ||
} |