From 851753f60a3581d47bf1a62127f8f638eede7e28 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 9 Jan 2025 10:33:16 +0100 Subject: [PATCH 1/4] update to SNAP 11 - compiles but has test failures --- core/pom.xml | 20 +++++------ .../com/bc/fiduceo/archive/ArchiveConfig.java | 10 +++--- .../com/bc/fiduceo/core/SystemConfig.java | 8 ++--- .../com/bc/fiduceo/core/UseCaseConfig.java | 12 +++---- .../com/bc/fiduceo/db/DbMaintenanceTool.java | 2 +- .../reader/avhrr_frac/AVHRR_FRAC_Reader.java | 2 +- .../reader/slstr/SlstrReaderConfig.java | 8 ++--- .../SlstrRegriddedSubsetReader.java | 4 +-- .../java/com/bc/fiduceo/util/JDomUtils.java | 6 ++-- .../test/java/com/bc/fiduceo/TestUtil.java | 8 ++--- .../bc/fiduceo/core/UseCaseConfigBuilder.java | 6 ++-- .../bc/fiduceo/core/UseCaseConfigTest.java | 2 +- .../RawDataReaderTest_context2D_double.java | 2 -- .../SlstrRegriddedSubsetReaderTest.java | 4 +-- .../com/bc/fiduceo/util/JDomUtilsTest.java | 6 ++-- .../fiduceo/util/TempFileUtils_IO_Test.java | 1 - .../com/bc/geometry/s2/S2WKTWriterTest.java | 2 +- .../BorderDistanceConditionPlugin.java | 2 +- .../matchup/condition/ConditionEngine.java | 2 +- .../matchup/condition/ConditionFactory.java | 2 +- .../matchup/condition/ConditionPlugin.java | 2 +- .../condition/DistanceConditionPlugin.java | 2 +- .../OverlapRemoveConditionPlugin.java | 2 +- .../PixelPositionConditionPlugin.java | 2 +- .../condition/TimeDeltaConditionPlugin.java | 2 +- .../UniqueSamplesConditionPlugin.java | 2 +- .../bc/fiduceo/matchup/plot/MapPlotTool.java | 2 +- ...ngularCosineProportionScreeningPlugin.java | 2 +- .../screening/AngularScreeningPlugin.java | 4 +-- .../screening/AtsrAngularScreeningPlugin.java | 2 +- .../BuehlerCloudScreeningPlugin.java | 4 +-- .../HIRS_LZADeltaScreeningPlugin.java | 2 +- .../screening/PixelValueScreeningPlugin.java | 2 +- .../matchup/screening/ScreeningEngine.java | 2 +- .../matchup/screening/ScreeningFactory.java | 2 +- .../matchup/screening/ScreeningPlugin.java | 2 +- .../screening/WindowValueScreeningPlugin.java | 2 +- .../matchup/writer/MmdWriterConfig.java | 10 +++--- .../MatchupToolTestUseCaseConfigBuilder.java | 2 +- .../BorderDistanceConditionPluginTest.java | 4 +-- .../condition/ConditionFactoryTest.java | 4 +-- .../DistanceConditionPluginTest.java | 4 +-- .../OverlapRemoveConditionPluginTest.java | 4 +-- .../PixelPositionConditionPluginTest.java | 4 +-- .../TimeDeltaConditionPluginTest.java | 4 +-- .../UniqueSamplesConditionPluginTest.java | 4 +-- ...arCosineProportionScreeningPluginTest.java | 2 +- .../screening/AngularScreeningPluginTest.java | 4 +-- .../AtsrAngularScreeningPluginTest.java | 4 +-- .../BuehlerCloudScreeningPluginTest.java | 4 +-- .../HIRS_LZADeltaScreeningPluginTest.java | 4 +-- .../PixelValueScreeningPluginTest.java | 4 +-- .../screening/ScreeningFactoryTest.java | 4 +-- .../WindowValueScreeningPluginTest.java | 4 +-- pom.xml | 35 ++++++++----------- .../bc/fiduceo/post/PostProcessingConfig.java | 12 +++---- .../fiduceo/post/PostProcessingFactory.java | 2 +- .../bc/fiduceo/post/PostProcessingPlugin.java | 2 +- .../bc/fiduceo/post/PostProcessingTool.java | 2 +- .../plugin/ElevationToSolZenAnglePlugin.java | 2 +- .../plugin/airs/AddAirsSpectrumPlugin.java | 2 +- .../amsr/AddAmsr2ScanDataQualityPlugin.java | 4 +-- .../plugin/amsr/AddAmsrSolarAnglesPlugin.java | 4 +-- .../plugin/avhrr_fcdr/AddAvhrrCorrCoeffs.java | 2 +- .../avhrr_fcdr/AddAvhrrCorrCoeffsPlugin.java | 2 +- .../flag/CALIOP_L2_VFM_FLAGS_PPPlugin.java | 2 +- .../CALIOP_SST_WP100_CLay_PPPlugin.java | 2 +- .../fiduceo/post/plugin/era5/Era5Archive.java | 2 +- .../plugin/era5/Era5PostProcessingPlugin.java | 10 +++--- .../post/plugin/era5/VariableCache.java | 2 +- .../plugin/gruan_uleic/AddGruanSource.java | 2 +- .../gruan_uleic/AddGruanSourcePlugin.java | 2 +- .../hirs/flag/HirsL1CloudyFlagsPlugin.java | 2 +- .../post/plugin/iasi/AddIASISpectrum.java | 2 +- .../plugin/iasi/AddIASISpectrumPlugin.java | 2 +- .../plugin/land_distance/AddLandDistance.java | 2 +- .../land_distance/AddLandDistancePlugin.java | 2 +- .../plugin/nwp/NwpPostProcessingPlugin.java | 2 +- .../SphericalDistancePlugin.java | 2 +- .../sstInsitu/SstInsituTimeSeriesPlugin.java | 2 +- .../post/PostProcessingConfigTest.java | 8 ++--- .../post/PostProcessingFactoryTest.java | 2 +- .../post/PostProcessingToolMain_IO_Test.java | 8 ++--- .../fiduceo/post/PostProcessingToolTest.java | 8 ++--- .../post/PostProcessingTool_IOTest.java | 2 +- .../fiduceo/post/SourceTargetManagerTest.java | 8 ++--- .../plugin/DummyPostProcessingPlugin.java | 2 +- .../ElevationToSolZenAnglePluginTest.java | 4 +-- .../AddAmsr2ScanDataQualityPluginTest.java | 4 +-- .../amsr/AddAmsrSolarAnglesPluginTest.java | 4 +-- .../AddAvhrrCorrCoeffsPluginTest.java | 4 +-- .../avhrr_fcdr/AddAvhrrCorrCoeffsTest.java | 4 +-- .../CALIOP_L2_VFM_FLAGS_PPPluginTest.java | 2 +- .../CALIOP_SST_WP100_CLay_PPPluginTest.java | 2 +- .../era5/Era5PostProcessingPluginTest.java | 4 +-- ...uginTest_parseGeneralizedInformations.java | 10 +++--- .../gruan_uleic/AddGruanSourcePluginTest.java | 4 +-- .../gruan_uleic/AddGruanSourceTest.java | 4 +-- .../flag/HirsL1CloudyFlagsPluginTest.java | 2 +- .../iasi/AddIASISpectrumPluginTest.java | 4 +-- .../post/plugin/iasi/AddIASISpectrumTest.java | 4 +-- .../AddLandDistancePluginTest.java | 4 +-- .../land_distance/AddLandDistanceTest.java | 4 +-- .../nwp/NwpPostProcessingPluginTest.java | 4 +-- .../nwp/NwpPostProcessingPlugin_IO_Test.java | 4 +-- .../SphericalDistancePluginTest.java | 2 +- .../SstInsituTimeSeriesPluginTest.java | 2 +- .../SstInsituTimeSeries_IO_Test.java | 8 ++--- 108 files changed, 217 insertions(+), 229 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 801afa90c..66f2b4415 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -39,13 +39,13 @@ - org.esa.s3tbx - s3tbx-avhrr-reader + eu.esa.opt + opttbx-avhrr-reader - org.esa.s3tbx - s3tbx-sentinel3-reader + eu.esa.opt + opttbx-sentinel3-reader @@ -89,14 +89,10 @@ netcdfAll - - - - - - - - + + org.jdom + jdom2 + junit diff --git a/core/src/main/java/com/bc/fiduceo/archive/ArchiveConfig.java b/core/src/main/java/com/bc/fiduceo/archive/ArchiveConfig.java index 454ba90bf..dba7742fc 100644 --- a/core/src/main/java/com/bc/fiduceo/archive/ArchiveConfig.java +++ b/core/src/main/java/com/bc/fiduceo/archive/ArchiveConfig.java @@ -42,11 +42,11 @@ import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Attribute; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; +import org.jdom2.Attribute; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/core/src/main/java/com/bc/fiduceo/core/SystemConfig.java b/core/src/main/java/com/bc/fiduceo/core/SystemConfig.java index 01a10173e..5020e9709 100644 --- a/core/src/main/java/com/bc/fiduceo/core/SystemConfig.java +++ b/core/src/main/java/com/bc/fiduceo/core/SystemConfig.java @@ -22,10 +22,10 @@ import com.bc.fiduceo.archive.ArchiveConfig; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; import java.io.File; import java.io.FileInputStream; diff --git a/core/src/main/java/com/bc/fiduceo/core/UseCaseConfig.java b/core/src/main/java/com/bc/fiduceo/core/UseCaseConfig.java index 90fe07698..1c37ffdbf 100644 --- a/core/src/main/java/com/bc/fiduceo/core/UseCaseConfig.java +++ b/core/src/main/java/com/bc/fiduceo/core/UseCaseConfig.java @@ -21,12 +21,12 @@ package com.bc.fiduceo.core; import org.esa.snap.core.util.StringUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/bc/fiduceo/db/DbMaintenanceTool.java b/core/src/main/java/com/bc/fiduceo/db/DbMaintenanceTool.java index 54d300842..5fb5ccd82 100644 --- a/core/src/main/java/com/bc/fiduceo/db/DbMaintenanceTool.java +++ b/core/src/main/java/com/bc/fiduceo/db/DbMaintenanceTool.java @@ -8,7 +8,7 @@ import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/bc/fiduceo/reader/avhrr_frac/AVHRR_FRAC_Reader.java b/core/src/main/java/com/bc/fiduceo/reader/avhrr_frac/AVHRR_FRAC_Reader.java index ad91956cd..8457a1f85 100644 --- a/core/src/main/java/com/bc/fiduceo/reader/avhrr_frac/AVHRR_FRAC_Reader.java +++ b/core/src/main/java/com/bc/fiduceo/reader/avhrr_frac/AVHRR_FRAC_Reader.java @@ -9,7 +9,7 @@ import com.bc.fiduceo.reader.snap.SNAP_Reader; import com.bc.fiduceo.reader.time.TimeLocator; import com.bc.fiduceo.util.NetCDFUtils; -import org.esa.s3tbx.dataio.avhrr.AvhrrConstants; +import eu.esa.opt.dataio.avhrr.AvhrrConstants; import org.esa.snap.core.datamodel.ProductData; import org.esa.snap.core.datamodel.RasterDataNode; import org.esa.snap.core.datamodel.VirtualBand; diff --git a/core/src/main/java/com/bc/fiduceo/reader/slstr/SlstrReaderConfig.java b/core/src/main/java/com/bc/fiduceo/reader/slstr/SlstrReaderConfig.java index 13410c352..e648121a3 100644 --- a/core/src/main/java/com/bc/fiduceo/reader/slstr/SlstrReaderConfig.java +++ b/core/src/main/java/com/bc/fiduceo/reader/slstr/SlstrReaderConfig.java @@ -3,10 +3,10 @@ import com.bc.fiduceo.core.SystemConfig; import com.bc.fiduceo.log.FiduceoLogger; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; import java.io.File; import java.io.FileInputStream; diff --git a/core/src/main/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReader.java b/core/src/main/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReader.java index 4919c7512..bef553aa4 100644 --- a/core/src/main/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReader.java +++ b/core/src/main/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReader.java @@ -20,8 +20,8 @@ import com.bc.fiduceo.store.ZipStore; import com.bc.fiduceo.util.NetCDFUtils; import com.bc.fiduceo.util.TimeUtils; -import org.esa.s3tbx.dataio.s3.Manifest; -import org.esa.s3tbx.dataio.s3.XfduManifest; +import eu.esa.opt.dataio.s3.Manifest; +import eu.esa.opt.dataio.s3.XfduManifest; import org.esa.snap.core.dataio.geocoding.*; import org.esa.snap.core.dataio.geocoding.forward.PixelForward; import org.esa.snap.core.dataio.geocoding.inverse.PixelQuadTreeInverse; diff --git a/core/src/main/java/com/bc/fiduceo/util/JDomUtils.java b/core/src/main/java/com/bc/fiduceo/util/JDomUtils.java index f52aa1d57..2853c6826 100644 --- a/core/src/main/java/com/bc/fiduceo/util/JDomUtils.java +++ b/core/src/main/java/com/bc/fiduceo/util/JDomUtils.java @@ -16,9 +16,9 @@ */ package com.bc.fiduceo.util; -import org.jdom.Attribute; -import org.jdom.Document; -import org.jdom.Element; +import org.jdom2.Attribute; +import org.jdom2.Document; +import org.jdom2.Element; import java.util.List; diff --git a/core/src/test/java/com/bc/fiduceo/TestUtil.java b/core/src/test/java/com/bc/fiduceo/TestUtil.java index a49acf0fc..02c655d08 100644 --- a/core/src/test/java/com/bc/fiduceo/TestUtil.java +++ b/core/src/test/java/com/bc/fiduceo/TestUtil.java @@ -29,10 +29,10 @@ import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; import java.io.*; import java.nio.file.Files; diff --git a/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigBuilder.java b/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigBuilder.java index cbbc439c2..2b71c093a 100644 --- a/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigBuilder.java +++ b/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigBuilder.java @@ -16,9 +16,9 @@ */ package com.bc.fiduceo.core; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.output.XMLOutputter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigTest.java b/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigTest.java index 33e58ad5b..929997418 100644 --- a/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigTest.java +++ b/core/src/test/java/com/bc/fiduceo/core/UseCaseConfigTest.java @@ -20,7 +20,7 @@ package com.bc.fiduceo.core; -import org.jdom.JDOMException; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/core/src/test/java/com/bc/fiduceo/reader/RawDataReaderTest_context2D_double.java b/core/src/test/java/com/bc/fiduceo/reader/RawDataReaderTest_context2D_double.java index 377c18bc1..603fa0bf9 100644 --- a/core/src/test/java/com/bc/fiduceo/reader/RawDataReaderTest_context2D_double.java +++ b/core/src/test/java/com/bc/fiduceo/reader/RawDataReaderTest_context2D_double.java @@ -5,9 +5,7 @@ import com.bc.fiduceo.util.NetCDFUtils; import org.junit.Before; import org.junit.Test; -import sun.nio.ch.Net; import ucar.ma2.Array; -import ucar.ma2.DataType; import java.io.IOException; diff --git a/core/src/test/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReaderTest.java b/core/src/test/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReaderTest.java index a118e8ef0..da89ca4d6 100644 --- a/core/src/test/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReaderTest.java +++ b/core/src/test/java/com/bc/fiduceo/reader/slstr_subset/SlstrRegriddedSubsetReaderTest.java @@ -2,8 +2,8 @@ import com.bc.fiduceo.reader.Reader; import com.bc.fiduceo.reader.ReaderContext; -import org.esa.s3tbx.dataio.s3.Manifest; -import org.esa.s3tbx.dataio.s3.XfduManifest; +import eu.esa.opt.dataio.s3.Manifest; +import eu.esa.opt.dataio.s3.XfduManifest; import org.junit.Test; import org.w3c.dom.Document; import org.xml.sax.InputSource; diff --git a/core/src/test/java/com/bc/fiduceo/util/JDomUtilsTest.java b/core/src/test/java/com/bc/fiduceo/util/JDomUtilsTest.java index 46f34e5df..815b09f06 100644 --- a/core/src/test/java/com/bc/fiduceo/util/JDomUtilsTest.java +++ b/core/src/test/java/com/bc/fiduceo/util/JDomUtilsTest.java @@ -21,9 +21,9 @@ package com.bc.fiduceo.util; import com.bc.fiduceo.core.UseCaseConfig; -import org.jdom.Attribute; -import org.jdom.Document; -import org.jdom.Element; +import org.jdom2.Attribute; +import org.jdom2.Document; +import org.jdom2.Element; import org.junit.Test; import java.util.List; diff --git a/core/src/test/java/com/bc/fiduceo/util/TempFileUtils_IO_Test.java b/core/src/test/java/com/bc/fiduceo/util/TempFileUtils_IO_Test.java index 24482e11c..f5972a952 100644 --- a/core/src/test/java/com/bc/fiduceo/util/TempFileUtils_IO_Test.java +++ b/core/src/test/java/com/bc/fiduceo/util/TempFileUtils_IO_Test.java @@ -27,7 +27,6 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import sun.net.www.protocol.file.FileURLConnection; import java.io.File; import java.io.IOException; diff --git a/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java b/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java index 6edb4a5d0..bf1c0c4e8 100644 --- a/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java +++ b/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java @@ -71,7 +71,7 @@ public void testWritePoint_S2LatLong() { final S2LatLng s2LatLng = new S2LatLng(s2Point); final String wkt = S2WKTWriter.write(s2LatLng); - assertEquals("POINT(-19.800000000000004,46.0)", wkt); + assertEquals("POINT(-19.800000000000004,45.99999999999999)", wkt); } @Test diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPlugin.java index d143c1ec6..ce0f792e9 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPlugin.java @@ -23,7 +23,7 @@ import static com.bc.fiduceo.util.JDomUtils.*; import static org.esa.snap.core.util.StringUtils.isNullOrEmpty; -import org.jdom.Element; +import org.jdom2.Element; import java.util.ArrayList; import java.util.HashSet; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionEngine.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionEngine.java index 85b0d16ab..edae0679d 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionEngine.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionEngine.java @@ -26,7 +26,7 @@ import com.bc.fiduceo.matchup.MatchupSet; import com.bc.fiduceo.matchup.SampleSet; import com.bc.fiduceo.tool.ToolContext; -import org.jdom.Element; +import org.jdom2.Element; import java.util.ArrayList; import java.util.List; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionFactory.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionFactory.java index 13dc7ae0a..6b949e838 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionFactory.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionFactory.java @@ -19,7 +19,7 @@ import com.bc.ceres.core.ServiceRegistry; import com.bc.ceres.core.ServiceRegistryManager; import org.esa.snap.core.util.ServiceLoader; -import org.jdom.Element; +import org.jdom2.Element; import java.util.HashMap; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java index b2762ecf0..7175cbba9 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.matchup.condition; -import org.jdom.Element; +import org.jdom2.Element; interface ConditionPlugin { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/DistanceConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/DistanceConditionPlugin.java index 193be6fb8..81d422fce 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/DistanceConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/DistanceConditionPlugin.java @@ -23,7 +23,7 @@ import com.bc.fiduceo.matchup.SampleSet; import com.bc.fiduceo.util.JDomUtils; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; import java.util.ArrayList; import java.util.List; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPlugin.java index 14297b99f..2ee94cbad 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPlugin.java @@ -23,7 +23,7 @@ import com.bc.fiduceo.matchup.SampleSet; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Element; +import org.jdom2.Element; import java.util.stream.Stream; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPlugin.java index ba9b9376d..cbd9f15bf 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPlugin.java @@ -2,7 +2,7 @@ import com.bc.fiduceo.util.JDomUtils; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; import java.util.stream.Stream; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPlugin.java index 79eaf5704..11385a5d6 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPlugin.java @@ -25,7 +25,7 @@ import com.bc.fiduceo.matchup.SampleSet; import com.bc.fiduceo.util.JDomUtils; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; import java.util.ArrayList; import java.util.List; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPlugin.java index d96f13156..2b864769c 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPlugin.java @@ -22,7 +22,7 @@ import com.bc.fiduceo.util.JDomUtils; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; public class UniqueSamplesConditionPlugin implements ConditionPlugin { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/plot/MapPlotTool.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/plot/MapPlotTool.java index b1e656734..3b18e973e 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/plot/MapPlotTool.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/plot/MapPlotTool.java @@ -68,7 +68,7 @@ public static void main(String[] args) throws IOException { samplingPoints.add(new SamplingPoint(lon, lat, time)); } - final String fileName = FileUtils.getFileNameFromPath(filePath); + final String fileName = FileUtils.getFilenameFromPath(filePath); final String pngFileName = FileUtils.exchangeExtension(fileName, ".png"); final String outputDir = new File(filePath).getParent(); //final File targetFile = new File(outputDir, args[4]); diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPlugin.java index 3c4571aa4..6d36d96b5 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPlugin.java @@ -22,7 +22,7 @@ import static com.bc.fiduceo.util.JDomUtils.*; -import org.jdom.Element; +import org.jdom2.Element; /* The XML template for this screening class looks like: diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularScreeningPlugin.java index 2f8332c01..ce2ac8aa6 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AngularScreeningPlugin.java @@ -20,8 +20,8 @@ package com.bc.fiduceo.matchup.screening; -import org.jdom.Attribute; -import org.jdom.Element; +import org.jdom2.Attribute; +import org.jdom2.Element; /* The XML template for this screening class looks like: diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPlugin.java index f6c370fe5..cf14b4aba 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPlugin.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.matchup.screening; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; public class AtsrAngularScreeningPlugin implements ScreeningPlugin { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPlugin.java index 794f1ebae..eda6f9d93 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPlugin.java @@ -20,8 +20,8 @@ package com.bc.fiduceo.matchup.screening; -import org.jdom.Attribute; -import org.jdom.Element; +import org.jdom2.Attribute; +import org.jdom2.Element; public class BuehlerCloudScreeningPlugin implements ScreeningPlugin { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPlugin.java index ea559b991..d190bf1e8 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPlugin.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.matchup.screening; -import org.jdom.Element; +import org.jdom2.Element; public class HIRS_LZADeltaScreeningPlugin implements ScreeningPlugin { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPlugin.java index 5e5e6bff5..cce491d94 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPlugin.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.matchup.screening; -import org.jdom.Element; +import org.jdom2.Element; public class PixelValueScreeningPlugin implements ScreeningPlugin { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningEngine.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningEngine.java index 6df0ce8cf..e5fe44d21 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningEngine.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningEngine.java @@ -25,7 +25,7 @@ import com.bc.fiduceo.matchup.MatchupSet; import com.bc.fiduceo.reader.Reader; import com.bc.fiduceo.tool.ToolContext; -import org.jdom.Element; +import org.jdom2.Element; import ucar.ma2.InvalidRangeException; import java.io.IOException; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningFactory.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningFactory.java index 00006b576..f5f9aac45 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningFactory.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningFactory.java @@ -19,7 +19,7 @@ import com.bc.ceres.core.ServiceRegistry; import com.bc.ceres.core.ServiceRegistryManager; import org.esa.snap.core.util.ServiceLoader; -import org.jdom.Element; +import org.jdom2.Element; import java.util.HashMap; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java index 815c10680..83107d530 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.matchup.screening; -import org.jdom.Element; +import org.jdom2.Element; interface ScreeningPlugin { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPlugin.java index b42fc1fd2..d92e092f3 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPlugin.java @@ -25,7 +25,7 @@ import com.bc.fiduceo.matchup.screening.WindowValueScreening.Evaluate; import com.bc.fiduceo.matchup.screening.WindowValueScreening.SecondaryConfiguration; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Element; +import org.jdom2.Element; import java.util.ArrayList; import java.util.List; diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/writer/MmdWriterConfig.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/writer/MmdWriterConfig.java index 43ccadaab..a4e78c7f4 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/writer/MmdWriterConfig.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/writer/MmdWriterConfig.java @@ -23,11 +23,11 @@ import com.bc.fiduceo.matchup.writer.MmdWriterFactory.NetcdfType; import org.esa.snap.core.util.StringUtils; -import org.jdom.Attribute; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; +import org.jdom2.Attribute; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; import java.io.IOException; import java.io.InputStream; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/MatchupToolTestUseCaseConfigBuilder.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/MatchupToolTestUseCaseConfigBuilder.java index f233a4a81..64bfb093a 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/MatchupToolTestUseCaseConfigBuilder.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/MatchupToolTestUseCaseConfigBuilder.java @@ -23,7 +23,7 @@ import com.bc.fiduceo.matchup.condition.OverlapRemoveConditionPlugin; import com.bc.fiduceo.matchup.condition.TimeDeltaConditionPlugin; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; import static com.bc.fiduceo.core.UseCaseConfig.load; import static com.bc.fiduceo.util.JDomUtils.setNameAttribute; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPluginTest.java index 7b012bd75..6a479b765 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/BorderDistanceConditionPluginTest.java @@ -25,8 +25,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.matchup.SampleSet; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.*; import java.io.IOException; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/ConditionFactoryTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/ConditionFactoryTest.java index d8da47cc5..a0c721466 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/ConditionFactoryTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/ConditionFactoryTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.condition; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/DistanceConditionPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/DistanceConditionPluginTest.java index 14301c19c..4a4e467bd 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/DistanceConditionPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/DistanceConditionPluginTest.java @@ -27,8 +27,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.matchup.SampleSet; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.*; import java.io.IOException; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPluginTest.java index cd36c168d..bc7f9695b 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/OverlapRemoveConditionPluginTest.java @@ -22,8 +22,8 @@ import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPluginTest.java index 31d96b230..4e4e8777f 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/PixelPositionConditionPluginTest.java @@ -1,8 +1,8 @@ package com.bc.fiduceo.matchup.condition; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPluginTest.java index e77ff793f..d9007183b 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/TimeDeltaConditionPluginTest.java @@ -24,8 +24,8 @@ import com.bc.fiduceo.matchup.MatchupSet; import com.bc.fiduceo.core.Sample; import com.bc.fiduceo.matchup.SampleSet; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPluginTest.java index e70f69132..19ee2ef6e 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/condition/UniqueSamplesConditionPluginTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.condition; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPluginTest.java index b3839c6b0..9d72b0578 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularCosineProportionScreeningPluginTest.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.matchup.screening; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularScreeningPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularScreeningPluginTest.java index 12f59e014..80651d352 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularScreeningPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AngularScreeningPluginTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.screening; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Test; import java.io.IOException; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPluginTest.java index 67e24700a..f471e674f 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/AtsrAngularScreeningPluginTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.screening; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPluginTest.java index 3cefa29e2..750bf42cd 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/BuehlerCloudScreeningPluginTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.screening; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPluginTest.java index 70742b712..5339c764b 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/HIRS_LZADeltaScreeningPluginTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.screening; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPluginTest.java index 9c0fc1324..272138249 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/PixelValueScreeningPluginTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.screening; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/ScreeningFactoryTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/ScreeningFactoryTest.java index 7ca3d3563..38714a6c8 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/ScreeningFactoryTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/ScreeningFactoryTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.matchup.screening; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPluginTest.java b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPluginTest.java index 318d80314..8bc47efa2 100644 --- a/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPluginTest.java +++ b/matchup-tool/src/test/java/com/bc/fiduceo/matchup/screening/WindowValueScreeningPluginTest.java @@ -25,8 +25,8 @@ import static org.junit.Assert.*; import com.bc.fiduceo.matchup.SampleSet; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.*; import java.io.IOException; diff --git a/pom.xml b/pom.xml index e6262a79f..1aa052a3f 100644 --- a/pom.xml +++ b/pom.xml @@ -27,31 +27,31 @@ org.esa.snap snap-core - 9.0.2 + 11.0.1 org.esa.snap snap-engine-utilities - 9.0.2 + 11.0.1 org.esa.snap snap-envisat-reader - 9.0.2 + 11.0.1 - org.esa.s3tbx - s3tbx-avhrr-reader - 9.0.3 + eu.esa.opt + opttbx-avhrr-reader + 11.0.1 - org.esa.s3tbx - s3tbx-sentinel3-reader - 9.0.3 + eu.esa.opt + opttbx-sentinel3-reader + 11.0.1 @@ -117,17 +117,12 @@ netcdfAll 5.3.3 - - - - - - - - - - - + + + org.jdom + jdom2 + 2.0.6.1 + diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingConfig.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingConfig.java index c5b48efa6..926d0ea8f 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingConfig.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingConfig.java @@ -20,12 +20,12 @@ package com.bc.fiduceo.post; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import java.io.IOException; import java.io.InputStream; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingFactory.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingFactory.java index 56f569764..b4643c3bb 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingFactory.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingFactory.java @@ -22,7 +22,7 @@ import com.bc.ceres.core.ServiceRegistry; import com.bc.ceres.core.ServiceRegistryManager; import org.esa.snap.core.util.ServiceLoader; -import org.jdom.Element; +import org.jdom2.Element; import java.util.Collections; import java.util.HashMap; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingPlugin.java index 1dc4b88bd..de46efb3f 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingPlugin.java @@ -19,7 +19,7 @@ package com.bc.fiduceo.post; -import org.jdom.Element; +import org.jdom2.Element; public interface PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingTool.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingTool.java index e6566e02b..f5c11c2ed 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingTool.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/PostProcessingTool.java @@ -34,7 +34,7 @@ import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; import ucar.ma2.InvalidRangeException; import ucar.nc2.*; import ucar.nc2.constants.DataFormatType; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePlugin.java index 3fe017a53..27e1444f1 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePlugin.java @@ -6,7 +6,7 @@ import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.util.JDomUtils; import org.esa.snap.core.util.StringUtils; -import org.jdom.Element; +import org.jdom2.Element; import java.util.List; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/airs/AddAirsSpectrumPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/airs/AddAirsSpectrumPlugin.java index 4c0c7f195..1b8412ea3 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/airs/AddAirsSpectrumPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/airs/AddAirsSpectrumPlugin.java @@ -24,7 +24,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class AddAirsSpectrumPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPlugin.java index bfe937f58..352d2b221 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPlugin.java @@ -24,8 +24,8 @@ import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Attribute; -import org.jdom.Element; +import org.jdom2.Attribute; +import org.jdom2.Element; public class AddAmsr2ScanDataQualityPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPlugin.java index 12474accc..170510074 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPlugin.java @@ -24,8 +24,8 @@ import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Attribute; -import org.jdom.Element; +import org.jdom2.Attribute; +import org.jdom2.Element; /* The XML template for this post processing class looks like: diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffs.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffs.java index 69ed3f7d0..31617a661 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffs.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffs.java @@ -7,7 +7,7 @@ import com.bc.fiduceo.reader.fiduceo_fcdr.AVHRR_FCDR_Reader; import com.bc.fiduceo.util.JDomUtils; import com.bc.fiduceo.util.NetCDFUtils; -import org.jdom.Element; +import org.jdom2.Element; import ucar.ma2.*; import ucar.nc2.Dimension; import ucar.nc2.NetcdfFile; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPlugin.java index 4e307c4fc..7203a1a29 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPlugin.java @@ -3,7 +3,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class AddAvhrrCorrCoeffsPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPlugin.java index de79107ea..5d16197bd 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPlugin.java @@ -25,7 +25,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class CALIOP_L2_VFM_FLAGS_PPPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPlugin.java index a2aa2d871..b7e2f9aa4 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPlugin.java @@ -25,7 +25,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class CALIOP_SST_WP100_CLay_PPPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5Archive.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5Archive.java index 3ef313d17..0acd0f1a5 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5Archive.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5Archive.java @@ -1,7 +1,7 @@ package com.bc.fiduceo.post.plugin.era5; import com.bc.fiduceo.util.TimeUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import java.io.File; import java.text.DecimalFormat; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPlugin.java index c92a22691..51ae2b7fc 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPlugin.java @@ -4,11 +4,11 @@ import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Attribute; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; +import org.jdom2.Attribute; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.SAXBuilder; import java.io.IOException; import java.io.InputStream; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/VariableCache.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/VariableCache.java index 1ad3197de..afa129e72 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/VariableCache.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/era5/VariableCache.java @@ -1,6 +1,6 @@ package com.bc.fiduceo.post.plugin.era5; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import ucar.nc2.NetcdfFile; import ucar.nc2.Variable; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSource.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSource.java index 077e9bc47..b2e807ce6 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSource.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSource.java @@ -5,7 +5,7 @@ import com.bc.fiduceo.reader.insitu.gruan_uleic.GruanUleicInsituReader; import com.bc.fiduceo.util.JDomUtils; import com.bc.fiduceo.util.NetCDFUtils; -import org.jdom.Element; +import org.jdom2.Element; import ucar.ma2.Array; import ucar.ma2.DataType; import ucar.ma2.InvalidRangeException; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePlugin.java index ee9ddc3f3..59540c8b0 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePlugin.java @@ -3,7 +3,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class AddGruanSourcePlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPlugin.java index 2a523ab3a..7e64741ee 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPlugin.java @@ -24,7 +24,7 @@ import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.post.util.DistanceToLandMap; -import org.jdom.Element; +import org.jdom2.Element; import java.nio.file.FileSystem; import java.nio.file.Path; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrum.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrum.java index 0f62a4eda..01de307ac 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrum.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrum.java @@ -26,7 +26,7 @@ import com.bc.fiduceo.reader.iasi.IASI_Reader; import com.bc.fiduceo.util.JDomUtils; import com.bc.fiduceo.util.NetCDFUtils; -import org.jdom.Element; +import org.jdom2.Element; import ucar.ma2.Array; import ucar.ma2.ArrayFloat; import ucar.ma2.DataType; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPlugin.java index a4a972612..a888b5eba 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPlugin.java @@ -23,7 +23,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class AddIASISpectrumPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistance.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistance.java index 307827d0d..be91b0915 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistance.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistance.java @@ -4,7 +4,7 @@ import com.bc.fiduceo.post.util.DistanceToLandMap; import com.bc.fiduceo.util.JDomUtils; import com.bc.fiduceo.util.NetCDFUtils; -import org.jdom.Element; +import org.jdom2.Element; import ucar.ma2.Array; import ucar.ma2.DataType; import ucar.ma2.IndexIterator; diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePlugin.java index d8d5e0839..2ad8f86bc 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePlugin.java @@ -4,7 +4,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class AddLandDistancePlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin.java index 733a76ac5..cfbd44f8e 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin.java @@ -25,7 +25,7 @@ import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Element; +import org.jdom2.Element; // @todo 2 tb/tb add example XML config as comment here 2017-03-20 diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePlugin.java index 12b9ef270..2b78edb47 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePlugin.java @@ -23,7 +23,7 @@ import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Element; +import org.jdom2.Element; public class SphericalDistancePlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPlugin.java b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPlugin.java index 51151b689..36fdc12ed 100644 --- a/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPlugin.java +++ b/post-processing-tool/src/main/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPlugin.java @@ -23,7 +23,7 @@ import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; import com.bc.fiduceo.util.JDomUtils; -import org.jdom.Element; +import org.jdom2.Element; public class SstInsituTimeSeriesPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java index 071ba324b..942fd2f86 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java @@ -20,10 +20,10 @@ package com.bc.fiduceo.post; import com.bc.fiduceo.post.plugin.DummyPostProcessingPlugin; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingFactoryTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingFactoryTest.java index 2731c90f7..52c2c1d65 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingFactoryTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingFactoryTest.java @@ -19,7 +19,7 @@ package com.bc.fiduceo.post; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolMain_IO_Test.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolMain_IO_Test.java index 76cd6bc8c..c029bdc71 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolMain_IO_Test.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolMain_IO_Test.java @@ -23,10 +23,10 @@ import com.bc.fiduceo.IOTestRunner; import com.bc.fiduceo.TestUtil; import org.esa.snap.core.util.io.FileUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolTest.java index 3ad23feb6..b1bc4ec25 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingToolTest.java @@ -24,10 +24,10 @@ import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingTool_IOTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingTool_IOTest.java index fda1d7464..ee02e4d7e 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingTool_IOTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingTool_IOTest.java @@ -28,7 +28,7 @@ import org.apache.commons.cli.PosixParser; import org.esa.snap.core.datamodel.ProductData; import org.esa.snap.core.util.io.FileUtils; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/SourceTargetManagerTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/SourceTargetManagerTest.java index bec3400bc..4baa8e9d6 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/SourceTargetManagerTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/SourceTargetManagerTest.java @@ -22,10 +22,10 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.plugin.DummyPostProcessingPlugin; import org.esa.snap.core.util.io.FileUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/DummyPostProcessingPlugin.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/DummyPostProcessingPlugin.java index 8f14e02c9..28e80279c 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/DummyPostProcessingPlugin.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/DummyPostProcessingPlugin.java @@ -21,7 +21,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; public class DummyPostProcessingPlugin implements PostProcessingPlugin { diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePluginTest.java index 2391014ce..011352fb7 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/ElevationToSolZenAnglePluginTest.java @@ -3,8 +3,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPluginTest.java index 24a309dea..d7bfa8af7 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsr2ScanDataQualityPluginTest.java @@ -25,8 +25,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.*; import java.io.IOException; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPluginTest.java index ff2f31b32..e05d5533f 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/amsr/AddAmsrSolarAnglesPluginTest.java @@ -26,8 +26,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.*; import java.io.IOException; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPluginTest.java index 3715a7fe3..91c3bd1d3 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsPluginTest.java @@ -2,8 +2,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsTest.java index 8345fdca1..e0b8d12fe 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/avhrr_fcdr/AddAvhrrCorrCoeffsTest.java @@ -1,8 +1,8 @@ package com.bc.fiduceo.post.plugin.avhrr_fcdr; import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Test; import java.io.IOException; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPluginTest.java index efb46439c..3ee456342 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/flag/CALIOP_L2_VFM_FLAGS_PPPluginTest.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.post.plugin.caliop.flag; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPluginTest.java index 7b54636fe..94cc4a8d6 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/caliop/sst_wp100/CALIOP_SST_WP100_CLay_PPPluginTest.java @@ -21,7 +21,7 @@ package com.bc.fiduceo.post.plugin.caliop.sst_wp100; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest.java index 03087d315..380d07d55 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest.java @@ -3,8 +3,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingContext; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest_parseGeneralizedInformations.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest_parseGeneralizedInformations.java index a87148509..9eb2db08c 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest_parseGeneralizedInformations.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/era5/Era5PostProcessingPluginTest_parseGeneralizedInformations.java @@ -2,11 +2,11 @@ import com.bc.fiduceo.TestUtil; import com.google.common.jimfs.Jimfs; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.JDOMParseException; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.JDOMParseException; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.junit.Test; import org.mockito.MockedStatic; import org.mockito.Mockito; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePluginTest.java index ee6ab7f2d..b02ea3e4b 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourcePluginTest.java @@ -1,8 +1,8 @@ package com.bc.fiduceo.post.plugin.gruan_uleic; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourceTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourceTest.java index da3f7b004..b4e166f65 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourceTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/gruan_uleic/AddGruanSourceTest.java @@ -7,8 +7,8 @@ import com.bc.fiduceo.post.PostProcessingConfig; import com.bc.fiduceo.post.PostProcessingContext; import org.checkerframework.checker.units.qual.A; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; import ucar.ma2.DataType; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPluginTest.java index e7e439883..d94e96dc1 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/hirs/flag/HirsL1CloudyFlagsPluginTest.java @@ -37,7 +37,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Jimfs; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.*; import java.nio.file.FileSystem; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPluginTest.java index be555c215..a415ca51f 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumPluginTest.java @@ -21,8 +21,8 @@ package com.bc.fiduceo.post.plugin.iasi; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumTest.java index cf46e0221..abb399136 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/iasi/AddIASISpectrumTest.java @@ -26,8 +26,8 @@ import com.bc.fiduceo.reader.iasi.IASI_Reader; import com.bc.fiduceo.util.NetCDFUtils; import org.hamcrest.CoreMatchers; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; import ucar.ma2.Array; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePluginTest.java index 131be1b55..4f6fb47ba 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistancePluginTest.java @@ -2,8 +2,8 @@ import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistanceTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistanceTest.java index cb048df13..79ef594c7 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistanceTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/land_distance/AddLandDistanceTest.java @@ -5,8 +5,8 @@ import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.util.DistanceToLandMap; import com.bc.fiduceo.util.NetCDFUtils; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Test; import ucar.ma2.Array; import ucar.ma2.DataType; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPluginTest.java index 53535bfc8..bcdfc2ddf 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPluginTest.java @@ -22,8 +22,8 @@ import com.bc.fiduceo.TestUtil; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin_IO_Test.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin_IO_Test.java index 7abd4f5e8..7fa194a16 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin_IO_Test.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/nwp/NwpPostProcessingPlugin_IO_Test.java @@ -24,8 +24,8 @@ import com.bc.fiduceo.IOTestRunner; import com.bc.fiduceo.TestUtil; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; -import org.jdom.JDOMException; +import org.jdom2.Element; +import org.jdom2.JDOMException; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePluginTest.java index 1b7703e51..6f99628b0 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/point_distance/SphericalDistancePluginTest.java @@ -23,7 +23,7 @@ import static org.junit.Assert.*; import com.bc.fiduceo.post.PostProcessing; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.*; import java.util.Arrays; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPluginTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPluginTest.java index 435cc3907..bb6e66363 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPluginTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeriesPluginTest.java @@ -21,7 +21,7 @@ import com.bc.fiduceo.post.PostProcessing; import com.bc.fiduceo.post.PostProcessingPlugin; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.Before; import org.junit.Test; diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeries_IO_Test.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeries_IO_Test.java index 5a2b1f6fb..efcf2ec63 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeries_IO_Test.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/plugin/sstInsitu/SstInsituTimeSeries_IO_Test.java @@ -33,10 +33,10 @@ import com.bc.fiduceo.reader.insitu.sst_cci.SSTInsituReader; import com.bc.fiduceo.util.NetCDFUtils; import org.esa.snap.core.util.io.FileUtils; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.junit.After; import org.junit.Before; import org.junit.Test; From c0388bf4e110c7471b0687ea301a19a13ef042d8 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 10 Jan 2025 16:28:10 +0100 Subject: [PATCH 2/4] corrected loading issues --- .../bc/fiduceo/reader/amsr/amsre/AMSRE_Reader_IO_Test.java | 2 +- .../reader/fiduceo_fcdr/HIRS_FCDR_Reader_IO_Test.java | 6 +++--- .../java/com/bc/fiduceo/matchup/condition/Condition.java | 2 +- .../com/bc/fiduceo/matchup/condition/ConditionPlugin.java | 2 +- .../com/bc/fiduceo/matchup/screening/ScreeningPlugin.java | 2 +- .../java/com/bc/fiduceo/post/PostProcessingConfigTest.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/test/java/com/bc/fiduceo/reader/amsr/amsre/AMSRE_Reader_IO_Test.java b/core/src/test/java/com/bc/fiduceo/reader/amsr/amsre/AMSRE_Reader_IO_Test.java index 711791d75..3fbeea98f 100644 --- a/core/src/test/java/com/bc/fiduceo/reader/amsr/amsre/AMSRE_Reader_IO_Test.java +++ b/core/src/test/java/com/bc/fiduceo/reader/amsr/amsre/AMSRE_Reader_IO_Test.java @@ -459,7 +459,7 @@ public void testGetPixelLocator() throws IOException { Point2D[] pixelLocation = pixelLocator.getPixelLocation(-51.034195, 52.659184); assertEquals(1, pixelLocation.length); assertEquals(132.51219668358698, pixelLocation[0].getX(), 1e-8); - assertEquals(411.4166814102514, pixelLocation[0].getY(), 1e-8); + assertEquals(411.4166814102514, pixelLocation[0].getY(), 1e-6); pixelLocation = pixelLocator.getPixelLocation(-4, 1176); assertEquals(0, pixelLocation.length); diff --git a/core/src/test/java/com/bc/fiduceo/reader/fiduceo_fcdr/HIRS_FCDR_Reader_IO_Test.java b/core/src/test/java/com/bc/fiduceo/reader/fiduceo_fcdr/HIRS_FCDR_Reader_IO_Test.java index 54ccfb46c..798b35841 100644 --- a/core/src/test/java/com/bc/fiduceo/reader/fiduceo_fcdr/HIRS_FCDR_Reader_IO_Test.java +++ b/core/src/test/java/com/bc/fiduceo/reader/fiduceo_fcdr/HIRS_FCDR_Reader_IO_Test.java @@ -515,7 +515,7 @@ public void testGetPixelLocator() throws IOException { assertNotNull(pixelLocation); assertEquals(1, pixelLocation.length); - assertEquals(38.317269513397704, pixelLocation[0].getX(), 1e-8); + assertEquals(38.317269513397704, pixelLocation[0].getX(), 1e-6); assertEquals(781.666865947429, pixelLocation[0].getY(), 1e-8); } finally { reader.close(); @@ -540,7 +540,7 @@ public void testGetPixelLocator_N09() throws IOException { assertNotNull(pixelLocation); assertEquals(1, pixelLocation.length); - assertEquals(38.50497313441438, pixelLocation[0].getX(), 1e-8); + assertEquals(38.50497313441438, pixelLocation[0].getX(), 1e-6); assertEquals(783.6241097278424, pixelLocation[0].getY(), 1e-8); } finally { reader.close(); @@ -567,7 +567,7 @@ public void testGetSubScenePixelLocator() throws IOException { assertNotNull(pixelLocation); assertEquals(1, pixelLocation.length); - assertEquals(33.59545482099081, pixelLocation[0].getX(), 1e-8); + assertEquals(33.59545482099081, pixelLocation[0].getX(), 1e-6); assertEquals(416.5860033509568, pixelLocation[0].getY(), 1e-8); } finally { diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/Condition.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/Condition.java index fa15c3e94..e56a4bf51 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/Condition.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/Condition.java @@ -23,7 +23,7 @@ import com.bc.fiduceo.matchup.MatchupSet; -interface Condition { +public interface Condition { void apply(MatchupSet matchupSet, ConditionEngineContext context); } diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java index 7175cbba9..01484ecda 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/condition/ConditionPlugin.java @@ -23,7 +23,7 @@ import org.jdom2.Element; -interface ConditionPlugin { +public interface ConditionPlugin { Condition createCondition(Element element); diff --git a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java index 83107d530..d8ad9bb10 100644 --- a/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java +++ b/matchup-tool/src/main/java/com/bc/fiduceo/matchup/screening/ScreeningPlugin.java @@ -23,7 +23,7 @@ import org.jdom2.Element; -interface ScreeningPlugin { +public interface ScreeningPlugin { Screening createScreening(Element element); diff --git a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java index 942fd2f86..24161e98e 100644 --- a/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java +++ b/post-processing-tool/src/test/java/com/bc/fiduceo/post/PostProcessingConfigTest.java @@ -210,7 +210,7 @@ public void testLoad_CauseIsJDOMParseException() { PostProcessingConfig.load(inputStream); fail("RuntimeException expected"); } catch (RuntimeException expected) { - assertEquals("org.jdom.input.JDOMParseException", expected.getCause().getClass().getTypeName()); + assertEquals("org.jdom2.input.JDOMParseException", expected.getCause().getClass().getTypeName()); assertTrue(expected.getMessage().matches("Unable to initialize post processing configuration: .*")); } } From 7855a43abe495c80cf148f8fb188462d91dd233b Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 15 Jan 2025 09:15:23 +0100 Subject: [PATCH 3/4] updated dependencies, replaced ascii based geometry tests --- CHANGES.md | 1 + core/pom.xml | 2 +- .../fiduceo/geometry/GeometryTestUtils.java | 16 ++ .../ingest/IngestionToolIntegrationTest.java | 170 ++++++++++++------ matchup-tool/pom.xml | 2 +- pom.xml | 30 +--- post-processing-tool/pom.xml | 2 +- 7 files changed, 141 insertions(+), 82 deletions(-) create mode 100644 core/src/test/java/com/bc/fiduceo/geometry/GeometryTestUtils.java diff --git a/CHANGES.md b/CHANGES.md index 201e6d51e..b3a331e37 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,5 @@ ### Updates from version 1.5.8 to 1.6.0 +* Migrated to SNAP 11, several refactorings and library updates * The VariableCache now uses an LRU cache with a listener to automatically free the oldest cached, no longer needed variables and file handles when the maximum cache size is reached.* fix wrong corner point order of era5 interpolation in SatelliteFields diff --git a/core/pom.xml b/core/pom.xml index 66f2b4415..dcde56807 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -106,7 +106,7 @@ org.hamcrest - hamcrest-all + hamcrest test diff --git a/core/src/test/java/com/bc/fiduceo/geometry/GeometryTestUtils.java b/core/src/test/java/com/bc/fiduceo/geometry/GeometryTestUtils.java new file mode 100644 index 000000000..d97106792 --- /dev/null +++ b/core/src/test/java/com/bc/fiduceo/geometry/GeometryTestUtils.java @@ -0,0 +1,16 @@ +package com.bc.fiduceo.geometry; + +import static org.junit.Assert.assertEquals; + +public class GeometryTestUtils { + + public static void assertSameGeometry(Geometry expected, Geometry geoBounds) { + Point[] expectedCoords = expected.getCoordinates(); + Point[] actualCoords = geoBounds.getCoordinates(); + assertEquals(expectedCoords.length, actualCoords.length); + for(int i = 0; i < expectedCoords.length; i++) { + assertEquals(expectedCoords[i].getLon(), actualCoords[i].getLon(), 1e-8); + assertEquals(expectedCoords[i].getLat(), actualCoords[i].getLat(), 1e-8); + } + } +} diff --git a/ingestion-tool/src/test/java/com/bc/fiduceo/ingest/IngestionToolIntegrationTest.java b/ingestion-tool/src/test/java/com/bc/fiduceo/ingest/IngestionToolIntegrationTest.java index aa2065b0b..d97693659 100644 --- a/ingestion-tool/src/test/java/com/bc/fiduceo/ingest/IngestionToolIntegrationTest.java +++ b/ingestion-tool/src/test/java/com/bc/fiduceo/ingest/IngestionToolIntegrationTest.java @@ -49,6 +49,7 @@ import java.sql.SQLException; import java.util.List; +import static com.bc.fiduceo.geometry.GeometryTestUtils.assertSameGeometry; import static org.junit.Assert.*; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -182,18 +183,22 @@ public void testIngest_AVHRR_GAC_NOAA10_v013() throws SQLException, ParseExcepti final MultiPolygon multiPolygon = (MultiPolygon) geoBounds; final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.AVHRR_GAC_N10_GEOMETRIES_v013[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.AVHRR_GAC_N10_GEOMETRIES_v013[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.AVHRR_GAC_N10_GEOMETRIES_v013[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N10_GEOMETRIES_v013[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(1988, 3, 18, 0, 9, 17, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(1988, 3, 18, 1, 6, 16, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.AVHRR_GAC_N10_AXIS_GEOMETRIES_v013[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N10_AXIS_GEOMETRIES_v013[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(1988, 3, 18, 1, 6, 16, 0, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(1988, 3, 18, 2, 3, 15, 0, timeAxes[1].getEndTime()); - assertEquals(TestData.AVHRR_GAC_N10_AXIS_GEOMETRIES_v013[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N10_AXIS_GEOMETRIES_v013[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -221,18 +226,22 @@ public void testIngest_AVHRR_GAC_NOAA11_v013() throws SQLException, ParseExcepti final MultiPolygon multiPolygon = (MultiPolygon) geoBounds; final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.AVHRR_GAC_N11_GEOMETRIES_v013[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.AVHRR_GAC_N11_GEOMETRIES_v013[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.AVHRR_GAC_N11_GEOMETRIES_v013[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N11_GEOMETRIES_v013[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(1991, 5, 9, 7, 51, 46, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(1991, 5, 9, 8, 48, 43, 500, timeAxes[0].getEndTime()); - assertEquals(TestData.AVHRR_GAC_N11_AXIS_GEOMETRIES_v013[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N11_AXIS_GEOMETRIES_v013[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(1991, 5, 9, 8, 48, 43, 500, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(1991, 5, 9, 9, 45, 41, 0, timeAxes[1].getEndTime()); - assertEquals(TestData.AVHRR_GAC_N11_AXIS_GEOMETRIES_v013[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N11_AXIS_GEOMETRIES_v013[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -260,18 +269,22 @@ public void testIngest_AVHRR_GAC_NOAA17_v014() throws SQLException, ParseExcepti final MultiPolygon multiPolygon = (MultiPolygon) geoBounds; final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.AVHRR_GAC_N17_GEOMETRIES_v014_CSPP[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.AVHRR_GAC_N17_GEOMETRIES_v014_CSPP[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.AVHRR_GAC_N17_GEOMETRIES_v014_CSPP[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N17_GEOMETRIES_v014_CSPP[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(2009, 10, 25, 8, 7, 39, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2009, 10, 25, 9, 4, 9, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.AVHRR_GAC_N17_AXIS_GEOMETRIES_v014_CSPP[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N17_AXIS_GEOMETRIES_v014_CSPP[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(2009, 10, 25, 9, 4, 9, 0, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(2009, 10, 25, 10, 0, 39, 0, timeAxes[1].getEndTime()); - assertEquals(TestData.AVHRR_GAC_N17_AXIS_GEOMETRIES_v014_CSPP[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.AVHRR_GAC_N17_AXIS_GEOMETRIES_v014_CSPP[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -298,18 +311,22 @@ public void testIngest_AMSUB_NOAA15() throws SQLException, ParseException { final MultiPolygon multiPolygon = (MultiPolygon) geoBounds; final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.AMSUB_N15_GEOMETRIES[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.AMSUB_N15_GEOMETRIES[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.AMSUB_N15_GEOMETRIES[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.AMSUB_N15_GEOMETRIES[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(2007, 8, 22, 16, 40, 37, 120, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2007, 8, 22, 17, 32, 45, 119, timeAxes[0].getEndTime()); - assertEquals(TestData.AMSUB_N15_AXIS_GEOMETRIES[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.AMSUB_N15_AXIS_GEOMETRIES[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(2007, 8, 22, 17, 32, 45, 119, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(2007, 8, 22, 18, 24, 53, 119, timeAxes[1].getEndTime()); - assertEquals(TestData.AMSUB_N15_AXIS_GEOMETRIES[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.AMSUB_N15_AXIS_GEOMETRIES[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -348,18 +365,22 @@ public void testIngest_MHS_NOAA18() throws SQLException, ParseException { final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.MHS_N18_GEOMETRIES[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.MHS_N18_GEOMETRIES[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.MHS_N18_GEOMETRIES[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.MHS_N18_GEOMETRIES[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(2007, 8, 22, 11, 51, 27, 277, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2007, 8, 22, 12, 44, 29, 943, timeAxes[0].getEndTime()); - assertEquals(TestData.MHS_N18_AXIS_GEOMETRIES[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.MHS_N18_AXIS_GEOMETRIES[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(2007, 8, 22, 12, 44, 29, 943, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(2007, 8, 22, 13, 37, 32, 610, timeAxes[1].getEndTime()); - assertEquals(TestData.MHS_N18_AXIS_GEOMETRIES[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.MHS_N18_AXIS_GEOMETRIES[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -388,18 +409,22 @@ public void testIngest_HIRS_TIROSN() throws SQLException, ParseException { final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.HIRS_TN_GEOMETRIES[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.HIRS_TN_GEOMETRIES[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.HIRS_TN_GEOMETRIES[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.HIRS_TN_GEOMETRIES[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(1979, 10, 14, 16, 23, 59, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(1979, 10, 14, 17, 15, 46, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.HIRS_TN_AXIS_GEOMETRIES[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.HIRS_TN_AXIS_GEOMETRIES[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(1979, 10, 14, 17, 15, 46, 0, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(1979, 10, 14, 18, 7, 33, 0, timeAxes[1].getEndTime()); - assertEquals(TestData.HIRS_TN_AXIS_GEOMETRIES[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.HIRS_TN_AXIS_GEOMETRIES[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -428,18 +453,22 @@ public void testIngest_HIRS_NOAA10() throws SQLException, ParseException { final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.HIRS_N10_GEOMETRIES[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.HIRS_N10_GEOMETRIES[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.HIRS_N10_GEOMETRIES[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.HIRS_N10_GEOMETRIES[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(1989, 3, 17, 6, 12, 16, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(1989, 3, 17, 7, 7, 9, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.HIRS_N10_AXIS_GEOMETRIES[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.HIRS_N10_AXIS_GEOMETRIES[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(1989, 3, 17, 7, 7, 9, 0, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(1989, 3, 17, 8, 2, 2, 0, timeAxes[1].getEndTime()); - assertEquals(TestData.HIRS_N10_AXIS_GEOMETRIES[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.HIRS_N10_AXIS_GEOMETRIES[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -468,18 +497,22 @@ public void testIngest_HIRS_METOPA() throws SQLException, ParseException { final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.HIRS_MA_GEOMETRIES[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.HIRS_MA_GEOMETRIES[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.HIRS_MA_GEOMETRIES[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.HIRS_MA_GEOMETRIES[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(2011, 8, 23, 16, 41, 52, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2011, 8, 23, 17, 32, 16, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.HIRS_MA_AXIS_GEOMETRIES[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.HIRS_MA_AXIS_GEOMETRIES[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(2011, 8, 23, 17, 32, 16, 0, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(2011, 8, 23, 18, 22, 40, 0, timeAxes[1].getEndTime()); - assertEquals(TestData.HIRS_MA_AXIS_GEOMETRIES[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.HIRS_MA_AXIS_GEOMETRIES[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -505,13 +538,15 @@ public void testIngest_ATSR1() throws SQLException, ParseException { final Geometry geoBounds = observation.getGeoBounds(); assertTrue(geoBounds instanceof Polygon); - assertEquals(TestData.ATSR1_GEOMETRY, geometryFactory.format(geoBounds)); + Geometry expected = geometryFactory.parse(TestData.ATSR1_GEOMETRY); + assertSameGeometry(expected, geoBounds); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(1, timeAxes.length); TestUtil.assertCorrectUTCDate(1993, 8, 5, 21, 0, 30, 240, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(1993, 8, 5, 22, 41, 8, 490, timeAxes[0].getEndTime()); - assertEquals(TestData.ATSR1_AXIS_GEOMETRY, geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.ATSR1_AXIS_GEOMETRY); + assertSameGeometry(expected, timeAxes[0].getGeometry()); } @Test @@ -537,13 +572,15 @@ public void testIngest_ATSR2() throws SQLException, ParseException { final Geometry geoBounds = observation.getGeoBounds(); assertTrue(geoBounds instanceof Polygon); - assertEquals(TestData.ATSR2_GEOMETRY, geometryFactory.format(geoBounds)); + Geometry expected = geometryFactory.parse(TestData.ATSR2_GEOMETRY); + assertSameGeometry(expected, geoBounds); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(1, timeAxes.length); TestUtil.assertCorrectUTCDate(1998, 4, 24, 5, 57, 54, 720, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(1998, 4, 24, 7, 38, 32, 970, timeAxes[0].getEndTime()); - assertEquals(TestData.ATSR2_AXIS_GEOMETRY, geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.ATSR2_AXIS_GEOMETRY); + assertSameGeometry(expected, timeAxes[0].getGeometry()); } @Test @@ -569,13 +606,15 @@ public void testIngest_AATSR() throws SQLException, ParseException { final Geometry geoBounds = observation.getGeoBounds(); assertTrue(geoBounds instanceof Polygon); - assertEquals(TestData.AATSR_GEOMETRY, geometryFactory.format(geoBounds)); + Geometry expected = geometryFactory.parse(TestData.AATSR_GEOMETRY); + assertSameGeometry(expected, geoBounds); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(1, timeAxes.length); TestUtil.assertCorrectUTCDate(2006, 2, 15, 7, 8, 52, 812, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2006, 2, 15, 8, 57, 40, 662, timeAxes[0].getEndTime()); - assertEquals(TestData.AATSR_AXIS_GEOMETRY, geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.AATSR_AXIS_GEOMETRY); + assertSameGeometry(expected, timeAxes[0].getGeometry()); } @Test @@ -601,13 +640,15 @@ public void testIngest_AMSRE() throws SQLException, ParseException { final Geometry geoBounds = observation.getGeoBounds(); assertTrue(geoBounds instanceof Polygon); - assertEquals(TestData.AMSRE_GEOMETRY, geometryFactory.format(geoBounds)); + Geometry expected = geometryFactory.parse(TestData.AMSRE_GEOMETRY); + assertSameGeometry(expected, geoBounds); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(1, timeAxes.length); TestUtil.assertCorrectUTCDate(2005, 2, 17, 5, 36, 6, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2005, 2, 17, 6, 25, 56, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.AMSRE_AXIS_GEOMETRY, geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.AMSRE_AXIS_GEOMETRY); + assertSameGeometry(expected, timeAxes[0].getGeometry()); } @Test @@ -632,13 +673,16 @@ public void testIngest_SSMT2() throws SQLException, ParseException { final Geometry geoBounds = observation.getGeoBounds(); assertTrue(geoBounds instanceof Polygon); - assertEquals(TestData.SSMT2_GEOMETRY, geometryFactory.format(geoBounds)); + + Geometry expected = geometryFactory.parse(TestData.SSMT2_GEOMETRY); + assertSameGeometry(expected, geoBounds); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(1, timeAxes.length); TestUtil.assertCorrectUTCDate(2001, 6, 14, 12, 29, 4, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2001, 6, 14, 14, 10, 58, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.SSMT2_AXIS_GEOMETRY, geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.SSMT2_AXIS_GEOMETRY); + assertSameGeometry(expected, timeAxes[0].getGeometry()); } @Test @@ -742,18 +786,22 @@ public void testIngest_IASI_MA() throws SQLException, ParseException { final MultiPolygon multiPolygon = (MultiPolygon) geoBounds; final List polygons = multiPolygon.getPolygons(); assertEquals(2, polygons.size()); - assertEquals(TestData.IASI_MA_GEOMETRIES[0], geometryFactory.format(polygons.get(0))); - assertEquals(TestData.IASI_MA_GEOMETRIES[1], geometryFactory.format(polygons.get(1))); + Geometry expected = geometryFactory.parse(TestData.IASI_MA_GEOMETRIES[0]); + assertSameGeometry(expected, polygons.get(0)); + expected = geometryFactory.parse(TestData.IASI_MA_GEOMETRIES[1]); + assertSameGeometry(expected, polygons.get(1)); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(2, timeAxes.length); TestUtil.assertCorrectUTCDate(2016, 1, 1, 12, 47, 54, 870, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2016, 1, 1, 13, 37, 26, 642, timeAxes[0].getEndTime()); - assertEquals(TestData.IASI_MA_AXIS_GEOMETRIES[0], geometryFactory.format(timeAxes[0].getGeometry())); + expected = geometryFactory.parse(TestData.IASI_MA_AXIS_GEOMETRIES[0]); + assertSameGeometry(expected, timeAxes[0].getGeometry()); TestUtil.assertCorrectUTCDate(2016, 1, 1, 13, 37, 26, 642, timeAxes[1].getStartTime()); TestUtil.assertCorrectUTCDate(2016, 1, 1, 14, 26, 58, 414, timeAxes[1].getEndTime()); - assertEquals(TestData.IASI_MA_AXIS_GEOMETRIES[1], geometryFactory.format(timeAxes[1].getGeometry())); + expected = geometryFactory.parse(TestData.IASI_MA_AXIS_GEOMETRIES[1]); + assertSameGeometry(expected, timeAxes[1].getGeometry()); } @Test @@ -776,16 +824,18 @@ public void testIngest_MYD06_AQUA() throws SQLException, ParseException { assertEquals(NodeType.UNDEFINED, observation.getNodeType()); assertEquals("v006", observation.getVersion()); - final Geometry geoBounds = observation.getGeoBounds(); - assertTrue(geoBounds instanceof Polygon); + final Geometry actualBounds = observation.getGeoBounds(); + assertTrue(actualBounds instanceof Polygon); - assertEquals(TestData.MYD06_AQUA_GEOMETRY, geometryFactory.format(geoBounds)); + Geometry expectedBounds = geometryFactory.parse(TestData.MYD06_AQUA_GEOMETRY); + assertSameGeometry(expectedBounds, actualBounds); final TimeAxis[] timeAxes = observation.getTimeAxes(); assertEquals(1, timeAxes.length); TestUtil.assertCorrectUTCDate(2009, 5, 13, 10, 35, 0, 0, timeAxes[0].getStartTime()); TestUtil.assertCorrectUTCDate(2009, 5, 13, 10, 40, 0, 0, timeAxes[0].getEndTime()); - assertEquals(TestData.MYD06_AQUA_AXIS_GEOMETRY, geometryFactory.format(timeAxes[0].getGeometry())); + expectedBounds = geometryFactory.parse(TestData.MYD06_AQUA_AXIS_GEOMETRY); + assertSameGeometry(expectedBounds, timeAxes[0].getGeometry()); } @Test @@ -957,8 +1007,10 @@ public void testIngest_MY021KM() throws SQLException, ParseException { assertEquals("v61", observation.getVersion()); final Geometry geoBounds = observation.getGeoBounds(); - assertEquals(TestData.MYD012KM_AQ_GEOMETRY, geometryFactory.format(geoBounds)); - assertEquals(TestData.MYD021KM_AQ_AXIS_GEOMETRY, geometryFactory.format(observation.getTimeAxes()[0].getGeometry())); + Geometry expected = geometryFactory.parse(TestData.MYD012KM_AQ_GEOMETRY); + assertSameGeometry(expected, geoBounds); + expected = geometryFactory.parse(TestData.MYD021KM_AQ_AXIS_GEOMETRY); + assertSameGeometry(expected, observation.getTimeAxes()[0].getGeometry()); } @Test @@ -982,8 +1034,10 @@ public void testIngest_MOD35() throws SQLException, ParseException { assertEquals("v61", observation.getVersion()); final Geometry geoBounds = observation.getGeoBounds(); - assertEquals(TestData.MOD35_TE_GEOMETRY, geometryFactory.format(geoBounds)); - assertEquals(TestData.MOD35_TE_AXIS_GEOMETRY, geometryFactory.format(observation.getTimeAxes()[0].getGeometry())); + Geometry expected = geometryFactory.parse(TestData.MOD35_TE_GEOMETRY); + assertSameGeometry(expected, geoBounds); + expected = geometryFactory.parse(TestData.MOD35_TE_AXIS_GEOMETRY); + assertSameGeometry(expected, observation.getTimeAxes()[0].getGeometry()); } @Test @@ -1007,8 +1061,10 @@ public void testIngest_AVHRR_FRAC_MB() throws SQLException, ParseException { assertEquals("v1", observation.getVersion()); final Geometry geoBounds = observation.getGeoBounds(); - assertEquals(TestData.AVHRR_FRAC_MB_GEOMETRY, geometryFactory.format(geoBounds)); - assertEquals(TestData.AVHRR_FRAC_MB_AXIS_GEOMETRY, geometryFactory.format(observation.getTimeAxes()[0].getGeometry())); + Geometry expected = geometryFactory.parse(TestData.AVHRR_FRAC_MB_GEOMETRY); + assertSameGeometry(expected, geoBounds); + expected = geometryFactory.parse(TestData.AVHRR_FRAC_MB_AXIS_GEOMETRY); + assertSameGeometry(expected, observation.getTimeAxes()[0].getGeometry()); } @Test @@ -1185,7 +1241,7 @@ public void testIngest_smap_sss__for_look() throws SQLException, ParseException final Geometry geoBounds = observation.getGeoBounds(); assertEquals("POLYGON((-179.9690856933594 -86.61936950683594,179.9915313720703 -86.61936950683594,179.9915313720703 86.40787506103517,-179.9690856933594 86.40787506103517,-179.9690856933594 -86.61936950683594))", - geometryFactory.format(geoBounds)); + geometryFactory.format(geoBounds)); final Geometry intersection = geoBounds.getIntersection(geometryFactory.createPoint(0, 0)); assertEquals(geometryFactory.createPoint(0, 0), intersection); final TimeAxis timeAxis = observation.getTimeAxes()[0]; diff --git a/matchup-tool/pom.xml b/matchup-tool/pom.xml index 3c6eeee41..e6a9ea18f 100644 --- a/matchup-tool/pom.xml +++ b/matchup-tool/pom.xml @@ -62,7 +62,7 @@ org.hamcrest - hamcrest-all + hamcrest test diff --git a/pom.xml b/pom.xml index 1aa052a3f..bb3ecab2d 100644 --- a/pom.xml +++ b/pom.xml @@ -52,12 +52,6 @@ eu.esa.opt opttbx-sentinel3-reader 11.0.1 - - - - - - @@ -69,7 +63,7 @@ org.apache.commons commons-dbcp2 - 2.9.0 + 2.13.0 @@ -81,7 +75,7 @@ mysql mysql-connector-java - 8.0.18 + 8.0.33 @@ -98,7 +92,7 @@ com.h2database h2 - 2.1.210 + 2.3.232 @@ -134,8 +128,8 @@ org.hamcrest - hamcrest-all - 1.3 + hamcrest + 3.0 test @@ -182,10 +176,10 @@ maven-compiler-plugin - 3.10.1 + 3.11.0 - 1.8 - 1.8 + 11 + 11 true UTF-8 @@ -205,14 +199,6 @@ - - - - - - - - false diff --git a/post-processing-tool/pom.xml b/post-processing-tool/pom.xml index d3269eca1..f8407db60 100644 --- a/post-processing-tool/pom.xml +++ b/post-processing-tool/pom.xml @@ -71,7 +71,7 @@ org.hamcrest - hamcrest-all + hamcrest test From 28f2dd1386703ca7d6214620947ee75b78f1804d Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 4 Feb 2025 12:49:36 +0100 Subject: [PATCH 4/4] corrected POINT wkt --- .../com/bc/fiduceo/geometry/s2/BcS2GeometryFactoryTest.java | 4 ++-- google-s2/src/main/java/com/bc/geometry/s2/S2WKTWriter.java | 2 +- .../src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/test/java/com/bc/fiduceo/geometry/s2/BcS2GeometryFactoryTest.java b/core/src/test/java/com/bc/fiduceo/geometry/s2/BcS2GeometryFactoryTest.java index d4def467b..581d28a8d 100644 --- a/core/src/test/java/com/bc/fiduceo/geometry/s2/BcS2GeometryFactoryTest.java +++ b/core/src/test/java/com/bc/fiduceo/geometry/s2/BcS2GeometryFactoryTest.java @@ -120,7 +120,7 @@ public void testFormat_point() { final Point point = factory.createPoint(34.8, -72.44); final String wkt = factory.format(point); - assertEquals("POINT(34.8,-72.44)", wkt); + assertEquals("POINT(34.8 -72.44)", wkt); } @Test @@ -267,7 +267,7 @@ public void testToStorageFormat_point() { final Geometry point = factory.parse("POINT(-22.5 67.23)"); final byte[] storageFormat = factory.toStorageFormat(point); - assertEquals("POINT(-22.500000000000004,67.23)", new String(storageFormat)); + assertEquals("POINT(-22.500000000000004 67.23)", new String(storageFormat)); } @Test diff --git a/google-s2/src/main/java/com/bc/geometry/s2/S2WKTWriter.java b/google-s2/src/main/java/com/bc/geometry/s2/S2WKTWriter.java index 50326a02c..0cf7d372e 100644 --- a/google-s2/src/main/java/com/bc/geometry/s2/S2WKTWriter.java +++ b/google-s2/src/main/java/com/bc/geometry/s2/S2WKTWriter.java @@ -87,7 +87,7 @@ private static String writePointWkt(S2LatLng geometry) { final StringBuilder builder = new StringBuilder(); builder.append("POINT("); builder.append(geometry.lngDegrees()); - builder.append(","); + builder.append(" "); builder.append(geometry.latDegrees()); builder.append(")"); return builder.toString(); diff --git a/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java b/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java index bf1c0c4e8..3feab10f5 100644 --- a/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java +++ b/google-s2/src/test/java/com/bc/geometry/s2/S2WKTWriterTest.java @@ -62,7 +62,7 @@ public void testWritePoint() { final S2Point s2Point = createS2Point(-18.7, 45.9); final String wkt = S2WKTWriter.write(s2Point); - assertEquals("POINT(-18.7,45.9)", wkt); + assertEquals("POINT(-18.7 45.9)", wkt); } @Test @@ -71,7 +71,7 @@ public void testWritePoint_S2LatLong() { final S2LatLng s2LatLng = new S2LatLng(s2Point); final String wkt = S2WKTWriter.write(s2LatLng); - assertEquals("POINT(-19.800000000000004,45.99999999999999)", wkt); + assertEquals("POINT(-19.800000000000004 45.99999999999999)", wkt); } @Test