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. Contains GeodeticCalculator implementation on ellipsoid and additional expression & filter implementations.
Date Tue, 27 Aug 2019 08:17:04 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 38edbe5fc2a0b4385c1c21a4617ec20e0f9ced97
Merge: c468aad a206c7b
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Tue Aug 27 10:15:35 2019 +0200

    Merge branch 'geoapi-4.0' into geoapi-3.1.
    Contains GeodeticCalculator implementation on ellipsoid and additional expression &
filter implementations.

 .../org/apache/sis/services/LocationServlet.java   |  13 +-
 core/pom.xml                                       |   1 +
 core/sis-cql/pom.xml                               | 145 +++
 .../main/antlr4/org/apache/sis/internal/cql/CQL.g4 | 280 ++++++
 .../src/main/java/org/apache/sis/cql/CQL.java      | 752 ++++++++++++++++
 .../main/java/org/apache/sis/cql/CQLException.java |  52 ++
 .../org/apache/sis/cql/FilterToCQLVisitor.java     | 656 ++++++++++++++
 .../java/org/apache/sis/internal/cql/AntlrCQL.java |  98 ++
 .../test/java/org/apache/sis/cql/CQLTestCase.java  |  60 ++
 .../test/java/org/apache/sis/cql/CQLTestSuite.java |  48 +
 .../org/apache/sis/cql/ExpressionReadingTest.java  | 613 +++++++++++++
 .../org/apache/sis/cql/ExpressionWritingTest.java  | 339 +++++++
 .../java/org/apache/sis/cql/FilterReadingTest.java | 846 +++++++++++++++++
 .../java/org/apache/sis/cql/FilterWritingTest.java | 413 +++++++++
 .../apache/sis/coverage/grid/GridDerivation.java   |  92 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |   4 +
 .../apache/sis/feature/DefaultAttributeType.java   |   2 +
 .../java/org/apache/sis/feature/FeatureFormat.java |   6 +-
 .../main/java/org/apache/sis/feature/Features.java |  35 +
 .../org/apache/sis/filter/ArithmeticFunction.java  |  57 +-
 .../java/org/apache/sis/filter/BinaryFunction.java |  14 +
 .../org/apache/sis/filter/ComparisonFunction.java  | 423 ++++++---
 .../apache/sis/filter/DefaultFilterFactory.java    | 276 +++---
 .../org/apache/sis/filter/FilterByIdentifier.java  |   2 +-
 .../sis/filter/InvalidExpressionException.java     |  92 ++
 .../java/org/apache/sis/filter/LeafExpression.java |  55 +-
 .../org/apache/sis/filter/LogicalFunction.java     |   8 +-
 .../java/org/apache/sis/filter/NamedFunction.java  | 210 +++++
 .../src/main/java/org/apache/sis/filter/Node.java  |  16 +-
 .../src/main/java/org/apache/sis/filter/SQLMM.java |  91 ++
 .../main/java/org/apache/sis/filter/ST_Buffer.java |  99 ++
 .../java/org/apache/sis/filter/ST_Centroid.java    |  96 ++
 .../java/org/apache/sis/filter/ST_Transform.java   | 203 +++++
 .../org/apache/sis/filter/TemporalFunction.java    | 722 +++++++++++++++
 .../java/org/apache/sis/filter/UnaryFunction.java  |   8 +-
 .../java/org/apache/sis/internal/feature/ESRI.java |  17 +-
 .../sis/internal/feature/FeatureExpression.java    |  67 +-
 .../sis/internal/feature/FunctionRegister.java     |  68 ++
 .../apache/sis/internal/feature/Geometries.java    | 234 ++++-
 .../java/org/apache/sis/internal/feature/JTS.java  | 100 ++-
 .../org/apache/sis/internal/feature/Java2D.java    |  22 +-
 .../org/apache/sis/internal/feature/Resources.java |  15 +
 .../sis/internal/feature/Resources.properties      |   3 +
 .../sis/internal/feature/Resources_fr.properties   |   3 +
 .../org/apache/sis/internal/feature/jts/JTS.java   |  59 +-
 .../sis/coverage/grid/GridDerivationTest.java      |  30 +-
 .../apache/sis/filter/ComparisonFunctionTest.java  | 151 ++++
 .../java/org/apache/sis/filter/PeriodLiteral.java  | 115 +++
 .../test/java/org/apache/sis/filter/SQLMMTest.java | 200 +++++
 .../apache/sis/filter/TemporalFunctionTest.java    | 341 +++++++
 .../apache/sis/test/suite/FeatureTestSuite.java    |   5 +-
 .../org/apache/sis/distance/LatLonPointRadius.java |  45 +-
 .../sis/internal/referencing/EPSGFactoryProxy.java |   7 +-
 .../apache/sis/internal/referencing/Formulas.java  |   4 +-
 .../apache/sis/internal/referencing/Resources.java |   5 +
 .../sis/internal/referencing/Resources.properties  |   1 +
 .../internal/referencing/Resources_fr.properties   |   1 +
 .../referencing/provider/GeocentricAffine.java     |   2 +-
 .../sis/referencing/GeodesicsOnEllipsoid.java      | 996 +++++++++++++++++++++
 .../apache/sis/referencing/GeodeticCalculator.java | 474 +++++++---
 .../apache/sis/referencing/GeodeticException.java  |  74 ++
 .../sis/referencing/datum/DefaultEllipsoid.java    |   7 +-
 .../org/apache/sis/referencing/datum/Sphere.java   |   1 +
 .../sis/referencing/operation/matrix/Matrices.java |   5 +-
 .../operation/projection/Mollweide.java            |   4 +-
 .../operation/projection/package-info.java         |   6 +-
 .../apache/sis/referencing/ClenshawSummation.java  | 460 ++++++++++
 .../sis/referencing/GeodesicsOnEllipsoidTest.java  | 561 ++++++++++++
 .../sis/referencing/GeodeticCalculatorTest.java    | 371 +++++---
 .../sis/test/suite/ReferencingTestSuite.java       |   1 +
 .../main/java/org/apache/sis/io/TableAppender.java |   5 +-
 .../java/org/apache/sis/math/MathFunctions.java    | 255 +++++-
 .../java/org/apache/sis/util/ArgumentChecks.java   |  25 +
 .../java/org/apache/sis/util/StringBuilders.java   |  31 +-
 .../org/apache/sis/math/MathFunctionsTest.java     |  43 +
 .../test/java/org/apache/sis/test/TestCase.java    |   3 +
 ide-project/NetBeans/nbproject/genfiles.properties |   4 +-
 ide-project/NetBeans/nbproject/project.properties  |   2 +-
 ide-project/NetBeans/nbproject/project.xml         |   2 +
 .../apache/sis/internal/netcdf/RasterResource.java |  10 +-
 .../java/org/apache/sis/index/tree/QuadTree.java   |   5 +-
 .../org/apache/sis/internal/storage/Resources.java |  10 +
 .../sis/internal/storage/Resources.properties      |   2 +
 .../sis/internal/storage/Resources_fr.properties   |   2 +
 .../sis/internal/storage/query/FeatureSubset.java  |  11 +-
 .../sis/internal/storage/query/SimpleQuery.java    | 139 ++-
 .../internal/storage/query/SortByComparator.java   |   4 +-
 .../storage/gpx/GroupAsPolylineOperation.java      |   3 +
 88 files changed, 11063 insertions(+), 775 deletions(-)

