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
commit 5aebcde1a0e11f2ba83b25b3612cc74a325e0541 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Sun Apr 2 15:15:57 2023 +0200 Allow `DimensionalityReduction` to be subclassed. --- .../org/apache/sis/coverage/grid/DimensionalityReduction.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/DimensionalityReduction.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/DimensionalityReduction.java index 14e876c2f7..a6dc48d28c 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/DimensionalityReduction.java +++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/DimensionalityReduction.java @@ -71,7 +71,7 @@ import org.opengis.coverage.PointOutsideCoverageException; * @version 1.4 * @since 1.4 */ -public final class DimensionalityReduction implements UnaryOperator<GridCoverage>, Serializable { +public class DimensionalityReduction implements UnaryOperator<GridCoverage>, Serializable { /** * For cross-version compatibility. */ @@ -79,6 +79,8 @@ public final class DimensionalityReduction implements UnaryOperator<GridCoverage /** * The source grid geometry with all dimensions. + * + * @see #getSourceGridGeometry() */ private final GridGeometry sourceGeometry; @@ -163,7 +165,8 @@ public final class DimensionalityReduction implements UnaryOperator<GridCoverage } /** - * Creates information about reducing the number of dimensions of the specified grid geometry. + * Reduces the dimension of the specified grid geometry by retaining the axes specified in the given bitset. + * Axes in the reduced grid geometry will be in the same order than in the source geometry: * * @param source the grid geometry on which to select a subset of its grid dimensions. * @param gridAxes bitmask of indices of source grid dimensions to keep in the reduced grid. @@ -171,7 +174,7 @@ public final class DimensionalityReduction implements UnaryOperator<GridCoverage * @param factory the factory to use for creating new math transforms, or {@code null} if none. * @throws FactoryException if the dimensions to kept cannot be separated from the dimensions to omit. */ - private DimensionalityReduction(final GridGeometry source, final BitSet gridAxes, final MathTransformFactory factory) + protected DimensionalityReduction(final GridGeometry source, final BitSet gridAxes, final MathTransformFactory factory) throws FactoryException { gridAxesToPass = toArray(gridAxes);