Add transform_precision parameter to merge()#1456
Merged
brendancol merged 3 commits intomainfrom May 4, 2026
Merged
Conversation
reproject() exposes transform_precision but merge() did not, so users had no way to pick the control-grid subdivision count or request exact per-pixel transforms when merging. The parameter is now plumbed through _merge_inmemory and _merge_dask instead of being hardcoded to 16. max_memory was intentionally not added because merge() has no streaming path; the docstring notes the dask path for very large outputs. Closes #1452
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
…n _merge_inmemory Co-authored-by: brendancol <433221+brendancol@users.noreply.github.com>
Contributor
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
…ision Notes Co-authored-by: brendancol <433221+brendancol@users.noreply.github.com>
Contributor
Resolved in 3b37a14. The conflict was in the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
Summary
transform_precision=16tomerge()and plumbs it through_merge_inmemoryand_merge_dask(previously hardcoded to 16). Set to 0 for exact per-pixel transforms matching GDAL/rasterio._validate_grid_paramsso the existing validation runs.merge()docstring with the parameter description and adds a Notes line saying the dask path should be used for very large outputs.max_memoryis not added;merge()has no streaming path that would consume it.Closes #1452
Test plan
pytest xrspatial/tests/test_reproject.py -x(153 passed, including 5 new tests underTestValidateMergeGridParams)merge([raster], transform_precision=0)runs and produces a resulttransform_precision=16(no kwarg) still worksValueErrormatchingtransform_precisiontransform_precision=0andtransform_precision=16produce numerically identical merged output (rtol=1e-10) on smooth EPSG:4326 inputs