You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2019/06/15 15:20:59 UTC

[sis] branch geoapi-3.1 updated (906814a -> a2ab2e1)

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

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


    from 906814a  Merge branch 'geoapi-4.0' into geoapi-3.1
     add 8382160  Ensure that netCDF reader can parse at least "degrees_N" and "degree_N" in addition of "degrees_north" and "degree_north" (same for east).
     add ac19cfb  Take a note of newly created JIRA issue.
     add fdd282c  More effort for avoiding NaN values when computing GridGeometry envelope.
     add b1f8b1b  Verify conformate of JAXB annotations with ISO 19115-3 schemas.
     add e2d37e3  Upgrade to EPSG geodetic database 9.6.3.
     add 8257c01  Partial revert of the fix for NaN in envelope, since it introduced other NaN values. It is not worth to maintain a `modified` flag in this part of the code.
     add 201f980  GridGeometry.toString() also shows spatio-temporal extent as geographic coordinates with ISO dates.
     add 81ef6b2  Move the location of the block showing geographic and temporal coordinates in `toString()` representation.
     add 0103945  Add convenience methods for setting temporal range in an envelope, then build a GridGeometry from an envelope.
     add 98215cc  Use double-double arithmetic for computing the `gridToCRS` from a GridExtent and an Envelope.
     add 6defc3c  Clarify the behavior of GeneralEnvelope.add(Envelope) and intersect(Envelope) if some coordinate values are NaN. This fix allows GridDerivation to behave in a more expected way when a grid geometry has unknown tickness in some dimensions.
     new a2ab2e1  Merge branch 'geoapi-4.0' into geoapi-3.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/sis/coverage/grid/GridCoverage.java |   9 +-
 .../apache/sis/coverage/grid/GridDerivation.java   |  15 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   | 143 +++++--
 .../org/apache/sis/coverage/grid/GridGeometry.java | 458 ++++++++++++++++-----
 .../apache/sis/coverage/grid/GridExtentTest.java   |  22 +-
 .../apache/sis/coverage/grid/GridGeometryTest.java |  21 +
 .../main/java/org/apache/sis/io/wkt/Formatter.java |  13 +-
 .../iso/extent/DefaultGeographicBoundingBox.java   |   6 +-
 .../org/apache/sis/metadata/iso/package-info.java  |   2 +-
 .../sis/metadata/iso/quality/AbstractElement.java  |   2 +-
 .../sis/metadata/iso/quality/package-info.java     |   2 +-
 .../sis/metadata/iso/spatial/package-info.java     |   2 +-
 .../internal/jaxb/cat/CodeListMarshallingTest.java |   6 +-
 .../sis/metadata/xml/SchemaComplianceTest.java     |  79 ++++
 .../apache/sis/test/suite/MetadataTestSuite.java   |   3 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java   |   2 +-
 .../org/apache/sis/test/xml/PackageVerifier.java   |  64 ++-
 .../org/apache/sis/test/xml/SchemaCompliance.java  |   5 +-
 .../org/apache/sis/geometry/ArrayEnvelope.java     |   5 +
 .../org/apache/sis/geometry/CoordinateFormat.java  |   5 +-
 .../org/apache/sis/geometry/GeneralEnvelope.java   | 149 +++++--
 .../sis/internal/referencing/TemporalAccessor.java | 104 +++++
 .../apache/sis/referencing/GeodeticCalculator.java |   2 +-
 .../operation/CoordinateOperationFinder.java       |   2 +
 .../operation/matrix/GeneralMatrix.java            |  12 +-
 .../apache/sis/geometry/GeneralEnvelopeTest.java   |  63 ++-
 .../sis/referencing/factory/sql/epsg/package.html  |   8 +-
 .../report/CoordinateReferenceSystems.java         |  10 +-
 .../apache/sis/internal/system/DataDirectory.java  |   9 +
 .../org/apache/sis/internal/util/DoubleDouble.java |  10 +
 .../org/apache/sis/internal/util/Numerics.java     |  55 ++-
 .../java/org/apache/sis/measure/AngleFormat.java   |   3 +-
 .../org/apache/sis/util/resources/Vocabulary.java  |  20 +
 .../sis/util/resources/Vocabulary.properties       |   4 +
 .../sis/util/resources/Vocabulary_fr.properties    |   4 +
 .../java/org/apache/sis/measure/UnitsTest.java     |   5 +
 .../sis/storage/geotiff/GridGeometryBuilder.java   |   8 +-
 .../java/org/apache/sis/internal/netcdf/Axis.java  |   9 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   2 +-
 .../org/apache/sis/internal/netcdf/AxisTest.java   |  26 +-
 .../apache/sis/internal/netcdf/VariableTest.java   |  18 +
 .../org/apache/sis/test/suite/NetcdfTestSuite.java |   1 +
 .../sis/internal/storage/AbstractGridResource.java |   2 +-
 43 files changed, 1109 insertions(+), 281 deletions(-)
 create mode 100644 core/sis-metadata/src/test/java/org/apache/sis/metadata/xml/SchemaComplianceTest.java
 create mode 100644 core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/TemporalAccessor.java
 copy core/sis-metadata/src/test/java/org/apache/sis/internal/simple/SimpleIdentifierTest.java => storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/AxisTest.java (54%)


