-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add raster-resampling raster paint property #6411
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
762ea6f
add raster-scaling raster paint property
andrewharvey 9358791
no longer necessary to change default interpolation for texture in im…
andrewharvey 9145123
add expected render-tests
andrewharvey bfaac1c
target 0.46.0 for support in style-spec docs
andrewharvey c62f647
simpler switching
andrewharvey 60d92a8
update due to changes since original pr submitted
andrewharvey fd83002
rename raster-scaling to raster-resampling
andrewharvey e8a68d8
use 64x64 image render test
andrewharvey efbb31e
provide example for single render test
andrewharvey c9ed3e3
more details in raster-resampling values
andrewharvey ef58b2a
push support to 0.47.0
andrewharvey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" | ||
} | ||
} | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mollymerp I added an example here because it wasn't entirely clear to me what the render-test-name is.