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: Reduce the visibility of an EllipsoidalHeightCombiner internal method.
Date Wed, 29 May 2019 18:39:09 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 369e2e5  Reduce the visibility of an EllipsoidalHeightCombiner internal method.
369e2e5 is described below

commit 369e2e5e5bbee9bb909bfc8aa493aeaec6378aa4
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Wed May 29 20:35:44 2019 +0200

    Reduce the visibility of an EllipsoidalHeightCombiner internal method.
---
 .../sis/internal/metadata/EllipsoidalHeightCombiner.java  | 15 +++++++++++++--
 .../src/main/java/org/apache/sis/referencing/CRS.java     |  3 +--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/EllipsoidalHeightCombiner.java
b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/EllipsoidalHeightCombiner.java
index d6d4a7e..75288ef 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/EllipsoidalHeightCombiner.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/EllipsoidalHeightCombiner.java
@@ -44,7 +44,7 @@ import org.apache.sis.util.ArraysExt;
  * three-dimensional CRS. This is the converse of {@link org.apache.sis.referencing.EllipsoidalHeightSeparator}.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
  *
  * @see org.apache.sis.referencing.EllipsoidalHeightSeparator
  *
@@ -107,6 +107,17 @@ public class EllipsoidalHeightCombiner {
     }
 
     /**
+     * Creates a compound CRS using properties inferred from the given components.
+     *
+     * @param  components  ordered array of {@code CoordinateReferenceSystem} objects.
+     * @return the coordinate reference system for the given properties.
+     * @throws FactoryException if the object creation failed.
+     */
+    public final CoordinateReferenceSystem createCompoundCRS(CoordinateReferenceSystem...
components) throws FactoryException {
+        return createCompoundCRS(properties(components), components);
+    }
+
+    /**
      * Creates a compound CRS, but we special processing for (two-dimensional Geographic
+ ellipsoidal heights) tuples.
      * If any such tuple is found, a three-dimensional geographic CRS is created instead
than the compound CRS.
      *
@@ -219,7 +230,7 @@ public class EllipsoidalHeightCombiner {
      * @param  components  the components for which to get a default set of properties.
      * @return suggested properties in a modifiable map. Callers can modify the returned
map.
      */
-    public static Map<String,Object> properties(final CoordinateReferenceSystem...
components) {
+    static Map<String,Object> properties(final CoordinateReferenceSystem... components)
{
         final StringBuilder name = new StringBuilder(40);
         Extent domain = null;
         for (int i=0; i<components.length; i++) {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
index 1c2d1eb..efa9c0e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
@@ -921,14 +921,13 @@ public final class CRS extends Static {
                 break;
             }
         }
-        final Map<String,?> properties = EllipsoidalHeightCombiner.properties(components);
         return new EllipsoidalHeightCombiner() {
             @Override public void initialize(final int factoryTypes) {
                 if ((factoryTypes & CRS)       != 0) crsFactory = DefaultFactories.forBuildin(CRSFactory.class);
                 if ((factoryTypes & CS)        != 0) csFactory  = DefaultFactories.forBuildin(CSFactory.class);
                 if ((factoryTypes & OPERATION) != 0) opFactory  = DefaultFactories.forBuildin(CoordinateOperationFactory.class);
             }
-        }.createCompoundCRS(properties, components);
+        }.createCompoundCRS(components);
     }
 
     /**


Mime
View raw message