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 cae1934156424e7ba3c1f75d0cc9e51bc7b5a928 Merge: 7d377bd53e f51380286e Author: Martin Desruisseaux <[email protected]> AuthorDate: Sat Nov 7 16:06:22 2026 +0100 Merge branch 'geoapi-4.0' into geoapi-3.1 endorsed/build.gradle.kts | 10 +- .../sis/coverage/grid/DimensionalityReduction.java | 6 +- .../apache/sis/coverage/grid/GridDerivation.java | 4 +- .../org/apache/sis/coverage/grid/GridExtent.java | 187 ++++------ .../org/apache/sis/coverage/grid/GridGeometry.java | 144 +++++++- .../sis/coverage/grid/GridPointIterator.java | 301 ++++++++++++++++ .../apache/sis/coverage/grid/LatticeIterator.java | 209 +++++++++++ .../main/org/apache/sis/image/ImageProcessor.java | 8 +- .../main/org/apache/sis/image/MaskedImage.java | 4 +- .../apache/sis/coverage/grid/GridGeometryTest.java | 78 +++++ .../org/apache/sis/image/PixelIteratorTest.java | 8 +- .../metadata/iso/identification/DefaultUsage.java | 4 +- .../metadata/iso/identification/package-info.java | 2 +- .../metadata/replace/ReferenceSystemMetadata.java | 11 + .../org.apache.sis.filter.FunctionRegister | 3 + .../org.apache.sis.portrayal/main/module-info.java | 6 + .../main/org/apache/sis/style/se1/ColorMap.java | 48 ++- .../org/apache/sis/style/se1/ColorReplacement.java | 43 ++- .../style/se1/function/AbstractLookupFunction.java | 118 +++++++ .../apache/sis/style/se1/function/Categorize.java | 231 +++++++++++++ .../apache/sis/style/se1/function/ChangeCase.java | 133 +++++++ .../apache/sis/style/se1/function/Concatenate.java | 104 ++++++ .../apache/sis/style/se1/function/FormatDate.java | 341 ++++++++++++++++++ .../sis/style/se1/function/FormatNumber.java | 229 +++++++++++++ .../apache/sis/style/se1/function/Interpolate.java | 381 +++++++++++++++++++++ .../org/apache/sis/style/se1/function/Recode.java | 243 +++++++++++++ .../sis/style/se1/function/StringLength.java | 98 ++++++ .../sis/style/se1/function/StringPosition.java | 155 +++++++++ .../apache/sis/style/se1/function/Substring.java | 170 +++++++++ .../sis/style/se1/function/SymbologyFunction.java | 324 ++++++++++++++++++ .../sis/style/se1/function/SymbologyFunctions.java | 287 ++++++++++++++++ .../org/apache/sis/style/se1/function/Trim.java | 179 ++++++++++ .../sis/style/se1/function/package-info.java | 50 +++ .../org/apache/sis/style/se1/ColorMapTest.java | 75 ++++ .../apache/sis/style/se1/ColorReplacementTest.java | 62 ++++ .../sis/style/se1/function/CategorizeTest.java | 201 +++++++++++ .../se1/function/FormattingFunctionsTest.java | 303 ++++++++++++++++ .../sis/style/se1/function/InterpolateTest.java | 214 ++++++++++++ .../apache/sis/style/se1/function/RecodeTest.java | 128 +++++++ .../org/apache/sis/geometry/AbstractEnvelope.java | 14 +- .../main/org/apache/sis/geometry/Envelopes.java | 2 +- .../org/apache/sis/geometry/GeneralEnvelope.java | 20 +- .../apache/sis/geometry/WraparoundAdjustment.java | 2 +- .../referencing/factory/IdentifiedObjectSet.java | 20 +- .../sis/referencing/factory/package-info.java | 2 +- .../referencing/factory/sql/EPSGDataAccess.java | 2 + .../referencing/internal/ServicesForMetadata.java | 6 +- .../internal/shared/CoordinateOperations.java | 8 + .../internal/shared/DirectPositionView.java | 10 +- .../internal/shared/TemporalAccessor.java | 15 +- .../operation/CoordinateOperationFinder.java | 2 +- .../operation/CoordinateOperationRegistry.java | 94 +++-- .../operation/builder/ProjectedTransformTry.java | 11 +- .../operation/transform/AbstractMathTransform.java | 9 +- .../operation/transform/ConcatenatedTransform.java | 1 + .../operation/CoordinateOperationFinderTest.java | 22 +- .../operation/CoordinateOperationRegistryTest.java | 59 ++++ .../transform/AbstractMathTransformTest.java | 3 +- .../operation/transform/MathTransformTestCase.java | 3 +- .../apache/sis/storage/tiling/TileReadEvent.java | 6 +- .../main/org/apache/sis/setup/Configuration.java | 12 +- .../main/org/apache/sis/system/DaemonThread.java | 7 +- .../main/org/apache/sis/system/Shutdown.java | 31 +- .../src/org.apache.sis.web/main/module-info.java | 25 +- .../org/apache/sis/web/jakarta/JavaBeanHook.java | 60 ++++ .../org/apache/sis/web/jakarta/package-info.java | 5 +- .../org/apache/sis/web/javaee/JavaBeanHook.java | 60 ++++ .../org/apache/sis/web/javaee/package-info.java | 5 +- incubator/build.gradle.kts | 3 + netbeans-project/ivy.xml | 4 + .../main/org/apache/sis/gui/map/MapCanvasAWT.java | 4 +- 71 files changed, 5320 insertions(+), 309 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java index 5f2e48d3aa,f5ad1087b4..f44db3545c --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java @@@ -392,6 -383,66 +392,66 @@@ class CoordinateOperationRegistry return codes; } + /** + * Returns whether it is presumed easy for {@link IdentifiedObjectFinder} to perform a full search + * (ignoring axis order) for the given CRS. An important criterion is to avoid all CRS containing + * a coordinate operation (in particular projected CRS), because they are difficult to search. + * + * <p>We allow extensive search of geographic CRS because the EPSG database has some geographic CRS + * defined with both (longitude, latitude) and (latitude, longitude) axis order. But operations may + * be defined for only one axis order. So if the user specified the CRS with (longitude, latitude) + * axis order, we want to check also the coordinate operations using (latitude, longitude) axis order + * because they may be the only ones available.</p> + */ + private static boolean isEasySearch(final CoordinateReferenceSystem crs) { - if (crs instanceof DerivedCRS) { ++ if (crs instanceof GeneralDerivedCRS) { + return false; + } + if (crs instanceof CompoundCRS) { + for (CoordinateReferenceSystem c : ((CompoundCRS) crs).getComponents()) { + if (!isEasySearch(c)) { + return false; + } + } + } + return true; + } + + /** + * Returns a copy of the given list where the first element (if it exists) is a fully constructed operation. + * This method tries to resolve {@link DeferredCoordinateOperation} instances in iteration order until one + * element can be fully constructed. All remaining elements are left deferred. The purpose is to determine + * whether the collection is effectively empty because of missing resources such as <abbr>NADCON</abbr> grids. + * + * @param authoritatives the operations returned by the authority factory. + * @return a copy of {@code authoritatives} where the first element, if present, is resolved. + */ + private List<CoordinateOperation> resolveFirst(final Collection<CoordinateOperation> authoritatives) + throws FactoryException + { + if (Containers.isNullOrEmpty(authoritatives)) { + return List.of(); + } + final var resolved = new ArrayList<CoordinateOperation>(authoritatives.size()); + for (CoordinateOperation operation : authoritatives) { + try { + if (resolved.isEmpty() && operation instanceof DeferredCoordinateOperation) { + assert Semaphores.METADATA_ONLY.get(); + try { + Semaphores.METADATA_ONLY.clear(); + operation = ((DeferredCoordinateOperation) operation).create(); + } finally { + Semaphores.METADATA_ONLY.set(); + } + } + resolved.add(operation); + } catch (MissingFactoryResourceException e) { + log(null, e); + } + } + return resolved; + } + /** * Strategies for decomposing a three-dimensional CRS into components that may be present in EPSG database. * The database may have no entries for a coordinate operation between a pair of 3D CRS with (x,y,z) axes, diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ProjectedTransformTry.java index a52e98e15d,3e83c8756c..a7e5795051 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ProjectedTransformTry.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ProjectedTransformTry.java @@@ -33,9 -33,10 +33,10 @@@ import org.apache.sis.util.resources.Er import org.apache.sis.referencing.operation.matrix.Matrices; import org.apache.sis.referencing.operation.matrix.MatrixSIS; import org.apache.sis.referencing.operation.transform.MathTransforms; + import static org.apache.sis.referencing.internal.shared.CoordinateOperations.MAXIMUM_BUFFER_SIZE; -// Specific to the geoapi-4.0 branch: -import org.opengis.coordinate.MismatchedDimensionException; +// Specific to the main and geoapi-3.1 branches: +import org.opengis.geometry.MismatchedDimensionException; /** diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java index 8dfaba1fec,d6cad7fbf1..22ebc75f6e --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java @@@ -46,9 -46,10 +46,10 @@@ import org.apache.sis.io.wkt.Convention import org.apache.sis.io.wkt.Formatter; import org.apache.sis.io.wkt.FormattableObject; import org.apache.sis.util.resources.Errors; + import static org.apache.sis.referencing.internal.shared.CoordinateOperations.MAXIMUM_BUFFER_SIZE; -// Specific to the geoapi-4.0 branch: -import org.opengis.coordinate.MismatchedDimensionException; +// Specific to the main and geoapi-3.1 branches: +import org.opengis.geometry.MismatchedDimensionException; /**
