You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by js...@apache.org on 2025/08/08 13:57:01 UTC

(sis) branch geoapi-4.0 updated (e79df9c2d3 -> ed02ddf81f)

This is an automated email from the ASF dual-hosted git repository.

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


    from e79df9c2d3 Ensure that recursive method calls to `EPSGFactory` reach the same factory instance. Opportunistic documentation fixes.
     new d3b056299b Fix unsupported infinite and nan values in coveragejson
     new ed02ddf81f Add todo list on tuplearray interface

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/org/apache/sis/geometries/math/TupleArray.java           | 7 +++++++
 .../sis/storage/coveragejson/CoverageJsonStoreProvider.java       | 5 +++--
 .../org/apache/sis/storage/coveragejson/CoverageResource.java     | 8 +++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)


(sis) 02/02: Add todo list on tuplearray interface

Posted by js...@apache.org.
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

commit ed02ddf81fca2144c7d2625e77f376cc25fc67b4
Author: jsorel <jo...@geomatys.com>
AuthorDate: Fri Aug 8 15:56:44 2025 +0200

    Add todo list on tuplearray interface
---
 .../main/org/apache/sis/geometries/math/TupleArray.java            | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/TupleArray.java b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/TupleArray.java
index e390acae79..b87746c454 100644
--- a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/TupleArray.java
+++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/TupleArray.java
@@ -29,6 +29,13 @@ import org.apache.sis.util.ArgumentChecks;
 /**
  * A tuple array is fixed size array of tuples.
  *
+ * @todo add an implementation based on MemorySegment
+ * @todo add support for very large arrays, replace int indexing by long values, splitting in multiple tables
+ * @todo add multi dimension support
+ * @todo This class will be expected to provide efficient support for parallal processing used in API when they will available :
+ * - Vector API (https://openjdk.org/jeps/426)
+ * - GPGPU / Babylon (https://www.youtube.com/watch?v=qkr3E27XYbY)
+ *
  * @author Johann Sorel (Geomatys)
  */
 public interface TupleArray {


(sis) 01/02: Fix unsupported infinite and nan values in coveragejson

Posted by js...@apache.org.
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

commit d3b056299bd2872e4e4baaf117e0c2d5e96a8a74
Author: jsorel <jo...@geomatys.com>
AuthorDate: Fri Aug 8 15:55:56 2025 +0200

    Fix unsupported infinite and nan values in coveragejson
---
 .../sis/storage/coveragejson/CoverageJsonStoreProvider.java       | 5 +++--
 .../org/apache/sis/storage/coveragejson/CoverageResource.java     | 8 +++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageJsonStoreProvider.java b/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageJsonStoreProvider.java
index 723c9e6e8a..e4ab613434 100644
--- a/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageJsonStoreProvider.java
+++ b/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageJsonStoreProvider.java
@@ -26,6 +26,7 @@ import org.apache.sis.storage.DataStoreProvider;
 import org.apache.sis.storage.GridCoverageResource;
 import org.apache.sis.storage.ProbeResult;
 import org.apache.sis.storage.StorageConnector;
+import org.apache.sis.storage.WritableAggregate;
 import org.apache.sis.storage.base.Capability;
 import org.apache.sis.storage.base.StoreMetadata;
 import org.apache.sis.storage.base.URIDataStoreProvider;
@@ -44,8 +45,8 @@ import org.apache.sis.util.Version;
  */
 @StoreMetadata(formatName    = CoverageJsonStoreProvider.NAME,
                fileSuffixes  = {"covjson"},
-               capabilities  = Capability.READ,
-               resourceTypes = {Aggregate.class, GridCoverageResource.class})
+               capabilities  = {Capability.READ, Capability.CREATE, Capability.WRITE},
+               resourceTypes = {WritableAggregate.class, GridCoverageResource.class})
 public class CoverageJsonStoreProvider extends DataStoreProvider {
 
     public static final String NAME = "CoverageJSON";
diff --git a/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageResource.java b/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageResource.java
index 0af27f6fab..c7fa60c943 100644
--- a/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageResource.java
+++ b/incubator/src/org.apache.sis.storage.coveragejson/main/org/apache/sis/storage/coveragejson/CoverageResource.java
@@ -669,7 +669,13 @@ final class CoverageResource extends AbstractGridCoverageResource {
         while (ite.next()) {
             ite.getPixel(pixel);
             for (int i = 0; i < nbSample; i++) {
-                arrays[i].values.add(pixel[i]);
+                double v = pixel[i];
+                if (!Double.isFinite(v)) {
+                    //json do not want infinite or NaN
+                    arrays[i].values.add(null);
+                } else {
+                    arrays[i].values.add(v);
+                }
             }
         }