Add new outputformat geotiff-cog - #4166
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new cog output format intended to generate Cloud Optimized GeoTIFF (COG) results from MapFish Print, wiring the format into the Spring output-format registry and introducing a dedicated JasperReports-backed GeoTIFF exporter.
Changes:
- Registers new
cogoutput format beans for both standard (JasperReport) and map-export templates. - Introduces
JasperReportGeoTiffOutputFormatto render a Jasper report to an in-memory image and write it as a GeoTIFF-like output via GeoTools.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| core/src/main/resources/mapfish-spring-config-output-formats.xml | Adds cog output format bean registrations for standard and map-export modes. |
| core/src/main/java/org/mapfish/print/output/JasperReportGeoTiffOutputFormat.java | New output format implementation that renders JasperPrint pages to an image and writes a tiled/compressed GeoTIFF to the response. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c5e09e1 to
aa9e583
Compare
d6fa689 to
66092e5
Compare
b73494e to
016893c
Compare
sebr72
left a comment
There was a problem hiding this comment.
Great work. Thanks.
Do not hesitate to ask any question/help to implement these comments.
| } finally { | ||
| if (writer != null) { | ||
| try { | ||
| writer.dispose(); |
There was a problem hiding this comment.
Since your output stream is a non closing one, this dispose is not sufficient. You will need to manually call the close in the superclass of your nonClosingOutputStream.
There was a problem hiding this comment.
The underlying output stream is owned by MapFish Print and must remain open. Calling FilterOutputStream.super.close() would also close that stream, which is exactly what the wrapper is intended to prevent. GeoTools closes its internal stream during dispose(), while the wrapper only flushes the MapFish stream. Do you have a different cleanup approach in mind?
This PR adds support for a new GeoTIFF COG output format. (#3805)
The implementation has been reworked to follow the project’s contribution workflow. The changes are based on the latest codebase, target the master branch, and comply with the pre-commit hooks and formatting rules.
All checks pass locally.