diff --git a/core/build.gradle b/core/build.gradle index aae117fb8e..a76c532c25 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -153,14 +153,14 @@ dependencies { 'io.dropwizard.metrics:metrics-logback:4.2.29', ) geotools( - 'org.geotools:gt-epsg-hsql:30.2', - 'org.geotools:gt-render:30.2', - 'org.geotools:gt-geojson:30.2', - 'org.geotools:gt-geotiff:30.2', - 'org.geotools:gt-wms:30.2', - 'org.geotools.xsd:gt-xsd-gml3:30.2', - 'org.geotools:gt-svg:30.2', - 'org.geotools:gt-cql:30.2', + 'org.geotools:gt-epsg-hsql:32.2', + 'org.geotools:gt-render:32.2', + 'org.geotools:gt-geojson:32.2', + 'org.geotools:gt-geotiff:32.2', + 'org.geotools:gt-wms:32.2', + 'org.geotools.xsd:gt-xsd-gml3:32.2', + 'org.geotools:gt-svg:32.2', + 'org.geotools:gt-cql:32.2', ) jasper( 'net.sf.jasperreports:jasperreports:6.21.4', diff --git a/core/src/main/java/org/mapfish/print/map/geotools/AbstractGeotoolsLayer.java b/core/src/main/java/org/mapfish/print/map/geotools/AbstractGeotoolsLayer.java index 6f87450f9a..357ea22727 100644 --- a/core/src/main/java/org/mapfish/print/map/geotools/AbstractGeotoolsLayer.java +++ b/core/src/main/java/org/mapfish/print/map/geotools/AbstractGeotoolsLayer.java @@ -108,7 +108,8 @@ public final void render( RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON)); hints.add( new RenderingHints( - RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC)); + RenderingHints.KEY_INTERPOLATION, + RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR)); hints.add( new RenderingHints(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY)); hints.add( diff --git a/core/src/main/java/org/mapfish/print/map/image/ImageLayer.java b/core/src/main/java/org/mapfish/print/map/image/ImageLayer.java index f6b4624138..c525e263a6 100644 --- a/core/src/main/java/org/mapfish/print/map/image/ImageLayer.java +++ b/core/src/main/java/org/mapfish/print/map/image/ImageLayer.java @@ -123,7 +123,8 @@ protected BufferedImage loadImage( hints.put(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); hints.put(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE); hints.put(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); - hints.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); + hints.put( + RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); hints.put(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE); hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); diff --git a/core/src/test/resources/org/mapfish/print/processor/map/center_geotiff_flexible_scale/expectedSimpleImage.png b/core/src/test/resources/org/mapfish/print/processor/map/center_geotiff_flexible_scale/expectedSimpleImage.png index 1d4bb9d066..0347b78b0e 100644 Binary files a/core/src/test/resources/org/mapfish/print/processor/map/center_geotiff_flexible_scale/expectedSimpleImage.png and b/core/src/test/resources/org/mapfish/print/processor/map/center_geotiff_flexible_scale/expectedSimpleImage.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/center_osm_rotation_fixedscale/expectedSimpleImage.png b/core/src/test/resources/org/mapfish/print/processor/map/center_osm_rotation_fixedscale/expectedSimpleImage.png index 27573b15eb..c1f161f451 100644 Binary files a/core/src/test/resources/org/mapfish/print/processor/map/center_osm_rotation_fixedscale/expectedSimpleImage.png and b/core/src/test/resources/org/mapfish/print/processor/map/center_osm_rotation_fixedscale/expectedSimpleImage.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/center_wms_rotation_small_tiles/expectedSimpleImage.png b/core/src/test/resources/org/mapfish/print/processor/map/center_wms_rotation_small_tiles/expectedSimpleImage.png index 509e2372c7..8c32349d61 100644 Binary files a/core/src/test/resources/org/mapfish/print/processor/map/center_wms_rotation_small_tiles/expectedSimpleImage.png and b/core/src/test/resources/org/mapfish/print/processor/map/center_wms_rotation_small_tiles/expectedSimpleImage.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_123-linux.png b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_123-linux.png index 72667d2462..224d1c5554 100644 Binary files a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_123-linux.png and b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_123-linux.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_203-linux.png b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_203-linux.png index dbc46e08f2..b3f569a24c 100644 Binary files a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_203-linux.png and b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_203-linux.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_23-linux.png b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_23-linux.png index 9e260ba649..1345d640e3 100644 Binary files a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_23-linux.png and b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_23-linux.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_310-linux.png b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_310-linux.png index dae57bc2ae..c67bb6c101 100644 Binary files a/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_310-linux.png and b/core/src/test/resources/org/mapfish/print/processor/map/grid_numlines_points_fixedscale_rotated/expectedSimpleImage_310-linux.png differ diff --git a/core/src/test/resources/org/mapfish/print/servlet/expectedSimpleImage.png b/core/src/test/resources/org/mapfish/print/servlet/expectedSimpleImage.png index 7d910d8d49..2db4491301 100644 Binary files a/core/src/test/resources/org/mapfish/print/servlet/expectedSimpleImage.png and b/core/src/test/resources/org/mapfish/print/servlet/expectedSimpleImage.png differ diff --git a/examples/src/test/java/org/mapfish/print/ExamplesTest.java b/examples/src/test/java/org/mapfish/print/ExamplesTest.java index 0d57c2cf25..963efa6288 100644 --- a/examples/src/test/java/org/mapfish/print/ExamplesTest.java +++ b/examples/src/test/java/org/mapfish/print/ExamplesTest.java @@ -18,10 +18,10 @@ import java.net.URL; import java.net.URLConnection; import java.nio.charset.StandardCharsets; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.TreeMap; import java.util.regex.Pattern; import javax.imageio.ImageIO; import org.apache.commons.io.IOUtils; @@ -202,7 +202,7 @@ public void testExampleDirectoryNames() { @Test public void testAllExamples() { - Map errors = new HashMap<>(); + Map errors = new TreeMap<>(); int testsRan = 0; final File examplesDir = getFile(ExamplesTest.class, "/examples"); @@ -304,7 +304,7 @@ private int runExample(File example, Map errors) { compareImages(errors, http.getInputStream(), example, requestFile, outputFormat); } } - } catch (RuntimeException e) { + } catch (IOException | AssertionError | RuntimeException e) { errors.put(String.format("%s (%s)", example.getName(), requestFile.getName()), e); } } @@ -329,7 +329,7 @@ private void compareImages( if (!expectedOutput.exists()) { errors.put( example.getName() + " (" + requestFile.getName() + ")", - new Exception("File not found: " + expectedOutput.toString())); + new Exception("File not found: " + expectedOutput)); } if (!"bmp".equals(outputFormat)) { @@ -345,8 +345,7 @@ private void pdfaValidate( String exampleName, String requestFileName) { PDFAFlavour flavour = PDFAFlavour.PDFA_1_A; - PDFAValidator validator = ValidatorFactory.createValidator(flavour, false); - try { + try (PDFAValidator validator = ValidatorFactory.createValidator(flavour, false)) { GFModelParser parser = GFModelParser.createModelWithFlavour(http.getInputStream(), flavour); ValidationResult result = validator.validate(parser); LOGGER.warn("Example {} is PDF/A conform: {}", exampleName, result.isCompliant()); diff --git a/examples/src/test/resources/examples/crosses_point_grid/expected_output/requestData-new-york-with-crosses-grid-22-degree-rotation.png b/examples/src/test/resources/examples/crosses_point_grid/expected_output/requestData-new-york-with-crosses-grid-22-degree-rotation.png index f4d1e030c2..e34bcc9ca4 100644 Binary files a/examples/src/test/resources/examples/crosses_point_grid/expected_output/requestData-new-york-with-crosses-grid-22-degree-rotation.png and b/examples/src/test/resources/examples/crosses_point_grid/expected_output/requestData-new-york-with-crosses-grid-22-degree-rotation.png differ diff --git a/examples/src/test/resources/examples/native_mix/expected_output/requestData.png b/examples/src/test/resources/examples/native_mix/expected_output/requestData.png index d2ecc3f7dd..c61461392f 100644 Binary files a/examples/src/test/resources/examples/native_mix/expected_output/requestData.png and b/examples/src/test/resources/examples/native_mix/expected_output/requestData.png differ diff --git a/examples/src/test/resources/examples/print_osm_new_york_EPSG_3857/expected_output/requestData-scale-rotate-osm.png b/examples/src/test/resources/examples/print_osm_new_york_EPSG_3857/expected_output/requestData-scale-rotate-osm.png index 7230fed183..70dc564746 100644 Binary files a/examples/src/test/resources/examples/print_osm_new_york_EPSG_3857/expected_output/requestData-scale-rotate-osm.png and b/examples/src/test/resources/examples/print_osm_new_york_EPSG_3857/expected_output/requestData-scale-rotate-osm.png differ