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

desruisseaux pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sis.git

commit ae65a8be08ff31fc78d0f346a6b9a2a78380aa8d
Merge: 4bd7092a20 4c5563faad
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Sat Dec 28 17:32:50 2024 +0100

    Merge branch 'geoapi-3.1'

 .../org/apache/sis/feature/DefaultFeatureType.java |  17 +-
 .../sis/feature/builder/FeatureTypeBuilder.java    |  14 +-
 .../apache/sis/feature/privy/FeatureUtilities.java |   6 +
 .../org/apache/sis/image/BandAggregateLayout.java  |   8 +-
 .../apache/sis/image/BandedSampleConverter.java    |   2 +-
 .../main/org/apache/sis/image/DataType.java        | 268 ++++++++++++++++-----
 .../main/org/apache/sis/image/PixelIterator.java   |  12 +-
 .../main/org/apache/sis/image/ResampledImage.java  |   2 +-
 .../main/org/apache/sis/image/Transferer.java      |   6 +-
 .../apache/sis/image/privy/ColorModelBuilder.java  |   3 +-
 .../apache/sis/image/privy/ColorModelFactory.java  |   6 +-
 .../apache/sis/image/privy/ColorScaleBuilder.java  |   8 +-
 .../org/apache/sis/image/privy/ImageUtilities.java |  84 +------
 .../org/apache/sis/image/privy/RasterFactory.java  |   9 +-
 .../apache/sis/image/privy/TilePlaceholder.java    |   5 +-
 .../test/org/apache/sis/image/DataTypeTest.java    |  42 +++-
 .../apache/sis/image/privy/ImageUtilitiesTest.java |  16 --
 .../apache/sis/metadata/sql/MetadataWriter.java    |   8 +-
 .../apache/sis/metadata/sql/privy/SQLBuilder.java  |  13 +-
 .../sis/referencing/factory/sql/EPSGInstaller.java |  22 +-
 .../provider/FranceGeocentricInterpolation.java    |  18 +-
 .../org/apache/sis/storage/geotiff/DataSubset.java |   2 +-
 .../sis/storage/geotiff/GeoTiffStoreProvider.java  |  57 ++++-
 .../sis/storage/geotiff/ImageFileDirectory.java    |   2 +-
 .../org/apache/sis/storage/geotiff/Writer.java     |   4 +-
 .../storage/geotiff/inflater/CopyFromBytes.java    |   5 +-
 .../geotiff/inflater/HorizontalPredictor.java      |   5 +-
 .../geotiff/writer/HorizontalPredictor.java        |   5 +-
 .../storage/geotiff/writer/ReformattedImage.java   |   5 +-
 .../sis/storage/geotiff/writer/TileMatrix.java     |  14 +-
 .../apache/sis/storage/netcdf/base/DataType.java   |   2 +-
 .../org/apache/sis/storage/DataStoreProvider.java  |  22 +-
 .../apache/sis/storage/base/TiledGridResource.java |   2 +-
 .../org/apache/sis/storage/esri/RasterStore.java   |   8 +-
 .../main/org/apache/sis/util/Version.java          |  13 +-
 .../main/org/apache/sis/gui/coverage/GridView.java |   4 +-
 .../apache/sis/storage/gdal/FeatureIterator.java   |   2 +-
 .../org/apache/sis/storage/gdal/FeatureLayer.java  |  76 ++++--
 .../org/apache/sis/storage/gdal/FieldAccessor.java |  33 ++-
 39 files changed, 494 insertions(+), 336 deletions(-)

diff --cc 
endorsed/src/org.apache.sis.feature/main/org/apache/sis/feature/DefaultFeatureType.java
index 1ac6a3bc4d,5984c258a3..dbf436cd0d
--- 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/feature/DefaultFeatureType.java
+++ 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/feature/DefaultFeatureType.java
@@@ -396,8 -391,8 +391,8 @@@ public class DefaultFeatureType extend
           *
           * In the `aliases` map below, null values will be assigned to 
ambiguous short names.
           */
