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

asf-gitbox-commits pushed a commit to branch geoapi-3.1
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 60f07fc2469accb6869629505ef57e3f2d5ba3c8
Merge: a646368864 682ea0296f
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Wed May 6 16:20:57 2026 +0200

    Merge branch 'geoapi-4.0' into geoapi-3.1

 .../resources/IndexedResourceCompiler.java         |  44 +-
 .../org/apache/sis/cloud/aws/s3/Resources.java     |  14 +
 .../sis/coverage/grid/BufferedGridCoverage.java    |   5 +-
 .../apache/sis/coverage/grid/DefaultEvaluator.java |   3 +-
 .../apache/sis/coverage/grid/GridCRSBuilder.java   | 540 +++++++++++++++
 .../org/apache/sis/coverage/grid/GridExtent.java   |  64 +-
 .../apache/sis/coverage/grid/GridExtentCRS.java    | 413 ------------
 .../org/apache/sis/coverage/grid/GridGeometry.java |  59 +-
 .../sis/coverage/grid/ResampledGridCoverage.java   |   4 +-
 .../apache/sis/coverage/grid/SliceGeometry.java    |   3 +-
 .../main/org/apache/sis/feature/Validator.java     |   3 +-
 .../org/apache/sis/feature/internal/Resources.java |  14 +
 .../geometry/wrapper/SpatialOperationContext.java  |   5 +-
 .../apache/sis/image/BandedSampleConverter.java    |   6 +-
 .../main/org/apache/sis/image/DataType.java        |   2 +-
 .../org/apache/sis/image/SourceAlignedImage.java   |   2 +-
 .../image/internal/shared/BatchComputedImage.java  |   7 +-
 .../image/internal/shared/ColorModelFactory.java   | 121 +++-
 .../apache/sis/coverage/grid/GridGeometryTest.java |  78 ++-
 .../builder/AssociationRoleBuilderTest.java        |   7 +-
 .../apache/sis/metadata/internal/Resources.java    |  14 +
 .../metadata/internal/shared/NameToIdentifier.java |  10 +-
 .../org/apache/sis/metadata/sql/Dispatcher.java    |  43 +-
 .../org/apache/sis/metadata/sql/MetadataProxy.java |  13 +-
 .../apache/sis/metadata/sql/MetadataSource.java    |  22 +-
 .../org/apache/sis/metadata/sql/package-info.java  |   2 +-
 .../org/apache/sis/map/internal/Resources.java     |  14 +
 .../gazetteer/MilitaryGridReferenceSystem.java     |   4 +-
 .../referencing/gazetteer/internal/Resources.java  |  14 +
 .../sis/geometry/AbstractDirectPosition.java       |   2 +
 .../main/org/apache/sis/geometry/Envelopes.java    |   2 +-
 .../main/org/apache/sis/io/wkt/Formatter.java      |   5 +-
 .../main/org/apache/sis/io/wkt/WKTFormat.java      |   6 +-
 .../main/org/apache/sis/io/wkt/Warnings.java       | 145 ++--
 .../main/org/apache/sis/io/wkt/package-info.java   |   2 +-
 .../sis/referencing/AbstractIdentifiedObject.java  |  16 +-
 .../main/org/apache/sis/referencing/Builder.java   |  14 +-
 .../main/org/apache/sis/referencing/CRS.java       |   8 +-
 .../main/org/apache/sis/referencing/CommonCRS.java |  27 +-
 .../referencing/EllipsoidalHeightSeparator.java    |   8 +-
 .../apache/sis/referencing/IdentifiedObjects.java  |  10 +-
 .../apache/sis/referencing/NamedIdentifier.java    |  44 +-
 .../sis/referencing/StandardDefinitions.java       |   4 +-
 .../sis/referencing/crs/DefaultDerivedCRS.java     |   3 +
 .../org/apache/sis/referencing/cs/AbstractCS.java  |   2 +-
 .../apache/sis/referencing/cs/DefaultAffineCS.java |   2 +-
 .../sis/referencing/cs/DefaultCylindricalCS.java   |   2 +-
 .../apache/sis/referencing/cs/DefaultLinearCS.java |   2 +-
 .../apache/sis/referencing/cs/DefaultPolarCS.java  |   2 +-
 .../sis/referencing/cs/DefaultSphericalCS.java     |   2 +-
 .../apache/sis/referencing/cs/DefaultTimeCS.java   |  22 +-
 .../sis/referencing/cs/DefaultVerticalCS.java      |   2 +-
 .../apache/sis/referencing/cs/package-info.java    |   2 +-
 .../sis/referencing/datum/AbstractDatum.java       |  14 +-
 .../referencing/datum/DefaultDatumEnsemble.java    |   4 +-
 .../referencing/datum/DefaultGeodeticDatum.java    |  10 +-
 .../referencing/factory/GeodeticObjectFactory.java |  37 +
 .../referencing/factory/IdentifiedObjectSet.java   |   2 +-
 .../apache/sis/referencing/internal/Resources.java |  14 +
 .../internal/shared/ReferencingUtilities.java      |   8 +-
 .../operation/AbstractCoordinateOperation.java     |  60 +-
 .../operation/AbstractSingleOperation.java         |   3 +-
 .../operation/CoordinateOperationFinder.java       |   2 +-
 .../referencing/operation/DefaultConversion.java   | 123 ++--
 .../DefaultCoordinateOperationFactory.java         |   2 +-
 .../operation/DefaultPassThroughOperation.java     |   2 -
 .../referencing/operation/DefaultProjection.java   |   3 +-
 .../referencing/operation/DefiningConversion.java  | 163 +++++
 .../apache/sis/parameter/ParameterFormatTest.java  |   3 +-
 .../test/org/apache/sis/referencing/CRSTest.java   |  32 +
 .../factory/GeodeticObjectFactoryTest.java         |   5 +-
 .../internal/shared/DefinitionVerifierTest.java    |   3 +-
 .../operation/DefaultConversionTest.java           |   2 +-
 .../operation/HardCodedConversions.java            |   2 +-
 .../provider/ParameterNameTableGenerator.java      |   4 +-
 .../transform/DefaultMathTransformFactoryTest.java |   4 +-
 .../apache/sis/storage/geotiff/base/Resources.java |  14 +
 .../sis/storage/geotiff/GeoTiffStoreTest.java      |   4 +-
 .../test/org/apache/sis/storage/geotiff/tiled.tiff | Bin 3882 -> 2334 bytes
 .../org/apache/sis/storage/geotiff/untiled.tiff    | Bin 2602 -> 1054 bytes
 .../org/apache/sis/storage/netcdf/base/Axis.java   |   7 +-
 .../sis/storage/netcdf/internal/Resources.java     |  14 +
 .../apache/sis/storage/sql/feature/Resources.java  |  14 +
 .../main/org/apache/sis/storage/DataStore.java     |  10 +-
 .../apache/sis/storage/base/MetadataBuilder.java   |   6 +-
 .../org/apache/sis/storage/internal/Resources.java |  14 +
 .../main/org/apache/sis/util/resources/Errors.java |  14 +
 .../apache/sis/util/resources/KeyConstants.java    |  38 +-
 .../org/apache/sis/util/resources/Messages.java    |  14 +
 .../resources/ResourceInternationalString.java     |  10 +-
 .../org/apache/sis/util/resources/Vocabulary.java  |  24 +
 .../sis/util/resources/Vocabulary.properties       |   6 +-
 .../sis/util/resources/Vocabulary_fr.properties    |   6 +-
 geoapi/snapshot                                    |   2 +-
 .../main/org/apache/sis/geometries/Capsule.java    | 126 ++++
 .../main/org/apache/sis/geometries/Cylinder.java   | 108 ++-
 .../main/org/apache/sis/geometries/Frustrum.java   |  71 ++
 .../apache/sis/geometries/OrientedGeometry.java    |  57 ++
 .../main/org/apache/sis/geometries/Plane.java      | 138 ++++
 .../main/org/apache/sis/geometries/Ray.java        | 128 ++++
 .../main/org/apache/sis/geometries/Sphere.java     |   7 +-
 .../internal/shared/AbstractOrientedGeometry.java  |  54 ++
 .../apache/sis/geometries/math/EasingMethod.java   | 302 +++++++++
 .../org/apache/sis/geometries/math/Transform.java  |   2 +-
 .../{Cone.java => scene/physics/package-info.java} |  19 +-
 .../sis/geometries/math/EasingMethodTest.java      |  35 +-
 .../sis/storage/shapefile/ShapefileStore.java      |  64 +-
 .../apache/sis/gui/coverage/CoverageCanvas.java    |  85 ++-
 .../apache/sis/gui/coverage/CoverageControls.java  |   7 +-
 .../apache/sis/gui/coverage/CoverageExplorer.java  |  27 +-
 .../org/apache/sis/gui/coverage/GridControls.java  |   6 +-
 .../apache/sis/gui/coverage/GridSliceSelector.java |   2 +-
 .../main/org/apache/sis/gui/coverage/GridView.java |  27 +-
 .../org/apache/sis/gui/coverage/ImageRequest.java  |  47 +-
 .../sis/gui/coverage/StyledRenderingData.java      |  10 +
 .../apache/sis/gui/coverage/ViewAndControls.java   |   3 +-
 .../org/apache/sis/gui/internal/Resources.java     |  16 +-
 .../apache/sis/gui/internal/Resources.properties   |   2 +-
 .../sis/gui/internal/Resources_fr.properties       |   2 +-
 .../main/org/apache/sis/gui/internal/Styles.java   |   2 +-
 .../main/org/apache/sis/gui/map/MapCanvas.java     |  47 +-
 .../main/org/apache/sis/gui/map/MapMenu.java       |   1 +
 .../main/org/apache/sis/gui/map/MultiCanvas.java   |  45 +-
 .../sis/gui/map/RenderingCompletedEvent.java       |  86 +++
 .../main/org/apache/sis/gui/map/RenderingTask.java |  16 +-
 .../main/org/apache/sis/gui/map/StatusBar.java     | 159 +++--
 .../org/apache/sis/gui/map/ValuesUnderCursor.java  |   1 +
 .../apache/sis/gui/referencing/AuthorityCodes.java |  32 +-
 .../org/apache/sis/gui/referencing/CRSChooser.java |  40 +-
 .../apache/sis/gui/referencing/FilterByDatum.java  | 182 +++++
 .../org/apache/sis/gui/referencing/MenuSync.java   |  47 +-
 .../gui/referencing/RecentReferenceSystems.java    | 743 ++++++++++-----------
 .../org/apache/sis/gui/referencing/Unverified.java |  60 ++
 .../org/apache/sis/storage/panama/Resources.java   |  14 +
 134 files changed, 3934 insertions(+), 1449 deletions(-)