[sis] 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1

Posted by de...@apache.org.
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 a2ab2e1ab85a221adca055dcbbb1e676a582ab68
Merge: 906814a 6defc3c
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Jun 15 17:13:45 2019 +0200

    Merge branch 'geoapi-4.0' into geoapi-3.1

 .../org/apache/sis/coverage/grid/GridCoverage.java |   9 +-
 .../apache/sis/coverage/grid/GridDerivation.java   |  15 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   | 143 +++++--
 .../org/apache/sis/coverage/grid/GridGeometry.java | 458 ++++++++++++++++-----
 .../apache/sis/coverage/grid/GridExtentTest.java   |  22 +-
 .../apache/sis/coverage/grid/GridGeometryTest.java |  21 +
 .../main/java/org/apache/sis/io/wkt/Formatter.java |  13 +-
 .../iso/extent/DefaultGeographicBoundingBox.java   |   6 +-
 .../org/apache/sis/metadata/iso/package-info.java  |   2 +-
 .../sis/metadata/iso/quality/AbstractElement.java  |   2 +-
 .../sis/metadata/iso/quality/package-info.java     |   2 +-
 .../sis/metadata/iso/spatial/package-info.java     |   2 +-
 .../internal/jaxb/cat/CodeListMarshallingTest.java |   6 +-
 .../sis/metadata/xml/SchemaComplianceTest.java     |  79 ++++
 .../apache/sis/test/suite/MetadataTestSuite.java   |   3 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java   |   2 +-
 .../org/apache/sis/test/xml/PackageVerifier.java   |  64 ++-
 .../org/apache/sis/test/xml/SchemaCompliance.java  |   5 +-
 .../org/apache/sis/geometry/ArrayEnvelope.java     |   5 +
 .../org/apache/sis/geometry/CoordinateFormat.java  |   5 +-
 .../org/apache/sis/geometry/GeneralEnvelope.java   | 149 +++++--
 .../sis/internal/referencing/TemporalAccessor.java | 104 +++++
 .../apache/sis/referencing/GeodeticCalculator.java |   2 +-
 .../operation/CoordinateOperationFinder.java       |   2 +
 .../operation/matrix/GeneralMatrix.java            |  12 +-
 .../apache/sis/geometry/GeneralEnvelopeTest.java   |  63 ++-
 .../sis/referencing/factory/sql/epsg/package.html  |   8 +-
 .../report/CoordinateReferenceSystems.java         |  10 +-
 .../apache/sis/internal/system/DataDirectory.java  |   9 +
 .../org/apache/sis/internal/util/DoubleDouble.java |  10 +
 .../org/apache/sis/internal/util/Numerics.java     |  55 ++-
 .../java/org/apache/sis/measure/AngleFormat.java   |   3 +-
 .../org/apache/sis/util/resources/Vocabulary.java  |  20 +
 .../sis/util/resources/Vocabulary.properties       |   4 +
 .../sis/util/resources/Vocabulary_fr.properties    |   4 +
 .../java/org/apache/sis/measure/UnitsTest.java     |   5 +
 .../sis/storage/geotiff/GridGeometryBuilder.java   |   8 +-
 .../java/org/apache/sis/internal/netcdf/Axis.java  |   9 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   2 +-
 .../org/apache/sis/internal/netcdf/AxisTest.java   |  49 +++
 .../apache/sis/internal/netcdf/VariableTest.java   |  18 +
 .../org/apache/sis/test/suite/NetcdfTestSuite.java |   1 +
 .../sis/internal/storage/AbstractGridResource.java |   2 +-
 43 files changed, 1143 insertions(+), 270 deletions(-)

diff --cc core/sis-metadata/src/test/java/org/apache/sis/test/xml/PackageVerifier.java
index 3a5547e,7e7ba0f..2e93e4d
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/PackageVerifier.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/PackageVerifier.java
@@@ -384,21 -386,25 +386,28 @@@ final strictfp class PackageVerifier 
           * because JAXB has default adapters for String, Double, Boolean, Date, etc. which do not match the way
           * OGC/ISO marshal those elements.
           */
-         if (!property.isAnnotationPresent(XmlJavaTypeAdapter.class) && (valueType != null)
-                 && !valueType.getName().startsWith(Modules.CLASSNAME_PREFIX))
-         {
-             Class<?> c = valueType;
-             while (adapterIsUsed.replace(c, Boolean.TRUE) == null) {
-                 final Class<?> parent = c.getSuperclass();
-                 if (parent != null) {
-                     c = parent;
-                 } else {
-                     final Class<?>[] p = c.getInterfaces();
-                     if (p.length == 0) {
-                         throw new SchemaException(errorInClassMember(javaName)
-                                 .append("Missing @XmlJavaTypeAdapter for ").append(valueType).toString());
+         if (!property.isAnnotationPresent(XmlJavaTypeAdapter.class) && valueType != null) {
+             /*
+              * Internal classes in Apache SIS "jaxb" subpackages can be marshalled directly.
+              * Apache SIS classes defined in other packages may be code lists, which still need adapters.
+              */
+             if (!valueType.getName().startsWith(Modules.CLASSNAME_PREFIX) || CodeList.class.isAssignableFrom(valueType)) {
+                 Class<?> c = valueType;
+                 while (adapterIsUsed.replace(c, Boolean.TRUE) == null) {
+                     final Class<?> parent = c.getSuperclass();
+                     if (parent != null) {
+                         c = parent;
+                     } else {
+                         final Class<?>[] p = c.getInterfaces();
+                         if (p.length == 0) {
++                            if (valueType == org.opengis.metadata.Obligation.class)  {
++                                break;
++                            }
+                             throw new SchemaException(errorInClassMember(javaName)
+                                     .append("Missing @XmlJavaTypeAdapter for ").append(valueType).toString());
+                         }
+                         c = p[0];       // Take only the first interface, which should be the "main" parent.
                      }
-                     c = p[0];   // Take only the first interface, which should be the "main" parent.
                  }
              }
          }
@@@ -495,20 -504,20 +507,4 @@@
          }
          return builder.append(':').append(System.lineSeparator());
      }
--
--    /**
--     * Verifies if there is any unused namespace or adapter in package-info file.
--     */
--    final void reportUnused() throws SchemaException {
--        for (final Map.Entry<String,Boolean> entry : namespaceIsUsed.entrySet()) {
--            if (!entry.getValue()) {
--                throw new SchemaException(String.format("Unused namespace in package %s:%n%s", packageName, entry.getKey()));
--            }
--        }
--        for (final Map.Entry<Class<?>,Boolean> entry : adapterIsUsed.entrySet()) {
--            if (!entry.getValue()) {
--                throw new SchemaException(String.format("Unused adapter in package %s for %s.", packageName, entry.getKey()));
--            }
--        }
--    }
  }
diff --cc core/sis-metadata/src/test/java/org/apache/sis/test/xml/SchemaCompliance.java
index ad6edcb,8b01faa..0904029
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/SchemaCompliance.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/SchemaCompliance.java
@@@ -144,9 -144,9 +144,6 @@@ public final strictfp class SchemaCompl
          } catch (DirectoryIteratorException e) {
              throw e.getCause();
          }
--        if (verifier != null) {
--            verifier.reportUnused();
--        }
      }
  
      /**