This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 78771af452120b6e7aa4d9cce2a66c9e476575d2 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Thu Dec 19 16:24:57 2024 +0100 Avoid triple-slash for starting a comment, because they are reserved for Markdown in latest Java versions. --- .../main/org/apache/sis/image/Visualization.java | 18 ++--- .../sis/metadata/privy/ReferencingServices.java | 20 ++--- .../apache/sis/xml/bind/IdentifierMapAdapter.java | 16 ++-- .../sis/xml/bind/ModifiableIdentifierMap.java | 16 ++-- .../main/org/apache/sis/io/wkt/Element.java | 20 ++--- .../referencing/internal/ServicesForMetadata.java | 20 ++--- .../operation/CoordinateOperationFinder.java | 68 +++++++--------- .../operation/provider/MapProjection.java | 14 ++-- .../operation/CoordinateOperationFinderTest.java | 10 +-- .../referencing/operation/provider/NADCONTest.java | 10 +-- .../referencing/operation/provider/NTv2Test.java | 10 +-- .../sis/storage/geotiff/ImageFileDirectory.java | 90 +++++++++++----------- .../sis/storage/geotiff/reader/CRSBuilder.java | 50 ++++++------ .../geotiff/reader/GridGeometryBuilder.java | 20 ++--- .../sis/storage/xml/stream/StaxStreamReader.java | 10 +-- .../sis/storage/xml/stream/StaxStreamWriter.java | 10 +-- .../main/org/apache/sis/measure/AngleFormat.java | 47 +++++------ .../org/apache/sis/util/collection/RangeSet.java | 6 +- 18 files changed, 220 insertions(+), 235 deletions(-) diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/Visualization.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/Visualization.java index 2789a30e86..e6309b2fb4 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/Visualization.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/Visualization.java @@ -136,9 +136,9 @@ final class Visualization extends ResampledImage { /** Band to make visible among the remaining {@value #NUM_BANDS} bands. */ private static final int VISIBLE_BAND = 0; - //// ┌─────────────────────────────────────┐ - //// │ Arguments given by user │ - //// └─────────────────────────────────────┘ + // ┌─────────────────────────────────────┐ + // │ Arguments given by user │ + // └─────────────────────────────────────┘ /** Pixel coordinates of the visualization image, or {@code null} if same as {@link #source} image. */ private Rectangle bounds; @@ -152,9 +152,9 @@ final class Visualization extends ResampledImage { /** Description of {@link #source} bands, or {@code null} if none. */ private SampleDimension[] sampleDimensions; - //// ┌─────────────────────────────────────┐ - //// │ Given by ImageProcesor.configure(…) │ - //// └─────────────────────────────────────┘ + // ┌─────────────────────────────────────┐ + // │ Given by ImageProcesor.configure(…) │ + // └─────────────────────────────────────┘ /** Computer of tile size. */ ImageLayout layout; @@ -171,9 +171,9 @@ final class Visualization extends ResampledImage { /** Values of {@value #POSITIONAL_ACCURACY_KEY} property, or {@code null} if none. */ Quantity<?>[] positionalAccuracyHints; - //// ┌─────────────────────────────────────┐ - //// │ Computed by `create(…)` │ - //// └─────────────────────────────────────┘ + // ┌─────────────────────────────────────┐ + // │ Computed by `create(…)` │ + // └─────────────────────────────────────┘ /** Transfer functions to apply on each band of the source image. */ private MathTransform1D[] converters; diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/privy/ReferencingServices.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/privy/ReferencingServices.java index b62e674a47..78a54e6313 100644 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/privy/ReferencingServices.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/privy/ReferencingServices.java @@ -117,11 +117,11 @@ public class ReferencingServices extends OptionalDependency { - /////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// SERVICES FOR ISO 19115 METADATA //// - //// //// - /////////////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ SERVICES FOR ISO 19115 METADATA ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════════════════════════╝ /** * Sets a geographic bounding box from the specified envelope. @@ -243,11 +243,11 @@ public class ReferencingServices extends OptionalDependency { - /////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// OTHER REFERENCING SERVICES //// - //// //// - /////////////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ OTHER REFERENCING SERVICES ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════════════════════════╝ /** * Returns a fully implemented parameter descriptor. diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/IdentifierMapAdapter.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/IdentifierMapAdapter.java index cfd40d5ae3..044bc1dabe 100644 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/IdentifierMapAdapter.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/IdentifierMapAdapter.java @@ -178,14 +178,14 @@ public class IdentifierMapAdapter extends AbstractMap<Citation,String> implement - //////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// END OF SPECIAL CASES. //////// - //////// //////// - //////// Implementation of IdentifierMap methods follow. Each method may //////// - //////// have a switch statement over the special cases declared above. //////// - //////// //////// - //////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ END OF SPECIAL CASES. ║ + // ║ ║ + // ║ Implementation of IdentifierMap methods follow. Each method may ║ + // ║ have a switch statement over the special cases declared above. ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════╝ /** * Whether this map support {@code put} and {@code remove} operations. diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/ModifiableIdentifierMap.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/ModifiableIdentifierMap.java index ab0624e14d..1e0ba6f3f9 100644 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/ModifiableIdentifierMap.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/ModifiableIdentifierMap.java @@ -90,14 +90,14 @@ public final class ModifiableIdentifierMap extends IdentifierMapAdapter { - //////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// END OF SPECIAL CASES. //////// - //////// //////// - //////// Implementation of IdentifierMap methods follow. Each method may //////// - //////// have a switch statement over the special cases declared above. //////// - //////// //////// - //////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ END OF SPECIAL CASES. ║ + // ║ ║ + // ║ Implementation of IdentifierMap methods follow. Each method may ║ + // ║ have a switch statement over the special cases declared above. ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════╝ /** * Returns {@code true} since this map support {@code put} and {@code remove} operations. diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Element.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Element.java index 8a4e621d0b..87d0938106 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Element.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Element.java @@ -392,11 +392,11 @@ final class Element { - //////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Construction of a ParseException when a string cannot be parsed //////// - //////// //////// - //////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Construction of a ParseException when a string cannot be parsed ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════╝ /** * Returns a {@link ParseException} with the specified cause. A localized string @@ -526,11 +526,11 @@ final class Element { - ////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Peek or pull elements from the tree //////// - //////// //////// - ////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Peek or pull elements from the tree ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════╝ /** * Returns the next value (not a child element) without removing it. diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/ServicesForMetadata.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/ServicesForMetadata.java index 9ff0ed9f21..aff08fc283 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/ServicesForMetadata.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/ServicesForMetadata.java @@ -93,11 +93,11 @@ public final class ServicesForMetadata extends ReferencingServices { - /////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// SERVICES FOR ISO 19115 METADATA //// - //// //// - /////////////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ SERVICES FOR ISO 19115 METADATA ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════════════════════════╝ /** * Implementation of the public {@code setBounds(…, DefaultGeographicBoundingBox, …)} methods for @@ -440,11 +440,11 @@ public final class ServicesForMetadata extends ReferencingServices { - /////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// OTHER REFERENCING SERVICES //// - //// //// - /////////////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ OTHER REFERENCING SERVICES ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════════════════════════╝ /** * Returns a fully implemented parameter descriptor. diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java index 971a46f18d..db533e8b01 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java @@ -273,11 +273,9 @@ public class CoordinateOperationFinder extends CoordinateOperationRegistry { final List<CoordinateOperation> authoritatives = super.createOperations(sourceCRS, targetCRS); if (!authoritatives.isEmpty()) return authoritatives; } - //////////////////////////////////////////////////////////////////////////////// - //// //// - //// Derived → any Single CRS //// - //// //// - //////////////////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────────────┐ + // │ Derived → any Single CRS │ + // └────────────────────────────────────────────────────────────────────────┘ if (sourceCRS instanceof DerivedCRS) { final var source = (DerivedCRS) sourceCRS; if (targetCRS instanceof DerivedCRS) { @@ -287,22 +285,18 @@ public class CoordinateOperationFinder extends CoordinateOperationRegistry { return createOperationStep(source, (SingleCRS) targetCRS); } } - //////////////////////////////////////////////////////////////////////////////// - //// //// - //// any Single CRS → Derived //// - //// //// - //////////////////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────────────┐ + // │ any Single CRS → Derived │ + // └────────────────────────────────────────────────────────────────────────┘ if (targetCRS instanceof DerivedCRS) { final var target = (DerivedCRS) targetCRS; if (sourceCRS instanceof SingleCRS) { return createOperationStep((SingleCRS) sourceCRS, target); } } - //////////////////////////////////////////////////////////////////////////////// - //// //// - //// Geodetic → Geocetric, Geographic or Projected //// - //// //// - //////////////////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────────────┐ + // │ Geodetic → Geocetric, Geographic or Projected │ + // └────────────────────────────────────────────────────────────────────────┘ if (sourceCRS instanceof GeodeticCRS) { final GeodeticCRS source = (GeodeticCRS) sourceCRS; if (targetCRS instanceof GeodeticCRS) { @@ -312,33 +306,27 @@ public class CoordinateOperationFinder extends CoordinateOperationRegistry { return createOperationStep(source, (VerticalCRS) targetCRS); } } - //////////////////////////////////////////////////////////////////////////////// - //// //// - //// Vertical → Vertical //// - //// //// - //////////////////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────────────┐ + // │ Vertical → Vertical │ + // └────────────────────────────────────────────────────────────────────────┘ if (sourceCRS instanceof VerticalCRS) { final VerticalCRS source = (VerticalCRS) sourceCRS; if (targetCRS instanceof VerticalCRS) { return createOperationStep(source, (VerticalCRS) targetCRS); } } - //////////////////////////////////////////////////////////////////////////////// - //// //// - //// Temporal → Temporal //// - //// //// - //////////////////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────────────┐ + // │ Temporal → Temporal │ + // └────────────────────────────────────────────────────────────────────────┘ if (sourceCRS instanceof TemporalCRS) { final TemporalCRS source = (TemporalCRS) sourceCRS; if (targetCRS instanceof TemporalCRS) { return createOperationStep(source, (TemporalCRS) targetCRS); } } - //////////////////////////////////////////////////////////////////////////////// - //// //// - //// Any single CRS ↔ CRS of the same type //// - //// //// - //////////////////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────────────┐ + // │ Any single CRS ↔ CRS of the same type │ + // └────────────────────────────────────────────────────────────────────────┘ if (sourceCRS instanceof SingleCRS && targetCRS instanceof SingleCRS) { final Optional<IdentifiedObject> datumOrEnsemble = PseudoDatum.getDatumOrEnsemble((SingleCRS) sourceCRS, @@ -356,11 +344,9 @@ public class CoordinateOperationFinder extends CoordinateOperationRegistry { throw new FactoryException(notFoundMessage(sourceCRS, targetCRS), e); } } - //////////////////////////////////////////////////////////////////////////////// - //// //// - //// Compound ↔ various CRS //// - //// //// - //////////////////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────────────┐ + // │ Compound ↔ various CRS │ + // └────────────────────────────────────────────────────────────────────────┘ if (sourceCRS instanceof CompoundCRS || targetCRS instanceof CompoundCRS) { return createOperationStep(sourceCRS, CRS.getSingleComponents(sourceCRS), targetCRS, CRS.getSingleComponents(targetCRS)); @@ -1040,13 +1026,11 @@ public class CoordinateOperationFinder extends CoordinateOperationRegistry { - ///////////////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////////////// - //////////// //////////// - //////////// M I S C E L L A N E O U S //////////// - //////////// //////////// - ///////////////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ M I S C E L L A N E O U S ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════╝ /** * Creates a coordinate operation from a matrix, which usually describes an affine transform. diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/MapProjection.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/MapProjection.java index b76d237aa5..d90b656e6e 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/MapProjection.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/MapProjection.java @@ -264,13 +264,13 @@ public abstract class MapProjection extends AbstractProvider { - ////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// HELPER METHODS FOR SUBCLASSES //////// - //////// //////// - //////// Following methods are defined for sharing the same GenericName or //////// - //////// Identifier instances when possible. //////// - ////////////////////////////////////////////////////////////////////////////////////////// + // ╔══════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ HELPER METHODS FOR SUBCLASSES ║ + // ║ ║ + // ║ Following methods are defined for sharing the same GenericName or ║ + // ║ Identifier instances when possible. ║ + // ╚══════════════════════════════════════════════════════════════════════════╝ /** * Returns the name of the given authority declared in the given parameter descriptor. diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java index 46fd3b62cf..d6ce33d92e 100644 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java @@ -656,11 +656,11 @@ public final class CoordinateOperationFinderTest extends MathTransformTestCase { - ////////////////////////////////////////////////////////////////////////////////// - //////////// //////////// - //////////// Tests that change the number of dimensions //////////// - //////////// //////////// - ////////////////////////////////////////////////////////////////////////////////// + // ╔══════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Tests that change the number of dimensions ║ + // ║ ║ + // ╚══════════════════════════════════════════════════════════╝ /** * Tests the conversion from a four-dimensional geographic CRS to a two-dimensional geographic CRS. diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NADCONTest.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NADCONTest.java index 3db9ad2e94..4bca18bd91 100644 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NADCONTest.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NADCONTest.java @@ -185,11 +185,11 @@ public final class NADCONTest extends DatumShiftTestCase { - ////////////////////////////////////////////////// - //////// //////// - //////// TEST FILE CREATION //////// - //////// //////// - ////////////////////////////////////////////////// + // ╔══════════════════════════════════╗ + // ║ ║ + // ║ TEST FILE CREATION ║ + // ║ ║ + // ╚══════════════════════════════════╝ /** * Writes a sub-grid of the given grid in pseudo-NADCON ASCII format. diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NTv2Test.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NTv2Test.java index fd50842359..280e8af723 100644 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NTv2Test.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/provider/NTv2Test.java @@ -252,11 +252,11 @@ public final class NTv2Test extends DatumShiftTestCase { - ////////////////////////////////////////////////// - //////// //////// - //////// TEST FILE CREATION //////// - //////// //////// - ////////////////////////////////////////////////// + // ╔══════════════════════════════════╗ + // ║ ║ + // ║ TEST FILE CREATION ║ + // ║ ║ + // ╚══════════════════════════════════╝ /** * Writes a sub-grid of the given grid in pseudo-NTv2 format. This method is used only for creating the test file. diff --git a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java index 1e7dbed31b..a5abf73b0d 100644 --- a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java +++ b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java @@ -536,12 +536,12 @@ final class ImageFileDirectory extends DataCube { Object addEntry(final short tag, final Type type, final long count) throws Exception { switch (tag) { - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Essential information for being able to read the image at least as grayscale. //// - //// In Java2D, following information are needed for building the SampleModel. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Essential information for being able to read the image at least as grayscale. ║ + // ║ In Java2D, following information are needed for building the SampleModel. ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════════════════════════════════╝ /* * How the components of each pixel are stored. @@ -644,12 +644,12 @@ final class ImageFileDirectory extends DataCube { break; } - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Information that defines how the sample values are organized (their layout). //// - //// In Java2D, following information are needed for building the SampleModel. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔═══════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Information that define how the sample values are organized (their layout). ║ + // ║ In Java2D, following information are needed for building the SampleModel. ║ + // ║ ║ + // ╚═══════════════════════════════════════════════════════════════════════════════════╝ /* * Compression scheme used on the image data. @@ -746,12 +746,12 @@ final class ImageFileDirectory extends DataCube { break; } - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Information related to the color palette or the meaning of sample values. //// - //// In Java2D, following information are needed for building the ColorModel. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Information related to the color palette or the meaning of sample values. ║ + // ║ In Java2D, following information are needed for building the ColorModel. ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════════════════════════════╝ /* * The color space of the image data. @@ -800,11 +800,11 @@ final class ImageFileDirectory extends DataCube { break; } - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Information useful for defining the image role in a multi-images context. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔═════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Information useful for defining the image role in a multi-images context. ║ + // ║ ║ + // ╚═════════════════════════════════════════════════════════════════════════════════╝ /* * A general indication of the kind of data contained in this subfile, mainly useful when there @@ -836,11 +836,11 @@ final class ImageFileDirectory extends DataCube { break; } - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Information related to the Coordinate Reference System and the bounding box. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Information related to the Coordinate Reference System and the bounding box. ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════════════════╝ /* * References the "GeoKeys" needed for building the Coordinate Reference System. @@ -928,13 +928,13 @@ final class ImageFileDirectory extends DataCube { break; } - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Metadata for discovery purposes, conditions of use, etc. //// - //// Those metadata are not "critical" information for reading the image. //// - //// Should not write anything under `metadata/contentInfo` node. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Metadata for discovery purposes, conditions of use, etc. ║ + // ║ Those metadata are not "critical" information for reading the image. ║ + // ║ Should not write anything under `metadata/contentInfo` node. ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════════╝ /* * The name of the document from which this image was scanned. @@ -1105,11 +1105,11 @@ final class ImageFileDirectory extends DataCube { break; } - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Defined by TIFF specification but currently ignored. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Defined by TIFF specification but currently ignored. ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════╝ /* * For each string of contiguous unused bytes in a TIFF file, the number of bytes and the byte offset @@ -1127,11 +1127,11 @@ final class ImageFileDirectory extends DataCube { break; } - //////////////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Extensions defined by DGIWG or GDAL. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════╗ + // ║ ║ + // ║ Extensions defined by DGIWG or GDAL. ║ + // ║ ║ + // ╚════════════════════════════════════════════╝ case Tags.GEO_METADATA: case Tags.GDAL_METADATA: { diff --git a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java index f3406fcb75..83f7e53fdf 100644 --- a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java +++ b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java @@ -492,11 +492,11 @@ public final class CRSBuilder extends ReferencingFactoryContainer { - ////////////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// GeoKeys parsing //////// - //////// //////// - ////////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ GeoKeys parsing ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════╝ /** * Decodes all the given GeoTIFF keys, then creates a coordinate reference system. @@ -588,11 +588,11 @@ public final class CRSBuilder extends ReferencingFactoryContainer { - ////////////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Geodetic components (datum, ellipsoid, etc.) //////// - //////// //////// - ////////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Geodetic components (datum, ellipsoid, etc.) ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════╝ /** * Returns a coordinate system (CS) with the same axis directions as the given CS but potentially different units. @@ -957,11 +957,11 @@ public final class CRSBuilder extends ReferencingFactoryContainer { - ////////////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Geodetic CRS (geographic and geocentric) //////// - //////// //////// - ////////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Geodetic CRS (geographic and geocentric) ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════╝ /** * Splits the {@link GeoKeys#GeodeticCitation} value into its prime meridian, ellipsoid, datum and CRS name components. @@ -1191,11 +1191,11 @@ public final class CRSBuilder extends ReferencingFactoryContainer { - ////////////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Projected CRS //////// - //////// //////// - ////////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Projected CRS ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════╝ /** * Map projection parameters to be considered as aliases. This table is used for reading GeoTIFF files @@ -1534,11 +1534,11 @@ public final class CRSBuilder extends ReferencingFactoryContainer { - ////////////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Vertical CRS //////// - //////// //////// - ////////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Vertical CRS ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════╝ /** * Creates a vertical datum. diff --git a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/GridGeometryBuilder.java b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/GridGeometryBuilder.java index 56e3e3835d..bb64c6df01 100644 --- a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/GridGeometryBuilder.java +++ b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/GridGeometryBuilder.java @@ -77,11 +77,11 @@ import org.apache.sis.math.Vector; */ public final class GridGeometryBuilder extends GeoKeysLoader { - //////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Information to be set by ImageFileDirectory during GeoTIFF file parsing. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Information to be set by ImageFileDirectory during GeoTIFF file parsing. ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════════════╝ /* * Fields inherited from `GeoKeysLoader`: @@ -157,11 +157,11 @@ public final class GridGeometryBuilder extends GeoKeysLoader { - //////////////////////////////////////////////////////////////////////////////////////// - //// //// - //// Information to be computed by GridGeometryBuilder based on above data. //// - //// //// - //////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Information to be computed by GridGeometryBuilder based on above data. ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════════════╝ /** * Suggested value for a general description of the transformation form grid coordinates to "real world" coordinates. diff --git a/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamReader.java b/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamReader.java index d2e2074805..7d0d73a745 100644 --- a/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamReader.java +++ b/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamReader.java @@ -188,11 +188,11 @@ public abstract class StaxStreamReader extends StaxStreamIO implements XMLStream - //////////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Convenience methods for subclass implementations //////// - //////// //////// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Convenience methods for subclass implementations ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════════════╝ /** * Returns a XML stream reader over only a portion of the document, from given position inclusive diff --git a/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamWriter.java b/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamWriter.java index 8b1f55a76e..b83bac8828 100644 --- a/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamWriter.java +++ b/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/StaxStreamWriter.java @@ -195,11 +195,11 @@ public abstract class StaxStreamWriter extends StaxStreamIO implements Consumer< - //////////////////////////////////////////////////////////////////////////////////////////////// - //////// //////// - //////// Convenience methods for subclass implementations //////// - //////// //////// - //////////////////////////////////////////////////////////////////////////////////////////////// + // ╔════════════════════════════════════════════════════════════════════════════════╗ + // ║ ║ + // ║ Convenience methods for subclass implementations ║ + // ║ ║ + // ╚════════════════════════════════════════════════════════════════════════════════╝ /** * Writes a new element with the given value and no attribute. diff --git a/endorsed/src/org.apache.sis.util/main/org/apache/sis/measure/AngleFormat.java b/endorsed/src/org.apache.sis.util/main/org/apache/sis/measure/AngleFormat.java index c0095e2ad5..db5addc021 100644 --- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/measure/AngleFormat.java +++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/measure/AngleFormat.java @@ -1471,13 +1471,14 @@ public class AngleFormat extends Format implements Localized { double minutes = NaN; double seconds = NaN; final int length = source.length(); + @SuppressWarnings("LocalVariableHidesMemberVariable") final NumberFormat numberFormat = numberFormat(); - /////////////////////////////////////////////////////////////////////////////// - // BLOCK A: Assign values to 'degrees', 'minutes' and 'seconds' variables. // - // This block does not take the hemisphere field in account, and // - // values will need adjustment if decimal separator is missing. // - // The { } block is for restricting the scope of local variables. // - /////////////////////////////////////////////////////////////////////////////// + // ┌─────────────────────────────────────────────────────────────────────────┐ + // │ BLOCK A: Assign values to `degrees`, `minutes` and `seconds` variables. │ + // │ This block does not take the hemisphere field in account, and │ + // │ values will need adjustment if decimal separator is missing. │ + // │ The { } block is for restricting the scope of local variables. │ + // └─────────────────────────────────────────────────────────────────────────┘ { /* * Extract the prefix, if any. If we find a degrees, minutes or seconds suffix @@ -1700,10 +1701,10 @@ BigBoss: switch (skipSuffix(source, pos, DEGREES_FIELD)) { } } } - //////////////////////////////////////////////////////////////////// - // BLOCK B: Handle the case when there is no decimal separator. // - // Then combine the fields into a decimal degrees value. // - //////////////////////////////////////////////////////////////////// + // ┌────────────────────────────────────────────────────────────────┐ + // │ BLOCK B: Handle the case when there is no decimal separator. │ + // │ Then combine the fields into a decimal degrees value. │ + // └────────────────────────────────────────────────────────────────┘ if (isNegative(minutes)) { seconds = -seconds; } @@ -1743,9 +1744,9 @@ BigBoss: switch (skipSuffix(source, pos, DEGREES_FIELD)) { if (minutesSuffix == null && secondsFieldWidth != 0 && isNaN(seconds)) { double facteur = pow10(secondsFieldWidth); if (degreesSuffix == null && minutesFieldWidth != 0 && isNaN(minutes)) { - /////////////////// - // DDDMMSS.s // - /////////////////// + // ┌───────────────┐ + // │ DDDMMSS.s │ + // └───────────────┘ seconds = degrees; minutes = truncate(degrees / facteur); seconds -= minutes * facteur; @@ -1753,17 +1754,17 @@ BigBoss: switch (skipSuffix(source, pos, DEGREES_FIELD)) { degrees = truncate(minutes / facteur); minutes -= degrees * facteur; } else { - //////////////////// - // DDD°MMSS.s // - //////////////////// + // ┌───────────────┐ + // │ DDD°MMSS.s │ + // └───────────────┘ seconds = minutes; minutes = truncate(minutes / facteur); seconds -= minutes*facteur; } } else if (degreesSuffix == null && minutesFieldWidth != 0 && isNaN(minutes)) { - ///////////////// - // DDDMM.m // - ///////////////// + // ┌─────────────┐ + // │ DDDMM.m │ + // └─────────────┘ final double facteur = pow10(minutesFieldWidth); minutes = degrees; degrees = truncate(degrees / facteur); @@ -1773,10 +1774,10 @@ BigBoss: switch (skipSuffix(source, pos, DEGREES_FIELD)) { if ( isNaN(degrees)) degrees = 0; if (!isNaN(minutes)) degrees += minutes / 60; if (!isNaN(seconds)) degrees += seconds / 3600; - ///////////////////////////////////////////////////////// - // BLOCK C: Check for hemisphere suffix (N, S, E or W) // - // after the angle string representation. // - ///////////////////////////////////////////////////////// + // ┌─────────────────────────────────────────────────────┐ + // │ BLOCK C: Check for hemisphere suffix (N, S, E or W) │ + // │ after the angle string representation. │ + // └─────────────────────────────────────────────────────┘ for (int index = pos.getIndex(); index < length;) { final int c = source.codePointAt(index); index += Character.charCount(c); diff --git a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/collection/RangeSet.java b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/collection/RangeSet.java index 08773a57c9..3cb37b7299 100644 --- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/collection/RangeSet.java +++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/collection/RangeSet.java @@ -1372,9 +1372,9 @@ public class RangeSet<E extends Comparable<? super E>> extends AbstractSet<Range } } - /////////////////////////////////////////////////////////////////////////////// - //// List-like API - not usual Set API, but provided for efficiency. //// - /////////////////////////////////////////////////////////////////////////////// + // ╔═══════════════════════════════════════════════════════════════════════╗ + // ║ List-like API - not usual Set API, but provided for efficiency. ║ + // ╚═══════════════════════════════════════════════════════════════════════╝ /** * If the specified value is inside a range, returns the index of this range.