You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2021/11/04 16:25:01 UTC
[sis] branch master updated (be181fa -> b94a500)
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sis.git.
from be181fa Reduce indentation from 4 to 2 spaces for consistency with the examples in the documentation. This is for cheking if it solves the problem of notifications sent to the wrong mailing list.
add c9abccd Fix `IndexOutOfBoundsException` which was thrown when `FeatureSet` has no geometry property. The fix is indirect, by making an `isEmpty` flag to become `true` when there is no geometry. This is an attempt to address the https://github.com/apache/sis/pull/22 pull request without discarding the whole feature (features without geometry should be legal).
add 9fe7fb4 Add a contributor name. His main work was an effort to provide derivative formulas in `ModifiedAzimuthalEquidistant`.
add 6dc2e2d Workaround for RasterFormatException. https://bugs.openjdk.java.net/browse/JDK-8275345
add eda4d10 Minor documentation fixes and bug fixes related to background value.
add ac3c44d Fix an integer overflow in call to `divisors(Integer.MAX_VALUE)`.
add b55b18c Verify that the `bounds` argument is non-empty. This verification avoid more confusing exception later.
add 17bf849 Better identification of case where the image shown in `MapCanvas` is in error (i.e. because an exception has been thrown during the rendering process).
add 0daa2b6 Reduce the amount of repaint events when resizing windows.
add 098b3bc Popup a dialog box if an error occurred while downloading optional resources.
add 38066bc Cherry-pick documentation improvement from pull request #24: doc(Core): improve SampleDimension apidoc regarding background value management.
add 8e1df6f Provide an extension mechanism for allowing users to provide their own solution for https://github.com/apache/sis/pull/24
add da6ade3 Move the provider of empty tiles in a location where it can be shared with other operations.
add 7a62166 Initial version of a "clip" or "mask" operation. Add mask and clip operations on grid coverages.
add 6fb53af Compute only the tiles that intersect the bounding box of the mask. It saves memory and computation when a tile does not intersect the clip.
add d5601f3 Merge the "clip" and "mask" methods in a single "mask" method with boolean argument.
add debfbf7 Give protected access to `execute(…)` methods in query subclasses. This change provides an extension point for more specialized queries.
add 3f35250 Minor tuning: - Remove unnecessary synchronization. - Forward loading strategy to wrapped resources. - Typos.
add 3246cf6 Add an optimization: - A AND NOT(A) = false - A OR NOT(A) = true
add 93542a4 Apply GDAL "sparse files" convention. It requires relaxing `TiledGridCoverage` tile types from `WritableRaster` to `Raster`.
add eae7522 Remove a background thread that does not seem to be necessary anymore.
add d517cda Load native metadata in a background thread separated from standard metadata. This allows loading those metadata only if the "native metadata" tab is selected.
add 26b4daa Provide an extension point in `DefaultTreeTable` for initializing the tree only when the root node is first requested.
add 23d2354 Provides a view of GeoTIFF native metadata (TIFF tags and GeoKeys).
add 08e148e Use separated nodes in native metadata for each TIFF image.
add 6cd70ce Fix an `IndexOutOfBoundsException`.
add 887a01a Allow to restrict the "best fit range" to floating point types. It makes a difference in the interpretation of next value after the maximum value.
add 0e4421b Fix a problem with `IndexColorModel` creation for 1-bit TIFF images.
add bbde15b Add a check against closed result sets.
add ef25f40 Add the possibility to listen to read or write operations.
add 59e1d2e Get synchronization lock from a `getSynchronizedLock()` method added in `AbstractResource`. It helps to avoid dead locks, by allowing subclasses to take a lock on the `DataStore`.
add 32175f2 Avoid seek operations on very short distances (less than 8 bytes).
add cd6d191 Add a "System monitor" view showing which region of files are read. We use it for monitoring behavior of GeoTIFF reader.
add 157bdb0 Add visual indications about seek operations.
add 5740d3f More robust parsing of `GDAL_NODATA` tag (may be an empty string).
add a47a93c Avoid blocking the event thread when asking for a label implies a calls to `Resource.getMetadata()`.
add b957357 Better recording of recently used file (ordered by file closed instead of file opened, remove from menu the opened files).
add aba6ddf GridCoverageResource API: - Add a `getResolutions()` method. - Add `throws DataStoreException` to `get|setLoadingStrategy(…)`.
add 381fe9d Replace `Visualization.create(…)` method by a builder. It simplifies some code and made easier to fix a bug related to mismatched tile layout in the `converters == null` optimization case.
add 5c8868f Fix an exception when rendering an image without "grid to CRS" conversion.
add b27dfd2 Reduce the number of background threads created for fetching resource labels.
add fed0a14 Fix `NullPointerException`, partially caused by changes in `MapCanvas` state when a rendering is in progress. We workaround this problem with a new `MapCanvas.runAfterRendering(Runnable)` method.
add e2f00c4 Do not interrupt threads that are blocked on I/O operations. This is necessary for avoiding to close InterruptibleChannel.
add 3f52106 Document better who is in charge of closing JDBC connections. Check if the connection is closed in methods that do not use the connection immediately.
add b6f984f Fix an ArrayIndexOutOfBoundsException when the mask width is less than 64 pixels.
add 5a19a70 Merge branch 'geoapi-4.0' into geoapi-3.1
new b94a500 Merge branch 'geoapi-3.1'
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../main/java/org/apache/sis/gui/DataViewer.java | 32 +-
.../main/java/org/apache/sis/gui/RecentFiles.java | 55 ++-
.../java/org/apache/sis/gui/SystemMonitor.java | 116 +++++
.../apache/sis/gui/coverage/CoverageCanvas.java | 34 +-
.../java/org/apache/sis/gui/coverage/GridView.java | 4 +-
.../org/apache/sis/gui/coverage/ImageRequest.java | 17 +-
.../org/apache/sis/gui/coverage/RenderingData.java | 13 +-
.../org/apache/sis/gui/coverage/package-info.java | 2 +-
.../org/apache/sis/gui/dataset/FeatureList.java | 4 +-
.../java/org/apache/sis/gui/dataset/LoadEvent.java | 31 +-
.../dataset/{LoadEvent.java => ResourceEvent.java} | 41 +-
.../apache/sis/gui/dataset/ResourceExplorer.java | 264 ++++++----
.../org/apache/sis/gui/dataset/ResourceTree.java | 529 ++++++++++++++-------
.../org/apache/sis/gui/dataset/package-info.java | 6 +-
.../java/org/apache/sis/gui/map/MapCanvas.java | 194 +++++++-
.../java/org/apache/sis/gui/map/MapCanvasAWT.java | 100 +++-
.../java/org/apache/sis/gui/map/package-info.java | 2 +-
.../sis/gui/metadata/IdentificationInfo.java | 2 +-
.../apache/sis/gui/metadata/MetadataSummary.java | 30 +-
.../org/apache/sis/gui/metadata/MetadataTree.java | 7 +-
.../org/apache/sis/gui/metadata/package-info.java | 2 +-
.../main/java/org/apache/sis/gui/package-info.java | 2 +-
.../gui/referencing/RecentReferenceSystems.java | 9 +-
.../apache/sis/internal/gui/BackgroundThreads.java | 18 +-
.../sis/internal/gui/FixedHeaderColumnSize.java | 89 ++++
.../org/apache/sis/internal/gui/GUIUtilities.java | 19 +-
.../sis/internal/gui/OptionalDataDownloader.java | 31 +-
.../org/apache/sis/internal/gui/PropertyView.java | 4 +-
.../apache/sis/internal/gui/ResourceLoader.java | 46 +-
.../org/apache/sis/internal/gui/Resources.java | 22 +-
.../apache/sis/internal/gui/Resources.properties | 6 +-
.../sis/internal/gui/Resources_fr.properties | 6 +-
.../java/org/apache/sis/internal/gui/Styles.java | 2 +-
.../apache/sis/internal/gui/io/FileAccessItem.java | 420 ++++++++++++++++
.../apache/sis/internal/gui/io/FileAccessView.java | 136 ++++++
.../apache/sis/internal/gui/io}/package-info.java | 6 +-
.../org/apache/sis/internal/gui/package-info.java | 2 +-
.../java/org/apache/sis/coverage/CategoryList.java | 4 +-
.../org/apache/sis/coverage/RegionOfInterest.java | 156 ++++++
.../org/apache/sis/coverage/SampleDimension.java | 86 +++-
.../coverage/grid/CoordinateOperationFinder.java | 2 +-
.../apache/sis/coverage/grid/GridCoverage2D.java | 67 ++-
.../sis/coverage/grid/GridCoverageProcessor.java | 58 ++-
.../apache/sis/coverage/grid/GridDerivation.java | 5 +-
.../apache/sis/filter/DefaultFilterFactory.java | 4 +-
.../java/org/apache/sis/filter/LogicalFilter.java | 15 +-
.../java/org/apache/sis/filter/package-info.java | 2 +-
.../java/org/apache/sis/image/ImageProcessor.java | 88 ++--
.../java/org/apache/sis/image/MaskedImage.java | 478 +++++++++++++++++++
.../java/org/apache/sis/image/PrefetchedImage.java | 87 +---
.../java/org/apache/sis/image/ResampledImage.java | 30 +-
.../org/apache/sis/image/SourceAlignedImage.java | 21 +-
.../java/org/apache/sis/image/Visualization.java | 420 ++++++++++------
.../java/org/apache/sis/image/package-info.java | 9 +-
.../internal/coverage/j2d/ColorModelFactory.java | 12 +-
.../sis/internal/coverage/j2d/Colorizer.java | 2 +-
.../sis/internal/coverage/j2d/FillValues.java | 188 ++++++++
.../sis/internal/coverage/j2d/ImageLayout.java | 46 +-
.../sis/internal/coverage/j2d/TilePlaceholder.java | 395 +++++++++++++++
.../sis/internal/coverage/j2d/package-info.java | 2 +-
.../org/apache/sis/coverage/CategoryListTest.java | 3 +-
.../org/apache/sis/filter/LogicalFilterTest.java | 9 +-
.../apache/sis/metadata/sql/CachedStatement.java | 4 +-
.../org/apache/sis/metadata/sql/package-info.java | 2 +-
core/sis-referencing/pom.xml | 11 +
.../factory/ConcurrentAuthorityFactory.java | 8 +-
.../referencing/factory/sql/AuthorityCodes.java | 28 +-
.../factory/sql/CloseableReference.java | 21 +-
.../referencing/factory/sql/EPSGCodeFinder.java | 2 +
.../referencing/factory/sql/EPSGDataAccess.java | 30 +-
.../sis/referencing/factory/sql/package-info.java | 2 +-
.../operation/projection/AzimuthalEquidistant.java | 1 +
.../projection/ModifiedAzimuthalEquidistant.java | 6 +
.../java/org/apache/sis/math/MathFunctions.java | 9 +-
.../java/org/apache/sis/math/package-info.java | 2 +-
.../java/org/apache/sis/measure/NumberRange.java | 61 ++-
.../java/org/apache/sis/measure/package-info.java | 2 +-
.../apache/sis/setup/OptionalInstallations.java | 17 +-
.../java/org/apache/sis/setup/package-info.java | 2 +-
.../main/java/org/apache/sis/util/ArraysExt.java | 2 +-
.../sis/util/collection/DefaultTreeTable.java | 20 +-
.../apache/sis/util/collection/package-info.java | 2 +-
.../java/org/apache/sis/util/resources/Errors.java | 5 +
.../apache/sis/util/resources/Errors.properties | 1 +
.../apache/sis/util/resources/Errors_fr.properties | 1 +
.../org/apache/sis/util/resources/Vocabulary.java | 5 +
.../sis/util/resources/Vocabulary.properties | 1 +
.../sis/util/resources/Vocabulary_fr.properties | 1 +
.../org/apache/sis/math/MathFunctionsTest.java | 6 +-
.../org/apache/sis/measure/NumberRangeTest.java | 4 +-
.../org/apache/sis/storage/landsat/BandGroup.java | 2 +-
.../apache/sis/internal/geotiff/Compression.java | 34 +-
.../sis/internal/geotiff/SchemaModifier.java | 4 +-
.../org/apache/sis/storage/geotiff/CRSBuilder.java | 208 +-------
.../sis/storage/geotiff/CompressedSubset.java | 8 +-
.../org/apache/sis/storage/geotiff/DataCube.java | 2 +-
.../org/apache/sis/storage/geotiff/DataSubset.java | 45 +-
.../apache/sis/storage/geotiff/GeoKeysLoader.java | 308 ++++++++++++
.../org/apache/sis/storage/geotiff/GeoTIFF.java | 1 +
.../apache/sis/storage/geotiff/GeoTiffStore.java | 44 +-
.../sis/storage/geotiff/GridGeometryBuilder.java | 22 +-
.../sis/storage/geotiff/ImageFileDirectory.java | 19 +-
.../apache/sis/storage/geotiff/NativeMetadata.java | 260 ++++++++++
.../org/apache/sis/storage/geotiff/Reader.java | 4 +-
.../java/org/apache/sis/storage/geotiff/Type.java | 84 +++-
.../apache/sis/storage/geotiff/package-info.java | 2 +-
.../sis/internal/netcdf/DiscreteSampling.java | 15 +-
.../org/apache/sis/internal/netcdf/FeatureSet.java | 12 +-
.../apache/sis/internal/netcdf/RasterResource.java | 13 +-
.../apache/sis/internal/netcdf/package-info.java | 2 +-
.../sis/internal/sql/feature/SchemaModifier.java | 4 +-
.../sis/internal/storage/AbstractFeatureSet.java | 2 +-
.../sis/internal/storage/AbstractResource.java | 29 +-
.../sis/internal/storage/AggregatedFeatureSet.java | 32 +-
.../sis/internal/storage/GridResourceWrapper.java | 34 +-
.../sis/internal/storage/TiledGridCoverage.java | 28 +-
.../sis/internal/storage/TiledGridResource.java | 26 +-
.../sis/internal/storage/io/ChannelDataInput.java | 15 +-
.../sis/internal/storage/io/ChannelFactory.java | 39 +-
.../sis/internal/storage/io/InternalOptionKey.java | 56 +++
.../sis/internal/storage/io/package-info.java | 2 +-
.../java/org/apache/sis/storage/CoverageQuery.java | 12 +-
.../org/apache/sis/storage/CoverageSubset.java | 20 +-
.../java/org/apache/sis/storage/FeatureQuery.java | 19 +-
.../java/org/apache/sis/storage/FeatureSet.java | 12 +-
.../apache/sis/storage/GridCoverageResource.java | 52 +-
.../org/apache/sis/storage/StorageConnector.java | 9 +-
.../java/org/apache/sis/storage/package-info.java | 2 +-
.../internal/storage/io/ChannelDataInputTest.java | 7 +-
.../internal/storage/io/ChannelDataOutputTest.java | 6 +-
.../internal/storage/io/ChannelDataTestCase.java | 15 +-
.../storage/io/ChannelImageOutputStreamTest.java | 4 +-
.../sis/test/storage/CoverageReadConsistency.java | 4 +-
133 files changed, 5018 insertions(+), 1248 deletions(-)
create mode 100644 application/sis-javafx/src/main/java/org/apache/sis/gui/SystemMonitor.java
copy application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/{LoadEvent.java => ResourceEvent.java} (53%)
create mode 100644 application/sis-javafx/src/main/java/org/apache/sis/internal/gui/FixedHeaderColumnSize.java
create mode 100644 application/sis-javafx/src/main/java/org/apache/sis/internal/gui/io/FileAccessItem.java
create mode 100644 application/sis-javafx/src/main/java/org/apache/sis/internal/gui/io/FileAccessView.java
copy {storage/sis-geotiff/src/main/java/org/apache/sis/internal/geotiff => application/sis-javafx/src/main/java/org/apache/sis/internal/gui/io}/package-info.java (87%)
create mode 100644 core/sis-feature/src/main/java/org/apache/sis/coverage/RegionOfInterest.java
create mode 100644 core/sis-feature/src/main/java/org/apache/sis/image/MaskedImage.java
create mode 100644 core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/FillValues.java
create mode 100644 core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/TilePlaceholder.java
create mode 100644 storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoKeysLoader.java
create mode 100644 storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/NativeMetadata.java
create mode 100644 storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/InternalOptionKey.java
[sis] 01/01: Merge branch 'geoapi-3.1'
Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sis.git
commit b94a500b295b52b9fbaf0bb8fdbf43c0ce4e7746
Merge: be181fa 5a19a70
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Thu Nov 4 17:24:40 2021 +0100
Merge branch 'geoapi-3.1'
.../main/java/org/apache/sis/gui/DataViewer.java | 32 +-
.../main/java/org/apache/sis/gui/RecentFiles.java | 55 ++-
.../java/org/apache/sis/gui/SystemMonitor.java | 116 +++++
.../apache/sis/gui/coverage/CoverageCanvas.java | 34 +-
.../java/org/apache/sis/gui/coverage/GridView.java | 4 +-
.../org/apache/sis/gui/coverage/ImageRequest.java | 17 +-
.../org/apache/sis/gui/coverage/RenderingData.java | 13 +-
.../org/apache/sis/gui/coverage/package-info.java | 2 +-
.../org/apache/sis/gui/dataset/FeatureList.java | 4 +-
.../java/org/apache/sis/gui/dataset/LoadEvent.java | 31 +-
.../dataset/{LoadEvent.java => ResourceEvent.java} | 41 +-
.../apache/sis/gui/dataset/ResourceExplorer.java | 264 ++++++----
.../org/apache/sis/gui/dataset/ResourceTree.java | 529 ++++++++++++++-------
.../org/apache/sis/gui/dataset/package-info.java | 6 +-
.../java/org/apache/sis/gui/map/MapCanvas.java | 194 +++++++-
.../java/org/apache/sis/gui/map/MapCanvasAWT.java | 100 +++-
.../java/org/apache/sis/gui/map/package-info.java | 2 +-
.../sis/gui/metadata/IdentificationInfo.java | 2 +-
.../apache/sis/gui/metadata/MetadataSummary.java | 30 +-
.../org/apache/sis/gui/metadata/MetadataTree.java | 7 +-
.../org/apache/sis/gui/metadata/package-info.java | 2 +-
.../main/java/org/apache/sis/gui/package-info.java | 2 +-
.../gui/referencing/RecentReferenceSystems.java | 9 +-
.../apache/sis/internal/gui/BackgroundThreads.java | 18 +-
.../sis/internal/gui/FixedHeaderColumnSize.java | 89 ++++
.../org/apache/sis/internal/gui/GUIUtilities.java | 19 +-
.../sis/internal/gui/OptionalDataDownloader.java | 31 +-
.../org/apache/sis/internal/gui/PropertyView.java | 4 +-
.../apache/sis/internal/gui/ResourceLoader.java | 46 +-
.../org/apache/sis/internal/gui/Resources.java | 22 +-
.../apache/sis/internal/gui/Resources.properties | 6 +-
.../sis/internal/gui/Resources_fr.properties | 6 +-
.../java/org/apache/sis/internal/gui/Styles.java | 2 +-
.../apache/sis/internal/gui/io/FileAccessItem.java | 420 ++++++++++++++++
.../apache/sis/internal/gui/io/FileAccessView.java | 136 ++++++
.../apache/sis/internal/gui}/io/package-info.java | 8 +-
.../org/apache/sis/internal/gui/package-info.java | 2 +-
.../java/org/apache/sis/coverage/CategoryList.java | 4 +-
.../org/apache/sis/coverage/RegionOfInterest.java | 156 ++++++
.../org/apache/sis/coverage/SampleDimension.java | 86 +++-
.../coverage/grid/CoordinateOperationFinder.java | 2 +-
.../apache/sis/coverage/grid/GridCoverage2D.java | 67 ++-
.../sis/coverage/grid/GridCoverageProcessor.java | 58 ++-
.../apache/sis/coverage/grid/GridDerivation.java | 5 +-
.../apache/sis/filter/DefaultFilterFactory.java | 4 +-
.../java/org/apache/sis/filter/LogicalFilter.java | 15 +-
.../java/org/apache/sis/filter/package-info.java | 2 +-
.../java/org/apache/sis/image/ImageProcessor.java | 88 ++--
.../java/org/apache/sis/image/MaskedImage.java | 478 +++++++++++++++++++
.../java/org/apache/sis/image/PrefetchedImage.java | 87 +---
.../java/org/apache/sis/image/ResampledImage.java | 30 +-
.../org/apache/sis/image/SourceAlignedImage.java | 21 +-
.../java/org/apache/sis/image/Visualization.java | 420 ++++++++++------
.../java/org/apache/sis/image/package-info.java | 9 +-
.../internal/coverage/j2d/ColorModelFactory.java | 12 +-
.../sis/internal/coverage/j2d/Colorizer.java | 2 +-
.../sis/internal/coverage/j2d/FillValues.java | 188 ++++++++
.../sis/internal/coverage/j2d/ImageLayout.java | 46 +-
.../sis/internal/coverage/j2d/TilePlaceholder.java | 395 +++++++++++++++
.../sis/internal/coverage/j2d/package-info.java | 2 +-
.../org/apache/sis/coverage/CategoryListTest.java | 3 +-
.../org/apache/sis/filter/LogicalFilterTest.java | 9 +-
.../apache/sis/metadata/sql/CachedStatement.java | 4 +-
.../org/apache/sis/metadata/sql/package-info.java | 2 +-
core/sis-referencing/pom.xml | 11 +
.../factory/ConcurrentAuthorityFactory.java | 8 +-
.../referencing/factory/sql/AuthorityCodes.java | 28 +-
.../factory/sql/CloseableReference.java | 21 +-
.../referencing/factory/sql/EPSGCodeFinder.java | 2 +
.../referencing/factory/sql/EPSGDataAccess.java | 30 +-
.../sis/referencing/factory/sql/package-info.java | 2 +-
.../operation/projection/AzimuthalEquidistant.java | 1 +
.../projection/ModifiedAzimuthalEquidistant.java | 6 +
.../java/org/apache/sis/math/MathFunctions.java | 9 +-
.../java/org/apache/sis/math/package-info.java | 2 +-
.../java/org/apache/sis/measure/NumberRange.java | 61 ++-
.../java/org/apache/sis/measure/package-info.java | 2 +-
.../apache/sis/setup/OptionalInstallations.java | 17 +-
.../java/org/apache/sis/setup/package-info.java | 2 +-
.../main/java/org/apache/sis/util/ArraysExt.java | 2 +-
.../sis/util/collection/DefaultTreeTable.java | 20 +-
.../apache/sis/util/collection/package-info.java | 2 +-
.../java/org/apache/sis/util/resources/Errors.java | 5 +
.../apache/sis/util/resources/Errors.properties | 1 +
.../apache/sis/util/resources/Errors_fr.properties | 1 +
.../org/apache/sis/util/resources/Vocabulary.java | 5 +
.../sis/util/resources/Vocabulary.properties | 1 +
.../sis/util/resources/Vocabulary_fr.properties | 1 +
.../org/apache/sis/math/MathFunctionsTest.java | 6 +-
.../org/apache/sis/measure/NumberRangeTest.java | 4 +-
.../org/apache/sis/storage/landsat/BandGroup.java | 2 +-
.../apache/sis/internal/geotiff/Compression.java | 34 +-
.../sis/internal/geotiff/SchemaModifier.java | 4 +-
.../org/apache/sis/storage/geotiff/CRSBuilder.java | 208 +-------
.../sis/storage/geotiff/CompressedSubset.java | 8 +-
.../org/apache/sis/storage/geotiff/DataCube.java | 2 +-
.../org/apache/sis/storage/geotiff/DataSubset.java | 45 +-
.../apache/sis/storage/geotiff/GeoKeysLoader.java | 308 ++++++++++++
.../org/apache/sis/storage/geotiff/GeoTIFF.java | 1 +
.../apache/sis/storage/geotiff/GeoTiffStore.java | 44 +-
.../sis/storage/geotiff/GridGeometryBuilder.java | 22 +-
.../sis/storage/geotiff/ImageFileDirectory.java | 19 +-
.../apache/sis/storage/geotiff/NativeMetadata.java | 260 ++++++++++
.../org/apache/sis/storage/geotiff/Reader.java | 4 +-
.../java/org/apache/sis/storage/geotiff/Type.java | 84 +++-
.../apache/sis/storage/geotiff/package-info.java | 2 +-
.../sis/internal/netcdf/DiscreteSampling.java | 15 +-
.../org/apache/sis/internal/netcdf/FeatureSet.java | 12 +-
.../apache/sis/internal/netcdf/RasterResource.java | 13 +-
.../apache/sis/internal/netcdf/package-info.java | 2 +-
.../sis/internal/sql/feature/SchemaModifier.java | 4 +-
.../sis/internal/storage/AbstractFeatureSet.java | 2 +-
.../sis/internal/storage/AbstractResource.java | 29 +-
.../sis/internal/storage/AggregatedFeatureSet.java | 32 +-
.../sis/internal/storage/GridResourceWrapper.java | 34 +-
.../sis/internal/storage/TiledGridCoverage.java | 28 +-
.../sis/internal/storage/TiledGridResource.java | 26 +-
.../sis/internal/storage/io/ChannelDataInput.java | 15 +-
.../sis/internal/storage/io/ChannelFactory.java | 39 +-
.../sis/internal/storage/io/InternalOptionKey.java | 56 +++
.../sis/internal/storage/io/package-info.java | 2 +-
.../java/org/apache/sis/storage/CoverageQuery.java | 12 +-
.../org/apache/sis/storage/CoverageSubset.java | 20 +-
.../java/org/apache/sis/storage/FeatureQuery.java | 19 +-
.../java/org/apache/sis/storage/FeatureSet.java | 12 +-
.../apache/sis/storage/GridCoverageResource.java | 52 +-
.../org/apache/sis/storage/StorageConnector.java | 9 +-
.../java/org/apache/sis/storage/package-info.java | 2 +-
.../internal/storage/io/ChannelDataInputTest.java | 7 +-
.../internal/storage/io/ChannelDataOutputTest.java | 6 +-
.../internal/storage/io/ChannelDataTestCase.java | 15 +-
.../storage/io/ChannelImageOutputStreamTest.java | 4 +-
.../sis/test/storage/CoverageReadConsistency.java | 4 +-
133 files changed, 5019 insertions(+), 1249 deletions(-)
diff --cc core/sis-feature/src/main/java/org/apache/sis/coverage/RegionOfInterest.java
index 0000000,fb82f68..45b0cdc
mode 000000,100644..100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/RegionOfInterest.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/RegionOfInterest.java
@@@ -1,0 -1,156 +1,156 @@@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ package org.apache.sis.coverage;
+
+ import java.awt.Shape;
+ import java.util.Objects;
+ import java.io.Serializable;
+ import org.opengis.util.FactoryException;
+ import org.opengis.referencing.datum.PixelInCell;
+ import org.opengis.referencing.crs.CoordinateReferenceSystem;
+ import org.opengis.referencing.operation.CoordinateOperation;
+ import org.opengis.referencing.operation.MathTransform;
+ import org.opengis.referencing.operation.MathTransform2D;
+ import org.opengis.referencing.operation.TransformException;
+ import org.apache.sis.referencing.operation.transform.MathTransforms;
+ import org.apache.sis.referencing.CRS;
+ import org.apache.sis.coverage.grid.GridGeometry;
+ import org.apache.sis.util.LenientComparable;
+ import org.apache.sis.util.ArgumentChecks;
+ import org.apache.sis.util.ComparisonMode;
+ import org.apache.sis.util.Utilities;
+
+
+ /**
+ * Region of interest (ROI) for an operation to apply on a coverage.
+ *
+ * <h2>Multi-threading</h2>
+ * Instances of {@code RegionOfInterest} are immutable and thread-safe.
+ *
+ * <h2>Limitations</h2>
+ * Current implementation supports two-dimensional regions only.
+ * This restriction will be relaxed progressively in future versions.
+ *
+ * <p>Current implementation defines ROI using a geometric shape only.
+ * Future versions may allow other ways such as mask rasters.</p>
+ *
+ * @author Martin Desruisseaux (Geomatys)
+ * @version 1.2
+ * @since 1.2
+ * @module
+ */
+ public class RegionOfInterest implements LenientComparable, Serializable {
+ /**
+ * For cross-version compatibility.
+ */
+ private static final long serialVersionUID = -8408578541189424074L;
+
+ /**
+ * The region of interest as a geometry. Coordinates are in the CRS given be {@link #crs}.
+ */
+ private final Shape geometry;
+
+ /**
+ * The coordinate reference system of the region of interest,
+ * In current version, it shall be a two-dimensional CRS.
+ * May be {@code null} if unknown.
+ */
+ private final CoordinateReferenceSystem crs;
+
+ /**
+ * Creates a new region of interest from a two-dimensional shape.
+ * If the given CRS is {@code null}, then it will be assumed the same
+ * CRS than the CRS of the coverage on which operations are applied.
+ *
+ * @param geometry the ROI as a geometry. Coordinates are in the CRS given by {@code crs}.
+ * @param crs coordinate reference system of the region of interest, or {@code null}.
+ */
+ public RegionOfInterest(final Shape geometry, final CoordinateReferenceSystem crs) {
+ ArgumentChecks.ensureNonNull("geometry", geometry);
+ ArgumentChecks.ensureDimensionMatches("crs", 2, crs);
+ this.geometry = geometry;
+ this.crs = crs;
+ }
+
+ /**
+ * Returns the clip geometry in coordinates of grid cells.
+ * The target space is specified by a {@code GridGeometry}.
+ *
+ * <h4>Limitations</h4>
+ * In current implementation, the grid geometry most be two-dimensional.
+ * This restriction will be relaxed progressively in future versions.
+ *
+ * @param target two-dimensional grid geometry of the target image.
+ * @return clip in pixel coordinates of given grid.
+ * @throws TransformException if ROI coordinates can not be transformed to grid coordinates.
+ */
+ public Shape toShape2D(final GridGeometry target) throws TransformException {
+ final MathTransform2D crsToGrid;
+ try {
+ MathTransform tr = target.getGridToCRS(PixelInCell.CELL_CENTER).inverse();
+ if (crs != null && target.isDefined(GridGeometry.CRS)) {
+ final CoordinateOperation op = CRS.findOperation(crs,
+ target.getCoordinateReferenceSystem(),
+ target.getGeographicExtent().orElse(null));
+ tr = MathTransforms.concatenate(op.getMathTransform(), tr);
+ }
+ crsToGrid = MathTransforms.bidimensional(tr);
+ } catch (IllegalArgumentException | FactoryException e) {
- throw new TransformException(e);
++ throw new TransformException(null, e);
+ }
+ return crsToGrid.createTransformedShape(geometry);
+ }
+
+ /**
+ * Compares this region of interest with the given object for equality.
+ *
+ * @param other the other object to compare with this ROI.
+ * @return whether the given object is equal to this ROI?
+ */
+ @Override
+ public final boolean equals(final Object other) {
+ return equals(other, ComparisonMode.STRICT);
+ }
+
+ /**
+ * Compares this region of interest with the given object for equality.
+ *
+ * @param other the other object to compare with this ROI.
+ * @param mode the comparison criterion.
+ * @return whether the given object is equal to this ROI?
+ */
+ @Override
+ public boolean equals(final Object other, final ComparisonMode mode) {
+ if (other instanceof ComparisonMode) {
+ final RegionOfInterest that = (RegionOfInterest) other;
+ if (mode != ComparisonMode.STRICT || other.getClass() == getClass()) {
+ return geometry.equals(that.geometry) && Utilities.deepEquals(crs, that.crs, mode);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns a hash code value for this region of interest.
+ *
+ * @return a hash code for this ROI.
+ */
+ @Override
+ public int hashCode() {
+ return geometry.hashCode() + Objects.hashCode(crs);
+ }
+ }
diff --cc core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
index d5cb0ad,ce4e432..905fcbb
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
@@@ -69,8 -69,18 +69,15 @@@ import org.apache.sis.util.Debug
* but organized in a different way. The use of the same name may seem a risk, but those two types are typically
* not used at the same time.
*
+ * <h2>Definition of missing data</h2>
+ * An important aspect of sample dimensions is the {@linkplain #getBackground() background value}.
+ * It defines how to initialize an empty image or canvas with respect to the sample definition.
+ * It can be thought as the value for "lack of data" (fill value, no-data, missing value) category
+ * when the missing value can not be categorized more precisely (cloud, instrument error, <i>etc</i>).
+ *
* @author Martin Desruisseaux (IRD, Geomatys)
+ * @author Alexis Manin (Geomatys)
* @version 1.1
- *
- * @see org.opengis.metadata.content.SampleDimension
- *
* @since 1.0
* @module
*/
diff --cc core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
index 33da97c,b9b495a..feffd85
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
@@@ -137,7 -130,7 +137,7 @@@ public abstract class DefaultFilterFact
*
* @todo The type of temporal object is not yet determined.
*/
- public static synchronized DefaultFilterFactory<AbstractFeature, Object, Object> forFeatures() {
- public static FilterFactory<Feature, Object, Object> forFeatures() {
++ public static DefaultFilterFactory<AbstractFeature, Object, Object> forFeatures() {
return Features.DEFAULT;
}
diff --cc core/sis-feature/src/main/java/org/apache/sis/filter/LogicalFilter.java
index ac06b26,552e311..3c259e9
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/LogicalFilter.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/LogicalFilter.java
@@@ -36,9 -37,9 +36,9 @@@ import org.apache.sis.internal.geoapi.f
*
* @author Johann Sorel (Geomatys)
* @author Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.2
*
- * @param <R> the type of resources (e.g. {@link org.opengis.feature.Feature}) used as inputs.
+ * @param <R> the type of resources (e.g. {@code Feature}) used as inputs.
*
* @since 1.1
* @module
diff --cc core/sis-feature/src/test/java/org/apache/sis/filter/LogicalFilterTest.java
index 8cf0dd4,a600504..0f8394f
--- a/core/sis-feature/src/test/java/org/apache/sis/filter/LogicalFilterTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/filter/LogicalFilterTest.java
@@@ -178,10 -182,13 +178,13 @@@ public final strictfp class LogicalFilt
*/
@Test
public void testOptimization() {
- final Filter<AbstractFeature> f1 = factory.isNull(factory.literal("text"));
- final Filter<AbstractFeature> f2 = factory.isNull(factory.literal(null));
- final Filter<Feature> f1 = factory.isNull(factory.literal("text")); // False
- final Filter<Feature> f2 = factory.isNull(factory.literal(null)); // True
- final Filter<Feature> f3 = factory.isNull(factory.property("*")); // Indeterminate
++ final Filter<AbstractFeature> f1 = factory.isNull(factory.literal("text")); // False
++ final Filter<AbstractFeature> f2 = factory.isNull(factory.literal(null)); // True
++ final Filter<AbstractFeature> f3 = factory.isNull(factory.property("*")); // Indeterminate
optimize(factory.and(f1, f2), Filter.exclude());
optimize(factory.or (f1, f2), Filter.include());
+ optimize(factory.and(f3, factory.not(f3)), Filter.exclude());
+ optimize(factory.or (f3, factory.not(f3)), Filter.include());
}
/**
diff --cc storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridCoverage.java
index 917c37b,b5ffb7b..efc1848
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridCoverage.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridCoverage.java
@@@ -25,7 -25,8 +25,7 @@@ import java.awt.image.ColorModel
import java.awt.image.SampleModel;
import java.awt.image.MultiPixelPackedSampleModel;
import java.awt.image.RenderedImage;
- import java.awt.image.WritableRaster;
+ import java.awt.image.Raster;
-import org.opengis.coverage.CannotEvaluateException;
import org.opengis.geometry.MismatchedDimensionException;
import org.apache.sis.coverage.grid.GridCoverage;
import org.apache.sis.coverage.grid.GridExtent;
diff --cc storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridResource.java
index 4f9a4d6,ff37952..d0dcbc4
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridResource.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridResource.java
@@@ -23,9 -23,10 +23,9 @@@ import java.awt.image.ColorModel
import java.awt.image.SampleModel;
import java.awt.image.BandedSampleModel;
import java.awt.image.ComponentSampleModel;
+ import java.awt.image.Raster;
import java.awt.image.RenderedImage;
- import java.awt.image.WritableRaster;
import java.awt.image.RasterFormatException;
-import org.opengis.coverage.CannotEvaluateException;
import org.apache.sis.coverage.SampleDimension;
import org.apache.sis.coverage.grid.GridCoverage;
import org.apache.sis.coverage.grid.GridCoverage2D;
@@@ -33,8 -34,6 +33,7 @@@ import org.apache.sis.coverage.grid.Gri
import org.apache.sis.coverage.grid.GridExtent;
import org.apache.sis.coverage.grid.GridGeometry;
import org.apache.sis.coverage.grid.GridRoundingMode;
+import org.apache.sis.coverage.CannotEvaluateException;
- import org.apache.sis.storage.DataStore;
import org.apache.sis.storage.DataStoreException;
import org.apache.sis.storage.RasterLoadingStrategy;
import org.apache.sis.storage.event.StoreListeners;