Skip to content

gdal_translate: transform entire bounds of -projwin, not just two corners #12127

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

Merged
merged 1 commit into from
Apr 11, 2025

Conversation

dbaston
Copy link
Member

@dbaston dbaston commented Apr 10, 2025

References #12100

@@ -847,7 +847,7 @@ def test_gdal_translate_31(gdal_translate_path, tmp_path):
dst_tif = str(tmp_path / "test_gdal_translate_30.tif")

gdaltest.runexternal(
f"{gdal_translate_path} -projwin_srs EPSG:4267 -projwin -117.641168620797 33.9023526904262 -117.628110837847 33.8915970129613 ../gcore/data/byte.tif {dst_tif}"
f"{gdal_translate_path} -projwin_srs EPSG:4267 -projwin -117.6408 33.9023 -117.6282 33.8920 ../gcore/data/byte.tif {dst_tif}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to avoid changing the test result. projwin is a parallelogram after reprojecting, I adjusted the coordinates to keep the window within the source raster.

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 70.585% (+0.01%) from 70.574%
when pulling 9de807a on dbaston:translate-projwin-transform-extent
into c4a2e0b on OSGeo:master.

@rouault rouault added this to the 3.11.0 milestone Apr 11, 2025
@rouault rouault merged commit 4061ad3 into OSGeo:master Apr 11, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants