sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1.
Date Sat, 19 Oct 2019 11:24:28 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 574a063cc0354fd5fd6764191a0f886817224e92
Merge: 7d1c6db fb28872
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Sat Oct 19 13:24:14 2019 +0200

    Merge branch 'geoapi-4.0' into geoapi-3.1.

 NOTICE                                             |   2 +-
 README                                             |   2 +-
 application/sis-console/src/main/artifact/README   |   2 +-
 .../org/apache/sis/internal/doclet/Doclet.java     |   8 -
 .../org/apache/sis/coverage/SampleDimension.java   |   6 +-
 .../sis/internal/referencing/provider/ESRI.java    |  59 ++-
 .../referencing/provider/MapProjection.java        |  56 +--
 .../provider/PolarStereographicSouth.java          |   4 +-
 .../referencing/provider/SatelliteTracking.java    | 145 ++++++++
 .../referencing/provider/package-info.java         |   3 +-
 .../sis/referencing/AbstractIdentifiedObject.java  |  37 +-
 .../main/java/org/apache/sis/referencing/CRS.java  |  42 +--
 .../operation/projection/Polyconic.java            |   2 +-
 .../operation/projection/SatelliteTracking.java    | 377 +++++++++++++++++++
 .../operation/projection/package-info.java         |   3 +-
 .../operation/transform/IterationStrategy.java     |  15 +-
 ...g.opengis.referencing.operation.OperationMethod |   1 +
 .../referencing/provider/Descriptions.properties   |   5 +
 .../apache/sis/geometry/CoordinateFormatTest.java  |   3 +-
 .../referencing/provider/ProvidersTest.java        |  13 +-
 .../java/org/apache/sis/referencing/CRSTest.java   |  16 +-
 .../org/apache/sis/referencing/CommonCRSTest.java  |  14 +-
 .../projection/SatelliteTrackingTest.java          | 407 +++++++++++++++++++++
 .../transform/DefaultMathTransformFactoryTest.java |   9 +-
 .../sis/test/suite/ReferencingTestSuite.java       |   3 +-
 .../sis/internal/converter/ConverterRegistry.java  |   7 +
 .../apache/sis/internal/system/DaemonThread.java   |   4 +-
 .../java/org/apache/sis/internal/util/Strings.java |  21 +-
 .../main/java/org/apache/sis/measure/Angle.java    |   2 +-
 .../main/java/org/apache/sis/measure/Range.java    |   4 +-
 .../org/apache/sis/util/collection/WeakEntry.java  |  13 +-
 .../apache/sis/util/collection/WeakHashSet.java    |   7 +-
 .../sis/util/collection/WeakValueHashMap.java      |   7 +-
 ide-project/NetBeans/build.xml                     |   1 +
 pom.xml                                            |  13 +-
 src/main/config/logging.properties                 |   2 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   4 +-
 .../org/apache/sis/internal/netcdf/Variable.java   |  14 +-
 .../sis/internal/netcdf/impl/VariableInfo.java     |  10 +-
 .../apache/sis/internal/netcdf/package-info.java   |   2 +-
 .../internal/storage/io/HyperRectangleReader.java  |  13 +-
 .../org/apache/sis/internal/storage/io/Region.java |  78 +++-
 .../sis/internal/storage/io/package-info.java      |   2 +-
 43 files changed, 1253 insertions(+), 185 deletions(-)

diff --cc core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java
index 694bd48,d553ebf..9386a88
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java
@@@ -293,37 -292,19 +293,19 @@@ public abstract class MapProjection ext
      static ParameterBuilder renameAlias(final ParameterDescriptor<Double> template,
final Citation toRename,
              final ParameterDescriptor<Double> replacement, final ParameterBuilder
builder)
      {
-         return copyAliases(template, toRename, sameNameAs(toRename, replacement),
-                 (ReferenceIdentifier) IdentifiedObjects.getIdentifier(replacement, toRename),
-                 builder.addName(template.getName()));
-     }
- 
-     /**
-      * Copies all aliases except the ones for the given authority. If the given replacement
is non-null,
-      * then it will be used instead of the first occurrence of the omitted name.
-      *
-      * <p>This method does not copy the primary name. It is caller's responsibility
to add it first.</p>
-      *
-      * @param  template     the parameter from which to copy the aliases.
-      * @param  exclude      the authority of the alias to omit. Can not be EPSG.
-      * @param  replacement  the alias to use instead of the omitted one, or {@code null}
if none.
-      * @param  newCode      the identifier to use instead of the omitted one, or {@code
null} if none.
-      * @param  builder      where to add the aliases.
-      * @return the given {@code builder}, for method call chaining.
-      */
-     private static ParameterBuilder copyAliases(final ParameterDescriptor<Double>
template, final Citation exclude,
-             GenericName replacement, ReferenceIdentifier newCode, final ParameterBuilder
builder)
-     {
+         builder.addName(template.getName());
+         GenericName newName = sameNameAs(toRename, replacement);
 -        Identifier newCode = IdentifiedObjects.getIdentifier(replacement, toRename);
++        ReferenceIdentifier newCode = (ReferenceIdentifier) IdentifiedObjects.getIdentifier(replacement,
toRename);
          for (GenericName alias : template.getAlias()) {
-             if (((Identifier) alias).getAuthority() == exclude) {
-                 if (replacement == null) continue;
-                 alias = replacement;
-                 replacement = null;
+             if (((Identifier) alias).getAuthority() == toRename) {
+                 if (newName == null) continue;
+                 alias = newName;
+                 newName = null;
              }
              builder.addName(alias);
          }
 -        for (Identifier id : template.getIdentifiers()) {
 +        for (ReferenceIdentifier id : template.getIdentifiers()) {
-             if (id.getAuthority() == exclude) {
+             if (id.getAuthority() == toRename) {
                  if (newCode == null) continue;
                  id = newCode;
                  newCode = null;
diff --cc core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
index 04238dc,7c0c231..37c51ab
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
@@@ -561,9 -555,9 +555,9 @@@ public final class CRS extends Static 
               * but using base CRS instead. For example if the list of source CRS had some
projected CRS, we
               * will try with the geographic CRS on which those projected CRS are based.
               */
-             if (maxInsideArea < roiArea) {
+             if (Double.isNaN(roiArea) || maxInsideArea < roiArea) {
                  if (tryDerivedCRS) break;                                              
// Do not try twice.
 -                final SingleCRS[] derivedCRS = new SingleCRS[sourceCRS.length];
 +                final CoordinateReferenceSystem[] derivedCRS = new CoordinateReferenceSystem[sourceCRS.length];
                  for (int i=0; i < derivedCRS.length; i++) {
                      GeographicBoundingBox bbox = null;
                      final CoordinateReferenceSystem crs = sourceCRS[i];


Mime
View raw message