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 7f0548fd161f94708d3f4acd8a77ea9ba9243251 Merge: 71742e2009 dd9c40499b Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Thu Oct 10 11:19:26 2024 +0200 Merge branch 'geoapi-3.1'. This commit tries to fix a build failure on the CI when the EPSG dataset is not present. .../sis/buildtools/coding/ReorganizeImports.java | 4 +- .../sis/referencing/internal/EPSGFactoryProxy.java | 2 + .../apache/sis/geometry/AbstractEnvelopeTest.java | 4 +- .../apache/sis/geometry/CoordinateFormatTest.java | 52 +++++++++++----------- .../org/apache/sis/geometry/EnvelopesTest.java | 11 +++++ .../sis/geometry/GeneralDirectPositionTest.java | 4 +- .../apache/sis/geometry/GeneralEnvelopeTest.java | 4 +- .../apache/sis/geometry/ImmutableEnvelopeTest.java | 6 +-- .../org/apache/sis/geometry/TransformTestCase.java | 4 +- .../org/apache/sis/io/wkt/ComparisonWithEPSG.java | 4 +- .../sis/io/wkt/GeodeticObjectParserTest.java | 4 +- .../org/apache/sis/io/wkt/WKTDictionaryTest.java | 4 +- .../test/org/apache/sis/io/wkt/WKTFormatTest.java | 4 +- .../sis/referencing/AuthorityFactoriesTest.java | 10 +++++ .../test/org/apache/sis/referencing/CRSTest.java | 10 +++++ .../org/apache/sis/referencing/CommonCRSTest.java | 3 +- .../sis/referencing/EPSGDependentTestCase.java | 52 ++++++++++++++++++++++ .../sis/referencing/StandardDefinitionsTest.java | 3 +- 18 files changed, 135 insertions(+), 50 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxy.java index b4419ca81a,46efb509e4..57ac4b1665 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxy.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxy.java @@@ -22,6 -22,9 +22,8 @@@ import org.opengis.referencing.Authorit import org.opengis.referencing.IdentifiedObject; import org.opengis.util.FactoryException; import org.opengis.util.InternationalString; + -// Specific to the geoapi-3.1 and geoapi-4.0 branches: -import java.util.Optional; ++// Specific to the main and geoapi-3.1 branches: import org.apache.sis.referencing.GeodeticException; diff --cc endorsed/src/org.apache.sis.referencing/test/org/apache/sis/geometry/CoordinateFormatTest.java index 408693e444,373939fa55..cd0de5141c --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/geometry/CoordinateFormatTest.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/geometry/CoordinateFormatTest.java @@@ -90,10 -90,10 +90,10 @@@ public final class CoordinateFormatTes */ @Test public void testParseUnknownCRS() throws ParseException { - final CoordinateFormat format = new CoordinateFormat(null, null); - final ParsePosition charPos = new ParsePosition(0); + final var format = new CoordinateFormat(null, null); + final var charPos = new ParsePosition(0); DirectPosition position = format.parse("23.78 -12.74 127.9 3.25", charPos); - assertArrayEquals(new double[] {23.78, -12.74, 127.9, 3.25}, position.getCoordinates()); + assertArrayEquals(new double[] {23.78, -12.74, 127.9, 3.25}, position.getCoordinate()); assertEquals(-1, charPos.getErrorIndex()); assertEquals(23, charPos.getIndex()); /* @@@ -154,12 -154,12 +154,12 @@@ */ @Test public void testParseProjected() throws ParseException { - final CoordinateFormat format = new CoordinateFormat(Locale.US, null); + final var format = new CoordinateFormat(Locale.US, null); format.setDefaultCRS(HardCodedConversions.mercator()); DirectPosition pos = format.parse("100 m W 300 m N", new ParsePosition(0)); - assertArrayEquals(new double[] {-100, 300}, pos.getCoordinates()); + assertArrayEquals(new double[] {-100, 300}, pos.getCoordinate()); pos = format.parse("200 m E 100 m S", new ParsePosition(0)); - assertArrayEquals(new double[] {200, -100}, pos.getCoordinates()); + assertArrayEquals(new double[] {200, -100}, pos.getCoordinate()); } /**