sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject [sis] branch geoapi-4.0 updated: Coverage : return NaN rather then an exception on conversion of value outside of categories ranges
Date Wed, 16 Jan 2019 09:28:31 GMT
This is an automated email from the ASF dual-hosted git repository.

jsorel 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 363c5d9  Coverage : return NaN rather then an exception on conversion of value outside
of categories ranges
363c5d9 is described below

commit 363c5d92853db38547e6662938fea4c24e601a33
Author: jsorel <johann.sorel@geomatys.com>
AuthorDate: Wed Jan 16 11:28:08 2019 +0100

    Coverage : return NaN rather then an exception on conversion of value outside of categories
ranges
---
 .../sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java b/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java
index f008311..fca7f29 100644
--- a/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java
+++ b/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java
@@ -548,7 +548,8 @@ final class CategoryList extends AbstractList<Category> implements
MathTransform
         {
             category = search(value);
             if (category == null) {
-                throw new TransformException(Resources.format(Resources.Keys.NoCategoryForValue_1,
value));
+                return Double.NaN;
+                //throw new TransformException(Resources.format(Resources.Keys.NoCategoryForValue_1,
value));
             }
             last = category;
         }


Mime
View raw message