-         final Map<String, AbstractIdentifiedType> aliases = new 
LinkedHashMap<>();
 -        final var aliases = new LinkedHashMap<String, PropertyType>();
 -        for (final PropertyType property : allProperties) {
++        final var aliases = new LinkedHashMap<String, 
AbstractIdentifiedType>();
 +        for (final AbstractIdentifiedType property : allProperties) {
              GenericName name = property.getName();
              while (name instanceof ScopedName) {
                  if (name == (name = ((ScopedName) name).tail())) break;   // 
Safety against broken implementations.
diff --cc 
endorsed/src/org.apache.sis.feature/main/org/apache/sis/feature/builder/FeatureTypeBuilder.java
index b44ee0c7d6,22287ece14..a58a813c62
--- 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/feature/builder/FeatureTypeBuilder.java
+++ 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/feature/builder/FeatureTypeBuilder.java
@@@ -298,13 -298,13 +298,13 @@@ public class FeatureTypeBuilder extend
           * For each operation, wrap them in pseudo-builder only if the 
operation
           * is not one of the operations automatically generated by this 
builder.
           */
-         final Map<String,Set<AttributeRole>> propertyRoles = new HashMap<>();
+         final var propertyRoles = new HashMap<String,Set<AttributeRole>>();
 -        for (final PropertyType property : template.getProperties(false)) {
 +        for (final AbstractIdentifiedType property : 
template.getProperties(false)) {
              PropertyTypeBuilder builder;
 -            if (property instanceof AttributeType<?>) {
 -                builder = new AttributeTypeBuilder<>(this, (AttributeType<?>) 
property);
 -            } else if (property instanceof FeatureAssociationRole) {
 -                builder = new AssociationRoleBuilder(this, 
(FeatureAssociationRole) property);
 +            if (property instanceof DefaultAttributeType<?>) {
 +                builder = new AttributeTypeBuilder<>(this, 
(DefaultAttributeType<?>) property);
 +            } else if (property instanceof DefaultAssociationRole) {
 +                builder = new AssociationRoleBuilder(this, 
(DefaultAssociationRole) property);
              } else {
                  builder = null;                             // Do not create 
OperationWrapper now - see below.
              }
@@@ -708,9 -699,9 +708,9 @@@
       *
       * @see #properties()
       */
 -    public <V> AttributeTypeBuilder<V> addAttribute(final AttributeType<V> 
template) {
 +    public <V> AttributeTypeBuilder<V> addAttribute(final 
DefaultAttributeType<V> template) {
          ensureNonNull("template", template);
-         final AttributeTypeBuilder<V> property = new 
AttributeTypeBuilder<>(this, template);
+         final var property = new AttributeTypeBuilder<V>(this, template);
          properties.add(property);
          clearCache();
          return property;
@@@ -775,9 -762,9 +775,9 @@@
       *
       * @see #properties()
       */
 -    public AssociationRoleBuilder addAssociation(final FeatureType type) {
 +    public AssociationRoleBuilder addAssociation(final DefaultFeatureType 
type) {
          ensureNonNull("type", type);
-         final AssociationRoleBuilder property = new 
AssociationRoleBuilder(this, type, type.getName());
+         final var property = new AssociationRoleBuilder(this, type, 
type.getName());
          properties.add(property);
          clearCache();
          return property;
@@@ -816,9 -799,9 +816,9 @@@
       *
       * @see #properties()
       */
 -    public AssociationRoleBuilder addAssociation(final FeatureAssociationRole 
template) {
 +    public AssociationRoleBuilder addAssociation(final DefaultAssociationRole 
template) {
          ensureNonNull("template", template);
-         final AssociationRoleBuilder property = new 
AssociationRoleBuilder(this, template);
+         final var property = new AssociationRoleBuilder(this, template);
          properties.add(property);
          clearCache();
          return property;
@@@ -941,7 -918,7 +941,7 @@@
                      geometryIndex = numSynthetic++;
                  }
              }
-             final AbstractIdentifiedType[] propertyTypes = new 
AbstractIdentifiedType[numSynthetic + numSpecified];
 -            final var propertyTypes = new PropertyType[numSynthetic + 
numSpecified];
++            final var propertyTypes = new AbstractIdentifiedType[numSynthetic 
+ numSpecified];
              int propertyCursor = numSynthetic;
              int identifierCursor = 0;
              for (int i=0; i<numSpecified; i++) {

Reply via email to