Hello, We are getting strange distortions when zooming on a very large mosaic (see https://osgeo-org.atlassian.net/browse/GEOS-7793), which appear to be caused by the JAI warp operation called in ImageWorker (see https://github.com/geotools/geotools/blob/master/modules/library/coverage/src/main/java/org/geotools/image/ImageWorker.java#L3989).
Strangely enough, this doesn't happen with a single image (or smaller mosaic). The only difference I can see, is in the X and Y offset values of the image and the affine transformation. This is the picture before the operation: http://www.scitus.be/temp/original.png this is the good result http://www.scitus.be/temp/good.png and the bad result http://scitus.be/temp/bad.png Underneath this email I am also putting the planar image and warp transform details (but as you will see, only x and y offset are different). Do you have an idea what could cause this kind of distortion? I am now strongly suspecting this a bug in JAI and not resolvable in geotools, would that be possible? Also, the whole block of code can be avoided by setting the system property org.geotools.image.reduceWarpAffine=false What would be the potential disadvantage of that? (The code must be there for a reason... Is this just a performance thing...?) Kind Regards, Niels ** DETAILS FOR WORKING VERSION ** [PlanarImage[minX=1600 minY=2395 width=51 height=36 tileGridXOffset=1598 tileGridYOffset=2393 tileWidth=512 tileHeight=512 sampleModel=java.awt.image.PixelInterleavedSampleModel@3070002 colorModel=ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@4bd37c5f transparency = 1 has alpha = false isAlphaPre = false]] CONCAT_MT[PARAM_MT["Affine", PARAMETER["num_row", 3], PARAMETER["num_col", 3], PARAMETER["elt_0_0", 0.034539737749169123], PARAMETER["elt_0_2", 332894.3361804273], PARAMETER["elt_1_1", -0.01734296884752956], PARAMETER["elt_1_2", 6551844.388902134]], INVERSE_MT[PARAM_MT["Popular Visualisation Pseudo Mercator", PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6378137.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0]]], PARAM_MT["Ellipsoid_To_Geocentric", PARAMETER["dim", 2], PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6356752.314245179]], PARAM_MT["Geocentric_To_Ellipsoid", PARAMETER["dim", 2], PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6356752.314140356]], PARAM_MT["Lambert_Conformal_Conic_2SP", PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6356752.314140356], PARAMETER["central_meridian", 3.0], PARAMETER["latitude_of_origin", 46.5], PARAMETER["standard_parallel_1", 49.0], PARAMETER["false_easting", 700000.0], PARAMETER["false_northing", 6600000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 44.0]], PARAM_MT["Affine", PARAMETER["num_row", 3], PARAMETER["num_col", 3], PARAMETER["elt_0_0", 5.0], PARAMETER["elt_0_2", -2960000.0], PARAMETER["elt_1_1", -5.0], PARAMETER["elt_1_2", 35555000.0]]] ** DETAILS FOR NON-WORKING VERSION ** [PlanarImage[minX=536600 minY=272395 width=51 height=36 tileGridXOffset=536598 tileGridYOffset=272393 tileWidth=512 tileHeight=512 sampleModel=java.awt.image.PixelInterleavedSampleModel@3070002 colorModel=ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@4bd37c5f transparency = 1 has alpha = false isAlphaPre = false], null, null, null, null, null, null, null, null, null] CONCAT_MT[PARAM_MT["Affine", PARAMETER["num_row", 3], PARAMETER["num_col", 3], PARAMETER["elt_0_0", 0.034539737749169123], PARAMETER["elt_0_2", 332894.3361804273], PARAMETER["elt_1_1", -0.01734296884752956], PARAMETER["elt_1_2", 6551844.388902134]], INVERSE_MT[PARAM_MT["Popular Visualisation Pseudo Mercator", PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6378137.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0]]], PARAM_MT["Ellipsoid_To_Geocentric", PARAMETER["dim", 2], PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6356752.314245179]], PARAM_MT["Geocentric_To_Ellipsoid", PARAMETER["dim", 2], PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6356752.314140356]], PARAM_MT["Lambert_Conformal_Conic_2SP", PARAMETER["semi_major", 6378137.0], PARAMETER["semi_minor", 6356752.314140356], PARAMETER["central_meridian", 3.0], PARAMETER["latitude_of_origin", 46.5], PARAMETER["standard_parallel_1", 49.0], PARAMETER["false_easting", 700000.0], PARAMETER["false_northing", 6600000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 44.0]], PARAM_MT["Affine", PARAMETER["num_row", 3], PARAMETER["num_col", 3], PARAMETER["elt_0_0", 5.0], PARAMETER["elt_0_2", -3495000.0], PARAMETER["elt_1_1", -5.0], PARAMETER["elt_1_2", 35285000.0]]] ------------------------------------------------------------------------------ _______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel