Skip to content
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

Use native raster API in QgsGridFileWriter #60320

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

alexbruy
Copy link
Contributor

Description

Update QgsGridFileWriter class used to save interpiolation results to use QGIS raster API. This allows to save interpolation results into any GDAL-supported format, not only as ASCII grid.

Fixes #56653.

@alexbruy alexbruy added the API API improvement only, no visible user interface changes label Jan 28, 2025
@alexbruy alexbruy requested a review from nyalldawson January 28, 2025 10:11
@github-actions github-actions bot added this to the 3.42.0 milestone Jan 28, 2025
@alexbruy
Copy link
Contributor Author

Not sure if this should be backported.

Copy link

github-actions bot commented Jan 28, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 28f0d90)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 28f0d90)

@alexbruy alexbruy force-pushed the gridfilewriter-gdal branch from 1e76b8a to 9516a74 Compare January 28, 2025 11:56
@agiudiceandrea
Copy link
Contributor

Thanks for taking care of this issue! I think it's actually a bug: the algorithms allow to specify any output layer format (e.g. GeoTIFF), however the content of the output file is incorrect since it is not in the specified layer format. So I think this fix should be backported. Alternatively, I think the algorithms' output layer parameter in the GUI should list the ASCII grid format only and the algorithm should emit an exception if called with a different output layer format.

Copy link
Collaborator

@nyalldawson nyalldawson left a comment

Choose a reason for hiding this comment

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

Nice improvement!!

src/analysis/interpolation/qgsgridfilewriter.cpp Outdated Show resolved Hide resolved
@nyalldawson nyalldawson merged commit 7755764 into qgis:master Jan 29, 2025
30 checks passed
@alexbruy alexbruy deleted the gridfilewriter-gdal branch January 30, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API improvement only, no visible user interface changes backport release-3_40
Projects
None yet
3 participants