diff --cc core/sis-feature/src/test/java/org/apache/sis/filter/PeriodLiteral.java
index 0000000,2b587a9..f379a18
mode 000000,100644..100644
--- a/core/sis-feature/src/test/java/org/apache/sis/filter/PeriodLiteral.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/filter/PeriodLiteral.java
@@@ -1,0 -1,115 +1,115 @@@
+ /*
+  * 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.filter;
+ 
+ import java.util.Date;
+ import java.io.Serializable;
+ import org.opengis.temporal.Period;
+ import org.opengis.temporal.Duration;
+ import org.opengis.temporal.RelativePosition;
+ import org.opengis.temporal.TemporalPosition;
+ import org.opengis.temporal.TemporalPrimitive;
+ import org.opengis.temporal.TemporalGeometricPrimitive;
+ import org.opengis.filter.expression.Literal;
+ import org.opengis.filter.expression.ExpressionVisitor;
 -import org.opengis.metadata.Identifier;
++import org.opengis.referencing.ReferenceIdentifier;
+ import org.apache.sis.test.TestUtilities;
+ 
+ 
+ /**
+  * A literal expression which returns a period computed from {@link #begin} and {@link #end}
fields.
+  * This is used for testing purpose only.
+  *
+  * @author  Martin Desruisseaux (Geomatys)
+  * @version 1.0
+  * @since   1.0
+  * @module
+  */
+ @SuppressWarnings("serial")
+ final strictfp class PeriodLiteral implements Period, Literal, Serializable {
+     /**
+      * Period beginning and ending, in milliseconds since Java epoch.
+      */
+     public long begin, end;
+ 
+     /**
+      * Returns the constant value held by this object.
+      * Returns value should be interpreted as a {@link Period}.
+      */
+     @Override public Object getValue()                     {return this;}
+     @Override public Object evaluate(Object o)             {return this;}
+     @Override public <T> T  evaluate(Object o, Class<T> c) {return c.cast(this);}
+ 
+     /** Implements the visitor pattern (not used by Apache SIS). */
+     @Override public Object accept(ExpressionVisitor visitor, Object extraData) {
+         return visitor.visit(this, extraData);
+     }
+ 
+     /** Returns a bound of this period. */
+     @Override public org.opengis.temporal.Instant getBeginning() {return instant(begin);}
+     @Override public org.opengis.temporal.Instant getEnding()    {return instant(end);}
+ 
+     /** Wraps the value that defines a period. */
+     private static org.opengis.temporal.Instant instant(final long t) {
+         return new org.opengis.temporal.Instant() {
+             @Override public Date   getDate()  {return new Date(t);}
+             @Override public String toString() {return "Instant[" + TestUtilities.format(getDate())
+ '[';}
+ 
+             /** Not needed for the tests. */
 -            @Override public Identifier       getName()                              {throw
new UnsupportedOperationException();}
++            @Override public ReferenceIdentifier getName()                           {throw
new UnsupportedOperationException();}
+             @Override public TemporalPosition getTemporalPosition()                  {throw
new UnsupportedOperationException();}
+             @Override public RelativePosition relativePosition(TemporalPrimitive o)  {throw
new UnsupportedOperationException();}
+             @Override public Duration         distance(TemporalGeometricPrimitive o) {throw
new UnsupportedOperationException();}
+             @Override public Duration         length()                               {throw
new UnsupportedOperationException();}
+         };
+     }
+ 
+     /** Not needed for the tests. */
 -    @Override public Identifier       getName()                              {throw new
UnsupportedOperationException();}
++    @Override public ReferenceIdentifier getName()                           {throw new
UnsupportedOperationException();}
+     @Override public RelativePosition relativePosition(TemporalPrimitive o)  {throw new
UnsupportedOperationException();}
+     @Override public Duration         distance(TemporalGeometricPrimitive o) {throw new
UnsupportedOperationException();}
+     @Override public Duration         length()                               {throw new
UnsupportedOperationException();}
+ 
+     /**
+      * Hash code value. Used by the tests for checking the results of deserialization.
+      */
+     @Override
+     public int hashCode() {
+         return Long.hashCode(begin) + Long.hashCode(end) * 7;
+     }
+ 
+     /**
+      * Compare this period with given object. Used by the tests for checking the results
of deserialization.
+      */
+     @Override
+     public boolean equals(final Object other) {
+         if (other instanceof PeriodLiteral) {
+             final PeriodLiteral p = (PeriodLiteral) other;
+             return begin == p.begin && end == p.end;
+         }
+         return false;
+     }
+ 
+     /**
+      * Returns a string representation for debugging purposes.
+      */
+     @Override
+     public String toString() {
+         return "Period[" + TestUtilities.format(new Date(begin)) +
+                  " ... " + TestUtilities.format(new Date(end)) + ']';
+     }
+ }
diff --cc ide-project/NetBeans/nbproject/genfiles.properties
index b78aacf,ef5c60f..56a977b
--- a/ide-project/NetBeans/nbproject/genfiles.properties
+++ b/ide-project/NetBeans/nbproject/genfiles.properties
@@@ -3,6 -3,6 +3,6 @@@
  build.xml.data.CRC32=58e6b21c
  build.xml.script.CRC32=462eaba0
  build.xml.stylesheet.CRC32=28e38971@1.53.1.46
- nbproject/build-impl.xml.data.CRC32=8636dfa3
 -nbproject/build-impl.xml.data.CRC32=17792780
 -nbproject/build-impl.xml.script.CRC32=9b707f2e
 -nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.91.1.48
++nbproject/build-impl.xml.data.CRC32=5a726ec7
 +nbproject/build-impl.xml.script.CRC32=f4ace637
- nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.91.1.48
++nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.92.0.48


Mime
View raw message