Speed up merge_tile_datasets_within_extent#148
Open
mikegraham wants to merge 2 commits intoACCESS-Cloud-Based-InSAR:devfrom
Open
Speed up merge_tile_datasets_within_extent#148mikegraham wants to merge 2 commits intoACCESS-Cloud-Based-InSAR:devfrom
mikegraham wants to merge 2 commits intoACCESS-Cloud-Based-InSAR:devfrom
Conversation
2dfdf3a to
01b48a8
Compare
Collaborator
|
Hey @mikegraham - sorry it's getting delayed. I am not going to be able to review this for a little bit (likely a couple weeks). Hope you can use your forked version. Also, make sure (generally) there are no breaking changes since this library is used by a few different operational libraries that rely on consistent APIs including DockerizedTopsApp with generate S1 GUNWs. I really hate this pattern that I have from I wish I could remove the second line e.g. if an array is passed that has shape length 2, it returns an array of similar shape, but a lot of different downstream libraries already account for this annoyance. Anyways, thanks! |
b7b363b to
f091e4a
Compare
rasterio.merge.merge() accepts open DatasetReader objects with a bounds parameter. The old code manually read each tile into windowed arrays, wrapped them in MemoryFiles, then passed those to merge(), which reads from datasets internally anyway. The merge bounds are computed from the union of per-tile windows (via get_window_from_extent) to preserve identical output dimensions. n_threads is passed through as GDAL_NUM_THREADS for decompression.
f091e4a to
4ab2df5
Compare
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.
Closes #147
Update merge_tile_datasets_within_extent to do the windowing at the rasterio level