-
Notifications
You must be signed in to change notification settings - Fork 654
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
[SEDONA-549] Make RS_Union_aggr support combining all bands of multi-band rasters #1375
Merged
jiayuasu
merged 15 commits into
apache:master
from
prantogg:add-multiband-RS_Union_aggr
Apr 29, 2024
Merged
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8d8f174
Init: move class level members to data buffer
prantogg f669d03
Init: add multi-band support
prantogg 635ac12
init: add tests
prantogg 5e131f3
Add index checks
prantogg 075392a
add tests
prantogg 72260c7
Merge branch 'master' into add-multiband-RS_Union_aggr
prantogg a5147fd
fix test
prantogg f7d52cc
update docs
prantogg 6d652d2
update docs
prantogg 556b92e
fix typo
prantogg f5089ff
fix test
prantogg 4ba3de3
update doc example
prantogg aaa8b6d
add comments to doc example
prantogg 63f9598
fix lint issue
prantogg 48f2fc2
Update example to show group by geometry, year, quarter
prantogg 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
## RS_Union_Aggr | ||
|
||
Introduction: Returns a raster containing bands by specified indexes from all rasters in the provided column. Extracts the first bands from each raster and combines them into the output raster based on the input index values. | ||
Introduction: Returns a raster containing bands by specified indexes from all rasters in the provided column. Combines all bands from each raster into the output raster. The order of bands in the resultant raster are based on the input index order. | ||
|
||
!!!Note | ||
RS_Union_Aggr can take multiple banded rasters as input, but it would only extract the first band to the resulting raster. RS_Union_Aggr expects the following input, if not satisfied then will throw an IllegalArgumentException: | ||
RS_Union_Aggr expects the following input, if not satisfied then will throw an IllegalArgumentException: | ||
|
||
- Indexes to be in an arithmetic sequence without any gaps. | ||
- Indexes to be unique and not repeated. | ||
|
@@ -35,7 +35,7 @@ SELECT RS_Union_Aggr(raster, index) FROM raster_table | |
|
||
Output: | ||
|
||
This output raster contains the first band of each raster in the `raster_table` at specified index. | ||
This output raster contains all bands of each raster in the `raster_table`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we show a groupby example as well? Grouping by time and geography, similar to what we are doing with the segmentation dataset prep? |
||
|
||
``` | ||
GridCoverage2D["geotiff_coverage", GeneralEnvel... | ||
|
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.
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.
Can you provide some examples of using this function to stack rasters, using at least the example you are discussing in slack for two RGB rasters? I'm unclear on how the index column controls stacking.