Closed flamingbear closed 2 months ago
Also should have mentioned - I ran the example requests listed in the PR description, and the results look as expected in gdalinfo
(also they loaded correctly in QGIS, and were correctly geolocated with respect to an OpenStreetMap layer). Nice!
Description
This PR fundamentally changes how the default scale extent is computed.
It is now based entirely on the reprojected bounding box of the input granule.
An input image that shares its CRS with the target CRS will have no changes to the extent of the input image. An input image that had a different CRS to the target CRS will trasform the input box into the target CRS using rioxarray's transform_bounds. Which densifies each edge of the bounding rectangle before reprojection to keep a correct target CRS bounding box.
Jira Issue ID
DAS-2118
Local Test Steps
Build and run the tests.
Ensure everything passes.
Run this test request against a working Harmony-In-A-Box (build from repo branch: HARMONY-1766-numerical-parameters-in-POST):
http://localhost:3000/C1256584478-EEDTEST/ogc-api-coverages/1.0.0/collections/all/coverage/rangeset?forceAsync=true&outputcrs=EPSG%3A4326&granuleId=G1256584570-EEDTEST&format=image%2Fpng
It should pass and the output png image should have the same corner points as the raw input file [since there is no translation because the input crs == output crs]
Next make the same request but ask for it on the EASE Grid-2 Global projection EPGS:6933
http://localhost:3000/C1256584478-EEDTEST/ogc-api-coverages/1.0.0/collections/all/coverage/rangeset?forceAsync=true&outputcrs=EPSG%3A6933&granuleId=G1256584570-EEDTEST&format=image%2Fpng
You should also see an image that is bound to the input images size but has the correct metadata
You should be able to open the orignal tif, the EPSG:4326 or EPSG:6933 png flies in QGIS and see they overlap each other exactly.
PR Acceptance Checklist
CHANGELOG.md
updated to include high level summary of PR changes.docker/service_version.txt
updated if publishing a release.