diff --cc 
endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java
index 4b7a583780,46caa43a23..adf6e7ea3a
--- 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java
+++ 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java
@@@ -43,11 -43,9 +43,12 @@@ import org.apache.sis.referencing.crs.D
  import org.apache.sis.measure.Units;
  import org.apache.sis.util.resources.Errors;
  import org.apache.sis.util.internal.shared.Constants;
+ import org.apache.sis.util.collection.BackingStoreException;
  import org.apache.sis.metadata.iso.citation.Citations;
  
 +// Specific to the main and geoapi-3.1 branches:
 +import org.opengis.referencing.crs.GeneralDerivedCRS;
 +
  // Specific to the geoapi-3.1 and geoapi-4.0 branches:
  import org.opengis.filter.SpatialOperatorName;
  import org.opengis.filter.DistanceOperatorName;
diff --cc 
endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/Dispatcher.java
index 9669c12c11,9a8a7bff84..c9bb1dd381
--- 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/Dispatcher.java
+++ 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/Dispatcher.java
@@@ -137,7 -133,7 +139,7 @@@ final class Dispatcher implements Invoc
       * @return the value to be returned from the public method invoked by the 
method.
       */
      @Override
-     public Object invoke(final Object proxy, Method method, final Object[] 
args) {
 -    public Object invoke(final Object proxy, final Method method, final 
Object[] args) throws Exception {
++    public Object invoke(final Object proxy, Method method, final Object[] 
args) throws Exception {
          final int n = (args != null) ? args.length : 0;
          switch (method.getName()) {
              case "toString": {
@@@ -331,6 -329,27 +337,27 @@@
          return value;
      }
  
+     /**
+      * Copies the content to an ordinary implementation class (plain old 
object).
+      * The returned object should be serializable if allowed by the 
implementation.
+      *
+      * @param  proxy   the object on which the method is invoked.
+      * @return a copy of this metadata object.
+      */
+     private Object writeReplace(final Object proxy) throws 
NotSerializableException {
+         ReflectiveOperationException cause = null;
+         final Class<?> type = proxy.getClass().getInterfaces()[0];
+         final Class<?> impl = source.standard.getImplementation(type);
+         if (impl != null) try {
 -            return impl.getDeclaredConstructor(type).newInstance(proxy);
++            return 
impl.getDeclaredConstructor(argument(type)).newInstance(proxy);
+         } catch (ReflectiveOperationException e) {
+             cause = e;
+         }
+         final var e = new NotSerializableException(type.getCanonicalName());
+         e.initCause(cause);
+         throw e;
+     }
+ 
      /**
       * Returns the error message for a failure to query the database for the 
property identified by the given method.
       */
@@@ -360,25 -379,4 +387,35 @@@
      public String toString() {
          return toString(getClass());
      }
 +
++    /**
++     * Compatibility with deprecated types.
++     */
++    private static Class<?> argument(final Class<?> type) {
++        if (type == ResponsibleParty.class) {
++            return Responsibility.class;
++        }
++        return type;
++    }
++
 +    /**
 +     * If the given method is superceded by a new method, the new method.
 +     * This is a hack for transition from legacy ISO type to newer type:
 +     * {@code ResponsibleParty.getRole()} overriding {@code 
Responsibility.getRole()}
 +     * confuses this {@code Dispatcher} class. We need the method in the base 
interface.
 +     */
 +    private static Method supercede(Method method) throws 
NoSuchMethodException {
 +        if (method.getDeclaringClass() == ResponsibleParty.class) {
 +            if ("getRole".equals(method.getName())) {
 +                method = Responsibility.class.getMethod("getRole");
 +            } else {
 +                /*
 +                 * `getIndividualName()`, `getOrganisationName()`, 
`getPositionName()` and
 +                 * `getContactInfo()` have no direct equivalence in 
`Responsibility` class.
 +                 */
 +                return null;
 +            }
 +        }
 +        return method;
 +    }
  }
diff --cc 
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Builder.java
index f299e11810,a66a30b765..14602bfa74
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Builder.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Builder.java
@@@ -584,10 -571,10 +576,10 @@@ public abstract class Builder<B extend
       * @param  name  the {@code IdentifiedObject} name as an identifier.
       * @return {@code this}, for method call chaining.
       */
 -    public B addName(final Identifier name) {
 +    public B addName(final ReferenceIdentifier name) {
          if (properties.putIfAbsent(IdentifiedObject.NAME_KEY, 
Objects.requireNonNull(name)) != null) {
              // A primary name is already present. Add the given name as an 
alias instead.
-             aliases.add(name instanceof GenericName ? (GenericName) name : 
new NamedIdentifier(name));
+             aliases.add(NamedIdentifier.toGenericName(name));
          }
          return self();
      }
diff --cc 
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
index 19a768dad2,fa2e0ab237..48f2dee3bc
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
@@@ -1770,10 -1767,12 +1770,12 @@@ public final class CRS 
                   */
                  if (crs instanceof ProjectedCRS) {
                      final var proj = (ProjectedCRS) crs;
 -                    final var base = (GeodeticCRS) 
getHorizontalComponent(proj.getBaseCRS());
 +                    final var base = (GeographicCRS) 
getHorizontalComponent(proj.getBaseCRS());
                      Conversion fromBase = proj.getConversionFromBase();
-                     fromBase = new 
DefaultConversion(IdentifiedObjects.getProperties(fromBase),
-                             fromBase.getMethod(), null, 
fromBase.getParameterValues());
+                     fromBase = new DefiningConversion(
+                             IdentifiedObjects.getProperties(fromBase),
+                             fromBase.getMethod(), null,
+                             fromBase.getParameterValues());
                      return new DefaultProjectedCRS(properties, base, 
fromBase, (CartesianCS) cs);
                  }
                  /*
diff --cc 
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/NamedIdentifier.java
index df026bae86,6fc54e9b88..de463c2b1f
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/NamedIdentifier.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/NamedIdentifier.java
@@@ -378,6 -383,36 +386,36 @@@ public class NamedIdentifier extends Im
          return new NamedIdentifier(object);
      }
  
+     /**
+      * Returns the given identifier as a name. This method is similar to 
{@link #castOrCopy(Identifier)}
+      * except that it does not require the given {@code object} to be a 
{@code NamedIdentifier} instance.
+      *
+      * @param  object  the object to get as a name, or {@code nulk}.
+      * @return the given object as a name, or {@code null} if the argument 
was null.
+      * @since  1.7
+      */
+     public static GenericName toGenericName(final Identifier object) {
+         if (object == null || object instanceof GenericName) {
+             return (GenericName) object;
+         }
+         return new NamedIdentifier(object);
+     }
+ 
+     /**
+      * Returns the given name as an identifier. This method is similar to 
{@link #castOrCopy(GenericName)}
+      * except that it does not require the given {@code object} to be a 
{@code NamedIdentifier} instance.
+      *
+      * @param  object  the object to get as an identifier, or {@code nulk}.
+      * @return the given object as an identifier, or {@code null} if the 
argument was null.
+      * @since  1.7
+      */
 -    public static Identifier toIdentifier(final GenericName object) {
 -        if (object == null || object instanceof Identifier) {
 -            return (Identifier) object;
++    public static ReferenceIdentifier toIdentifier(final GenericName object) {
++        if (object == null || object instanceof ReferenceIdentifier) {
++            return (ReferenceIdentifier) object;
+         }
+         return new NamedIdentifier(object);
+     }
+ 
      /**
       * The last element in the sequence of {@linkplain #getParsedNames() 
parsed names}.
       * By default, this is the same value as the {@linkplain #getCode() code} 
provided as a local name.
diff --cc 
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConversion.java
index 9607bed122,0c5e6c178c..500fe6329d
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConversion.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConversion.java
@@@ -217,20 -178,42 +181,43 @@@ public class DefaultConversion extends 
      }
  
      /**
-      * Constructs a new conversion with the same values as the specified one, 
together with the
-      * specified source and target CRS. While the source conversion can be an 
arbitrary one,
-      * it is typically a defining conversion.
+      * Creates a new coordinate operation initialized from the given 
properties.
+      * It is caller's responsibility to set the following fields:
+      *
+      * <ul>
+      *   <li>{@link #sourceCRS}</li>
+      *   <li>{@link #targetCRS}</li>
+      *   <li>{@link #transform}</li>
+      *   <li>{@link #parameters}</li>
+      * </ul>
+      */
+     DefaultConversion(final Map<String,?> properties, final OperationMethod 
method) {
+         super(properties, method);
+     }
+ 
+     /**
+      * Constructs a new conversion with the same values as the specified one,
+      * together with the specified source and target <abbr>CRS</abbr>.
+      * While the source conversion can be an arbitrary one, it is typically a 
defining conversion.
+      *
+      * <p>The {@code normalized} argument is {@code true} if the defining 
conversion provides a normalized transform.
+      * In such case, an adjustment for axis directions and units of 
measurement will be added for matching the given
+      * source and target <abbr>CRS</abbr>s. If {@code normalized} is {@code 
false}, then the defining conversion shall
+      * provide the complete transform and no adjustments is added. This 
argument is ignored if the defining conversion
+      * already provides source and target <abbr>CRS</abbr>s.</p>
       *
       * @param definition  the defining conversion.
-      * @param source      the new source CRS.
-      * @param target      the new target CRS.
+      * @param normalized  whether the transform provided by the defining 
conversion is normalized.
+      * @param source      the new source <abbr>CRS</abbr>.
+      * @param target      the new target <abbr>CRS</abbr>.
       * @param factory     the factory to use for creating a transform from 
the parameters or for performing axis changes.
       */
 -    private DefaultConversion(final Conversion definition,
 -                              final boolean normalized,
 -                              final CoordinateReferenceSystem source,
 -                              final CoordinateReferenceSystem target,
 -                              final MathTransformFactory factory) throws 
FactoryException
 +    @SuppressWarnings("deprecation")
 +    DefaultConversion(final Conversion definition,
++                      final boolean normalized,
 +                      final CoordinateReferenceSystem source,
 +                      final CoordinateReferenceSystem target,
 +                      final MathTransformFactory factory) throws 
FactoryException
      {
          super(definition);
          int interpDim = 
CRS.getDimensionOrZero(super.getInterpolationCRS().orElse(null));
@@@ -401,10 -390,7 +400,10 @@@
          if (factory == null) {
              factory = DefaultMathTransformFactory.provider();
          }
 +        if (isProjection) {
-             return new DefaultProjection(this, sourceCRS, targetCRS, factory);
++            return new DefaultProjection(this, normalized(), sourceCRS, 
targetCRS, factory);
 +        }
-         return new DefaultConversion(this, sourceCRS, targetCRS, factory);
+         return new DefaultConversion(this, normalized(), sourceCRS, 
targetCRS, factory);
      }
  
      /**
diff --cc 
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultProjection.java
index b8243c7e96,0000000000..fd914eddcc
mode 100644,000000..100644
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultProjection.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultProjection.java
@@@ -1,109 -1,0 +1,110 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.sis.referencing.operation;
 +
 +import java.util.Map;
 +import jakarta.xml.bind.annotation.XmlTransient;
 +import org.opengis.util.FactoryException;
 +import org.opengis.referencing.operation.Conversion;
 +import org.opengis.referencing.operation.Projection;
 +import org.opengis.referencing.operation.OperationMethod;
 +import org.opengis.referencing.operation.MathTransform;
 +import org.opengis.referencing.operation.MathTransformFactory;
 +import org.opengis.referencing.crs.ProjectedCRS;
 +import org.opengis.referencing.crs.GeographicCRS;
 +import org.opengis.referencing.crs.CoordinateReferenceSystem;
 +import org.apache.sis.util.ArgumentChecks;
 +
 +
 +/**
 + * A conversion from (<var>longitude</var>, <var>latitude</var>) coordinates 
to Cartesian coordinates
 + * (<var>x</var>,<var>y</var>).
 + *
 + * @author  Martin Desruisseaux (IRD, Geomatys)
 + *
 + * @see org.apache.sis.referencing.crs.DefaultProjectedCRS
 + */
 +@XmlTransient
 +final class DefaultProjection extends DefaultConversion implements Projection 
{
 +    /**
 +     * Serial number for inter-operability with different versions.
 +     */
 +    private static final long serialVersionUID = -7176751851369816864L;
 +
 +    /**
 +     * Creates a projection from the given properties.
 +     *
 +     * @param  properties  the properties to be given to the identified 
object.
 +     * @param  sourceCRS   the source CRS.
 +     * @param  targetCRS   the target CRS.
 +     * @param  method      the coordinate operation method.
 +     * @param  transform   transform from positions in the source CRS to 
positions in the target CRS.
 +     */
 +    public DefaultProjection(final Map<String,?>   properties,
 +                             final GeographicCRS   sourceCRS,
 +                             final ProjectedCRS    targetCRS,
 +                             final OperationMethod method,
 +                             final MathTransform   transform)
 +    {
 +        super(properties, sourceCRS, targetCRS, null, method, transform);
 +    }
 +
 +    /**
 +     * Creates a new projection with the same values as the specified one, 
together with the
 +     * specified source and target CRS. While the source conversion can be an 
arbitrary one,
 +     * it is typically a defining conversion.
 +     *
 +     * @param  definition  the defining conversion.
 +     * @param  sourceCRS   the source CRS.
 +     * @param  targetCRS   the target CRS.
 +     * @param  factory     the factory to use for creating a transform from 
the parameters or for performing axis changes.
 +     * @throws IllegalArgumentException if the source or targe CRS is not of 
the expected types.
 +     */
 +    DefaultProjection(final Conversion definition,
++                      final boolean normalized,
 +                      final CoordinateReferenceSystem sourceCRS,
 +                      final CoordinateReferenceSystem targetCRS,
 +                      final MathTransformFactory factory) throws 
FactoryException
 +    {
-         super(definition, sourceCRS, targetCRS, factory);
++        super(definition, normalized, sourceCRS, targetCRS, factory);
 +        ArgumentChecks.ensureCanCast("sourceCRS", GeographicCRS.class, 
sourceCRS);
 +        ArgumentChecks.ensureCanCast("targetCRS", ProjectedCRS .class, 
targetCRS);
 +    }
 +
 +    /**
 +     * Creates a new coordinate operation with the same values as the 
specified one.
 +     * This copy constructor provides a way to convert an arbitrary 
implementation
 +     * into a SIS one, usually in order to leverage some 
implementation-specific API.
 +     *
 +     * <p>This constructor performs a shallow copy, i.e. the properties are 
not cloned.</p>
 +     *
 +     * @param  operation  the coordinate operation to copy.
 +     */
 +    protected DefaultProjection(final Projection operation) {
 +        super(operation);
 +    }
 +
 +    /**
 +     * Returns the GeoAPI interface implemented by this class.
 +     *
 +     * @return the conversion interface implemented by this class.
 +     */
 +    @Override
 +    public Class<? extends Projection> getInterface() {
 +        return Projection.class;
 +    }
 +}
diff --cc geoapi/snapshot
index cfe589c99e,27859fa0bc..aef3201da9
--- a/geoapi/snapshot
+++ b/geoapi/snapshot
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit cfe589c99e81a42014a0651275d941d6235659f6
 -Subproject commit 27859fa0bce1d9c4dfc71947daa61e220e87d168
++Subproject commit aef3201da9428acc3c82dd588ca742c0814a7368
diff --cc 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Sphere.java
index d117c8b7f3,585a0bb44c..79c9fd9dbc
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Sphere.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Sphere.java
@@@ -26,11 -26,10 +26,10 @@@ import org.apache.sis.geometries.intern
  import org.apache.sis.geometries.math.Tuple;
  import org.apache.sis.geometries.math.Vector;
  import org.apache.sis.geometries.math.Vectors;
- import org.apache.sis.geometry.GeneralEnvelope;
  import org.apache.sis.util.ArgumentChecks;
  
 -// Specific to the geoapi-4.0 branch:
 -import org.opengis.metadata.Identifier;
 +// Specific to the geoapi-3.1 branch:
 +import org.opengis.referencing.ReferenceIdentifier;
  
  
  /**
diff --cc 
optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/CRSChooser.java
index c59e06e2b9,97de98e3d9..415fd9f432
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/CRSChooser.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/CRSChooser.java
@@@ -74,9 -71,12 +74,9 @@@ import org.opengis.referencing.crs.Gene
  // Specific to the geoapi-3.1 and geoapi-4.0 branches:
  import org.opengis.referencing.ObjectDomain;
  
 -// Specific to the geoapi-4.0 branch:
 -import org.opengis.referencing.crs.DerivedCRS;
 -
  
  /**
-  * A list of Coordinate Reference Systems (CRS) from which the user can 
select.
+  * A list of Coordinate Reference Systems (<abbr>CRS</abbr>) from which the 
user can select.
   * The CRS choices is built in a background thread from a specified {@link 
CRSAuthorityFactory}.
   *
   * @author  Johann Sorel (Geomatys)

Reply via email to