Repository navigation
Add Buffer Tile - #3419
Merged
Merged
Add Buffer Tile#3419
Conversation
4 tasks done
pomadchin
commented
Sep 23, 2021
| } | ||
| } | ||
|
|
||
| def mapTile(f: Tile => Tile): BufferTile = BufferTile(f(sourceTile), gridBounds) |
Member
Author
There was a problem hiding this comment.
@echeipesh how about making all functions to work within the window, but if user wants to apply smth beayond the window they need to do it explicitly. Mb the function name could be different though.
pomadchin
commented
Sep 23, 2021
|
|
||
| /** Computes the minimum value of a neighborhood */ | ||
| def focalMin(n: Neighborhood, bounds: Option[GridBounds[Int]] = None, target: TargetCell = TargetCell.All): BufferTile = | ||
| self.mapTile(_.focalMin(n, bounds, target)) |
Member
Author
There was a problem hiding this comment.
In this case focal ops are applied to the underlying tile cc @echeipesh
pomadchin
commented
Sep 23, 2021
Comment on lines
+30
to
+33
| * - What should .map do? Map the buffer pixels or not? | ||
| * - toString method is friendly | ||
| * - mutable version makes sense | ||
| * - toBytes needs to encode padding size? |
Member
Author
There was a problem hiding this comment.
If we're ok with the explicit work with the underlying tile:
- map would be applied to the window only (so it is consistent with any Tile behavior, with gets and foreaches)
- still need a friednly toString
- yes!
- toBytes encodes window only; we don't have any reasons to encode gridBounds to the output array 🤷, no interfaces that would support reading from it.
pomadchin
force-pushed
the
feature/buffer-tile
branch
from
September 23, 2021 20:27
0143c68 to
25ce870
Compare
Member
Author
|
Going to merge it! We would still have a chance to change behavior and API if necessary. I would like to get it merged to remove BufferTile from RasterFrames in terms of locationtech/rasterframes#567 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
This PR adds BufferTile type to handle focal ops in RF.
Checklist