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: Move ConvertedGridCoverage to package-private class.
Date Mon, 06 Jan 2020 13:23:22 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 c7b967d  Move ConvertedGridCoverage to package-private class.
c7b967d is described below

commit c7b967d1e317586a8739e23068d8e401cb1ce0c9
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Mon Jan 6 13:12:04 2020 +0100

    Move ConvertedGridCoverage to package-private class.
---
 .../j2d => coverage/grid}/ConvertedGridCoverage.java   | 18 +++++++++---------
 .../org/apache/sis/coverage/grid/GridCoverage.java     |  3 +--
 .../org/apache/sis/coverage/grid/GridCoverage2D.java   |  1 -
 .../sis/internal/coverage/j2d/RasterFactory.java       |  2 +-
 4 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ConvertedGridCoverage.java
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ConvertedGridCoverage.java
similarity index 94%
rename from core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ConvertedGridCoverage.java
rename to core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ConvertedGridCoverage.java
index 64efd29..531052d 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ConvertedGridCoverage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ConvertedGridCoverage.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.coverage.j2d;
+package org.apache.sis.coverage.grid;
 
 import java.util.List;
 import java.util.Arrays;
@@ -30,8 +30,8 @@ import org.opengis.referencing.operation.TransformException;
 import org.opengis.referencing.operation.NoninvertibleTransformException;
 import org.apache.sis.referencing.operation.transform.MathTransforms;
 import org.apache.sis.coverage.SampleDimension;
-import org.apache.sis.coverage.grid.GridCoverage;
-import org.apache.sis.coverage.grid.GridExtent;
+import org.apache.sis.internal.coverage.j2d.BandedSampleConverter;
+import org.apache.sis.internal.coverage.j2d.RasterFactory;
 import org.apache.sis.measure.NumberRange;
 
 
@@ -53,12 +53,12 @@ import org.apache.sis.measure.NumberRange;
  * @since   1.0
  * @module
  */
-public final class ConvertedGridCoverage extends GridCoverage {
+final class ConvertedGridCoverage extends GridCoverage {
     /**
      * The band to make visible when the image is shown on screen.
      * All other bands, if any, will be computed their result ignored at display time.
      */
-    public static final int VISIBLE_BAND = 0;
+    static final int VISIBLE_BAND = 0;
 
     /**
      * The coverage containing source values.
@@ -112,7 +112,7 @@ public final class ConvertedGridCoverage extends GridCoverage {
      * @return the converted coverage. May be {@code source}.
      * @throws NoninvertibleTransformException if this constructor can not build a full conversion
chain to target.
      */
-    public static GridCoverage create(final GridCoverage source, final boolean converted)
throws NoninvertibleTransformException {
+    static GridCoverage create(final GridCoverage source, final boolean converted) throws
NoninvertibleTransformException {
         final List<SampleDimension> sources = source.getSampleDimensions();
         final List<SampleDimension> targets = new ArrayList<>(sources.size());
         final MathTransform1D[]  converters = converters(sources, targets, converted);
@@ -129,9 +129,9 @@ public final class ConvertedGridCoverage extends GridCoverage {
      * @return the transforms, or {@code null} if all transforms are identity transform.
      * @throws NoninvertibleTransformException if this method can not build a full conversion
chain.
      */
-    public static MathTransform1D[] converters(final List<SampleDimension> sources,
-                                               final List<SampleDimension> targets,
-                                               final boolean converted)
+    static MathTransform1D[] converters(final List<SampleDimension> sources,
+                                        final List<SampleDimension> targets,
+                                        final boolean converted)
             throws NoninvertibleTransformException
     {
         final int               numBands   = sources.size();
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java
index dd885b9..4bd0db7 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java
@@ -32,7 +32,6 @@ import org.apache.sis.internal.util.UnmodifiableArrayList;
 import org.apache.sis.coverage.SampleDimension;
 import org.apache.sis.coverage.SubspaceNotSpecifiedException;
 import org.apache.sis.internal.coverage.j2d.ColorModelFactory;
-import org.apache.sis.internal.coverage.j2d.ConvertedGridCoverage;
 import org.apache.sis.util.collection.DefaultTreeTable;
 import org.apache.sis.util.collection.TableColumn;
 import org.apache.sis.util.collection.TreeTable;
@@ -158,7 +157,7 @@ public abstract class GridCoverage {
      * @param  dataType     the color model type as one {@link java.awt.image.DataBuffer}
constants.
      * @return proposed color model, or {@code null} if none.
      */
-    protected final ColorModel createColorModel(final int visibleBand, final int dataType)
{
+    final ColorModel createColorModel(final int visibleBand, final int dataType) {
         return ColorModelFactory.createColorModel(sampleDimensions, visibleBand, dataType,
ColorModelFactory.GRAYSCALE);
     }
 
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 a23df3e..4990ff1 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
@@ -42,7 +42,6 @@ import org.opengis.referencing.operation.TransformException;
 import org.opengis.referencing.operation.MathTransform1D;
 import org.apache.sis.coverage.SampleDimension;
 import org.apache.sis.internal.coverage.j2d.ImageUtilities;
-import org.apache.sis.internal.coverage.j2d.ConvertedGridCoverage;
 import org.apache.sis.internal.coverage.j2d.BandedSampleConverter;
 import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.internal.system.DefaultFactories;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/RasterFactory.java
b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/RasterFactory.java
index 0b96c0b..28d26ba 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/RasterFactory.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/RasterFactory.java
@@ -235,7 +235,7 @@ public final class RasterFactory extends Static {
      * @param  keepFloat  whether to avoid integer types if the range uses floating point
numbers.
      * @return the {@link DataBuffer} type or {@link DataBuffer#TYPE_UNDEFINED} if the given
range was null.
      */
-    static int getDataType(final NumberRange<?> range, final boolean keepFloat) {
+    public static int getDataType(final NumberRange<?> range, final boolean keepFloat)
{
         if (range == null) {
             return DataBuffer.TYPE_UNDEFINED;
         }


Mime
View raw message