sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Bug fix: test for minimal coordinates shall be done on the extent specified by user (xmin, ymin), not on (ix, iy).
Date Thu, 04 Jun 2020 12:23:55 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new f9bd998  Bug fix: test for minimal coordinates shall be done on the extent specified
by user (xmin, ymin), not on (ix, iy).
f9bd998 is described below

commit f9bd998fd57b23c7ddba1a2566adf2e64521bb01
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Thu Jun 4 14:23:05 2020 +0200

    Bug fix: test for minimal coordinates shall be done on the extent specified by user (xmin,
ymin), not on (ix, iy).
---
 .../src/main/java/org/apache/sis/coverage/grid/GridCoverage2D.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage2D.java
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage2D.java
index 42e6834..329ffb7 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage2D.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage2D.java
@@ -593,7 +593,7 @@ public class GridCoverage2D extends GridCoverage {
                      */
                     final int nx = toIntExact(min(xmax, ix + width  - 1) - xmin + 1);
                     final int ny = toIntExact(min(ymax, iy + height - 1) - ymin + 1);
-                    if ((ix | iy) == 0 && nx == width && ny == height) {
+                    if ((xmin | ymin) == 0 && nx == width && ny == height)
{
                         return data;
                     }
                     return ((BufferedImage) data).getSubimage(toIntExact(xmin), toIntExact(ymin),
nx, ny);


Mime
View raw message