(sis) branch main updated (54a8cfd70f -> 0665f030cd)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/sis.git from 54a8cfd70f Merge branch 'geoapi-3.1'. This is only about imports order. add 2be4a304df Change the program managing import order: - Put test dependencies in a separated section. - Do not put anymore "import static" in separated section, because it is a source of confusion with other sections. add 210f3ff99c fix(Shapefile): fix integer overflow on large dbf files add 6b91e57ba7 `PropertyValue.getXPath()` shall reformat the property name to XPath using "Q{namespace}" syntax when necessary. Conversely, `FeatureQuery` needs to convert XPath to property name. add 48e238f9ba Make a GeoTIFF writer test tolerance to the case where the EPSG database is absent. Better error messages. add 54a78ecf62 fix(Shapefile): replace skipBytes by seek, more efficient and avoids a loop add 57c14cd312 fix(Shapefile): fix combining multiple subset add e0588cac36 Minor cleaning (documentation, removal of a deprecated method). add c25766bdff Move `getEnvelope()` default implementation from `AbstractGridCoverageResource` class to `GridCoverageResource` interface. add ca8241da59 Add a `GridGeometry` constructor doing the concatenation of two grid geometries. Opportunistic migration of JUnit 4 to JUnit 5 for the relevant tests. add 8ba711cc91 Add a `GridCoverageProcessor.appendDimension(…)` method. add e4515b0eb1 Better anticipation of methods and constants to be available in future Java versions. add 242b57a25f Add convenience method for adding a vertical and temporal dimensions to a grid coverage. add 2b6989782e Add in `CoverageAggregator` the same convenience methods than the ones added in `GridCoverageProcessor` in previous commit. The intend is to make easier to append a vertical or temporal dimension to two-dimensional coverages to aggregate in a cube. add 7b9bdae224 In `appendDimension(...)` methods; restrict the CRS type to SingleCRS since it must be one-dimensional. add d747d8924b feat(Shapefile): implement ResourceOnFileSystem add f97dcee389 Miscellaneous utilities: - CommonCRS.Temporal.TROPICAL_YEAR - QuantityFormat.parseNumber(…) - IOUtilities.toBuffered(Reader) add e92eacbe6d Fix a ClassCastException when no resource is using deferred loading. add 6d1043d683 When opening files in a folder, inherit the options specified in the parent `StorageConnector`. add 2ef86ebf35 Move the `buildSrc` source code to its traditional location. The "Module Source Hierarchy" has no effect for this sub-project since it contains a single module. The intend is to make easier to add conventions in the way described by Gradle documentation. add af3440719f Create a "sis.library-conventions" with some common configuration for Gradle build. add e55d695764 Merge branch 'geoapi-4.0' into geoapi-3.1 new 0665f030cd 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: buildSrc/build.gradle.kts | 24 +- .../org/apache/sis/buildtools/book/Assembler.java | 0 .../apache/sis/buildtools/book/BookException.java | 0 .../org/apache/sis/buildtools/book/Characters.java | 0 .../apache/sis/buildtools/book/CodeColorizer.java | 0 .../apache/sis/buildtools/book/package-info.java | 0 .../sis/buildtools/coding/ReorganizeImports.java | 78 +++ .../buildtools/coding/VerifyVersionInJavadoc.java | 0 .../apache/sis/buildtools/coding/package-info.java | 0 .../org/apache/sis/buildtools/doclet/Doclet.java | 0 .../org/apache/sis/buildtools/doclet/Include.java | 0 .../org/apache/sis/buildtools/doclet/Rewriter.java | 0 .../org/apache/sis/buildtools/doclet/Taglet.java | 0 .../apache/sis/buildtools/doclet/package-info.java | 0 .../apache/sis/buildtools/gradle/Assembler.java| 0 .../apache/sis/buildtools/gradle/BuildHelper.java | 0 .../apache/sis/buildtools/gradle/Conventions.java | 0 .../apache/sis/buildtools/gradle/Dependency.java | 0 .../apache/sis/buildtools/gradle/JavaMaker.java| 0 .../sis/buildtools/gradle/ModularCompilation.java | 0 .../apache/sis/buildtools/gradle/ModularJAR.java | 0 .../sis/buildtools/gradle/ModularJavadoc.java | 0 .../sis/buildtools/gradle/ModularPublishing.java | 0 .../sis/buildtools/gradle/ModularSources.java | 0 .../apache/sis/buildtools/gradle/ModularTest.java | 0 .../sis/buildtools/gradle/SISBuildException.java | 0 .../org/apache/sis/buildtools/gradle/UnoPkg.java | 0 .../apache/sis/buildtools/gradle/ZipWriter.java| 0 .../apache/sis/buildtools/gradle/package-info.java
(sis) 01/01: Merge branch 'geoapi-3.1'
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/sis.git commit 0665f030cdcc6f5b2bb0625ea9fc922b27ddbf02 Merge: 54a8cfd70f e55d695764 Author: Martin Desruisseaux AuthorDate: Mon Nov 27 19:17:10 2023 +0100 Merge branch 'geoapi-3.1' buildSrc/build.gradle.kts | 24 +- .../org/apache/sis/buildtools/book/Assembler.java | 0 .../apache/sis/buildtools/book/BookException.java | 0 .../org/apache/sis/buildtools/book/Characters.java | 0 .../apache/sis/buildtools/book/CodeColorizer.java | 0 .../apache/sis/buildtools/book/package-info.java | 0 .../sis/buildtools/coding/ReorganizeImports.java | 78 +++ .../buildtools/coding/VerifyVersionInJavadoc.java | 0 .../apache/sis/buildtools/coding/package-info.java | 0 .../org/apache/sis/buildtools/doclet/Doclet.java | 0 .../org/apache/sis/buildtools/doclet/Include.java | 0 .../org/apache/sis/buildtools/doclet/Rewriter.java | 0 .../org/apache/sis/buildtools/doclet/Taglet.java | 0 .../apache/sis/buildtools/doclet/package-info.java | 0 .../apache/sis/buildtools/gradle/Assembler.java| 0 .../apache/sis/buildtools/gradle/BuildHelper.java | 0 .../apache/sis/buildtools/gradle/Conventions.java | 0 .../apache/sis/buildtools/gradle/Dependency.java | 0 .../apache/sis/buildtools/gradle/JavaMaker.java| 0 .../sis/buildtools/gradle/ModularCompilation.java | 0 .../apache/sis/buildtools/gradle/ModularJAR.java | 0 .../sis/buildtools/gradle/ModularJavadoc.java | 0 .../sis/buildtools/gradle/ModularPublishing.java | 0 .../sis/buildtools/gradle/ModularSources.java | 0 .../apache/sis/buildtools/gradle/ModularTest.java | 0 .../sis/buildtools/gradle/SISBuildException.java | 0 .../org/apache/sis/buildtools/gradle/UnoPkg.java | 0 .../apache/sis/buildtools/gradle/ZipWriter.java| 0 .../apache/sis/buildtools/gradle/package-info.java | 0 .../org/apache/sis/buildtools/maven/Element.java | 0 .../org/apache/sis/buildtools/maven/Generator.java | 0 .../apache/sis/buildtools/maven/package-info.java | 0 .../sis/buildtools/maven/workaround/Argument.java | 0 .../maven/workaround/ProxyGenerator.java | 0 .../buildtools/maven/workaround/package-info.java | 0 .../resources/IndexedResourceCompiler.java | 0 .../sis/buildtools/resources/package-info.java | 0 .../main/kotlin/sis.library-conventions.gradle.kts | 68 ++ .../org/apache/sis/buildtools/book/GEOAPI.lst | 0 .../org/apache/sis/buildtools/book/OGC.lst | 0 .../org/apache/sis/buildtools/book/SIS.lst | 0 .../org/apache/sis/buildtools/book/XML_PREFIX.lst | 0 .../resources/IndexedResourceCompilerTest.java | 0 endorsed/build.gradle.kts | 27 +-- .../main/org/apache/sis/console/package-info.java | 2 +- .../sis/coverage/grid/DimensionAppender.java | 186 .../sis/coverage/grid/DimensionalityReduction.java | 15 +- .../sis/coverage/grid/GridCoverageProcessor.java | 85 +++ .../org/apache/sis/coverage/grid/GridExtent.java | 69 +- .../org/apache/sis/coverage/grid/GridGeometry.java | 63 +- .../sis/coverage/grid/j2d/SampleModelFactory.java | 4 +- .../org/apache/sis/feature/internal/Resources.java | 10 + .../sis/feature/internal/Resources.properties | 2 + .../sis/feature/internal/Resources_fr.properties | 2 + .../org/apache/sis/filter/AssociationValue.java| 7 +- .../org/apache/sis/filter/ComparisonFilter.java| 2 +- .../main/org/apache/sis/filter/PropertyValue.java | 18 +- .../apache/sis/filter/internal/FunctionNames.java | 2 +- .../main/org/apache/sis/filter/internal/XPath.java | 74 +-- .../main/org/apache/sis/filter/sqlmm/Registry.java | 4 +- .../apache/sis/geometry/wrapper/j2d/Polyline.java | 4 +- .../main/org/apache/sis/image/MaskedImage.java | 2 +- .../main/org/apache/sis/image/PixelIterator.java | 2 +- .../main/org/apache/sis/image/PlanarImage.java | 6 +- .../apache/sis/image/processing/TiledProcess.java | 6 +- .../sis/coverage/grid/DimensionAppenderTest.java | 131 +++ .../coverage/grid/DimensionalityReductionTest.java | 4 +- .../apache/sis/coverage/grid/GridExtentTest.java | 115 +- .../apache/sis/coverage/grid/GridGeometryTest.java | 140 +++- .../test/org/apache/sis/filter/XPathTest.java | 20 ++ .../test/org/apache/sis/image/TiledImageMock.java | 6 +- .../gazetteer/GeohashReferenceSystem.java | 6 +- .../main/org/apache/sis/referencing/CommonCRS.java | 68 -- .../org/apache/sis/referencing/package-info.java | 2 +- .../org/apache/sis/referencing/util/Formulas.java | 2 +- .../org/apache/sis/referencing/CommonCRSTest.java | 1 + .../apache/sis/storage/landsat/LandsatStore.java | 2 +-
(sis) 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git commit e55d695764715ef39ff8f89b04eeea21d4060464 Merge: bc9edad990 af3440719f Author: Martin Desruisseaux AuthorDate: Mon Nov 27 18:54:19 2023 +0100 Merge branch 'geoapi-4.0' into geoapi-3.1 buildSrc/build.gradle.kts | 24 +- .../org/apache/sis/buildtools/book/Assembler.java | 0 .../apache/sis/buildtools/book/BookException.java | 0 .../org/apache/sis/buildtools/book/Characters.java | 0 .../apache/sis/buildtools/book/CodeColorizer.java | 0 .../apache/sis/buildtools/book/package-info.java | 0 .../sis/buildtools/coding/ReorganizeImports.java | 78 +++ .../buildtools/coding/VerifyVersionInJavadoc.java | 0 .../apache/sis/buildtools/coding/package-info.java | 0 .../org/apache/sis/buildtools/doclet/Doclet.java | 0 .../org/apache/sis/buildtools/doclet/Include.java | 0 .../org/apache/sis/buildtools/doclet/Rewriter.java | 0 .../org/apache/sis/buildtools/doclet/Taglet.java | 0 .../apache/sis/buildtools/doclet/package-info.java | 0 .../apache/sis/buildtools/gradle/Assembler.java| 0 .../apache/sis/buildtools/gradle/BuildHelper.java | 0 .../apache/sis/buildtools/gradle/Conventions.java | 0 .../apache/sis/buildtools/gradle/Dependency.java | 0 .../apache/sis/buildtools/gradle/JavaMaker.java| 0 .../sis/buildtools/gradle/ModularCompilation.java | 0 .../apache/sis/buildtools/gradle/ModularJAR.java | 0 .../sis/buildtools/gradle/ModularJavadoc.java | 0 .../sis/buildtools/gradle/ModularPublishing.java | 0 .../sis/buildtools/gradle/ModularSources.java | 0 .../apache/sis/buildtools/gradle/ModularTest.java | 0 .../sis/buildtools/gradle/SISBuildException.java | 0 .../org/apache/sis/buildtools/gradle/UnoPkg.java | 0 .../apache/sis/buildtools/gradle/ZipWriter.java| 0 .../apache/sis/buildtools/gradle/package-info.java | 0 .../org/apache/sis/buildtools/maven/Element.java | 0 .../org/apache/sis/buildtools/maven/Generator.java | 0 .../apache/sis/buildtools/maven/package-info.java | 0 .../sis/buildtools/maven/workaround/Argument.java | 0 .../maven/workaround/ProxyGenerator.java | 0 .../buildtools/maven/workaround/package-info.java | 0 .../resources/IndexedResourceCompiler.java | 0 .../sis/buildtools/resources/package-info.java | 0 .../main/kotlin/sis.library-conventions.gradle.kts | 68 ++ .../org/apache/sis/buildtools/book/GEOAPI.lst | 0 .../org/apache/sis/buildtools/book/OGC.lst | 0 .../org/apache/sis/buildtools/book/SIS.lst | 0 .../org/apache/sis/buildtools/book/XML_PREFIX.lst | 0 .../resources/IndexedResourceCompilerTest.java | 0 endorsed/build.gradle.kts | 27 +-- .../main/org/apache/sis/console/package-info.java | 2 +- .../sis/coverage/grid/DimensionAppender.java | 184 .../sis/coverage/grid/DimensionalityReduction.java | 15 +- .../sis/coverage/grid/GridCoverageProcessor.java | 87 +++- .../org/apache/sis/coverage/grid/GridExtent.java | 69 +- .../org/apache/sis/coverage/grid/GridGeometry.java | 63 +- .../sis/coverage/grid/j2d/SampleModelFactory.java | 4 +- .../org/apache/sis/feature/internal/Resources.java | 10 + .../sis/feature/internal/Resources.properties | 2 + .../sis/feature/internal/Resources_fr.properties | 2 + .../org/apache/sis/filter/AssociationValue.java| 7 +- .../org/apache/sis/filter/ComparisonFilter.java| 2 +- .../main/org/apache/sis/filter/PropertyValue.java | 18 +- .../apache/sis/filter/internal/FunctionNames.java | 2 +- .../main/org/apache/sis/filter/internal/XPath.java | 74 +-- .../main/org/apache/sis/filter/sqlmm/Registry.java | 4 +- .../apache/sis/geometry/wrapper/j2d/Polyline.java | 4 +- .../main/org/apache/sis/image/MaskedImage.java | 2 +- .../main/org/apache/sis/image/PixelIterator.java | 2 +- .../main/org/apache/sis/image/PlanarImage.java | 6 +- .../apache/sis/image/processing/TiledProcess.java | 6 +- .../sis/coverage/grid/DimensionAppenderTest.java | 131 +++ .../coverage/grid/DimensionalityReductionTest.java | 4 +- .../apache/sis/coverage/grid/GridExtentTest.java | 115 +- .../apache/sis/coverage/grid/GridGeometryTest.java | 140 +++- .../test/org/apache/sis/filter/XPathTest.java | 20 ++ .../test/org/apache/sis/image/TiledImageMock.java | 6 +- .../gazetteer/GeohashReferenceSystem.java | 6 +- .../main/org/apache/sis/referencing/CommonCRS.java | 68 -- .../factory/CommonAuthorityFactory.java| 4 +- .../org/apache/sis/referencing/package-info.java | 2 +- .../org/apache/sis/referencing/util/Formulas.java | 2 +-
(sis) branch geoapi-3.1 updated (bc9edad990 -> e55d695764)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git from bc9edad990 Merge branch 'geoapi-4.0' into geoapi-3.1. This merge is only about imports order. add 2be4a304df Change the program managing import order: - Put test dependencies in a separated section. - Do not put anymore "import static" in separated section, because it is a source of confusion with other sections. add 210f3ff99c fix(Shapefile): fix integer overflow on large dbf files add 6b91e57ba7 `PropertyValue.getXPath()` shall reformat the property name to XPath using "Q{namespace}" syntax when necessary. Conversely, `FeatureQuery` needs to convert XPath to property name. add 48e238f9ba Make a GeoTIFF writer test tolerance to the case where the EPSG database is absent. Better error messages. add 54a78ecf62 fix(Shapefile): replace skipBytes by seek, more efficient and avoids a loop add 57c14cd312 fix(Shapefile): fix combining multiple subset add e0588cac36 Minor cleaning (documentation, removal of a deprecated method). add c25766bdff Move `getEnvelope()` default implementation from `AbstractGridCoverageResource` class to `GridCoverageResource` interface. add ca8241da59 Add a `GridGeometry` constructor doing the concatenation of two grid geometries. Opportunistic migration of JUnit 4 to JUnit 5 for the relevant tests. add 8ba711cc91 Add a `GridCoverageProcessor.appendDimension(…)` method. add e4515b0eb1 Better anticipation of methods and constants to be available in future Java versions. add 242b57a25f Add convenience method for adding a vertical and temporal dimensions to a grid coverage. add 2b6989782e Add in `CoverageAggregator` the same convenience methods than the ones added in `GridCoverageProcessor` in previous commit. The intend is to make easier to append a vertical or temporal dimension to two-dimensional coverages to aggregate in a cube. add 7b9bdae224 In `appendDimension(...)` methods; restrict the CRS type to SingleCRS since it must be one-dimensional. add d747d8924b feat(Shapefile): implement ResourceOnFileSystem add f97dcee389 Miscellaneous utilities: - CommonCRS.Temporal.TROPICAL_YEAR - QuantityFormat.parseNumber(…) - IOUtilities.toBuffered(Reader) add e92eacbe6d Fix a ClassCastException when no resource is using deferred loading. add 6d1043d683 When opening files in a folder, inherit the options specified in the parent `StorageConnector`. add 2ef86ebf35 Move the `buildSrc` source code to its traditional location. The "Module Source Hierarchy" has no effect for this sub-project since it contains a single module. The intend is to make easier to add conventions in the way described by Gradle documentation. add af3440719f Create a "sis.library-conventions" with some common configuration for Gradle build. new e55d695764 Merge branch 'geoapi-4.0' into 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: buildSrc/build.gradle.kts | 24 +- .../org/apache/sis/buildtools/book/Assembler.java | 0 .../apache/sis/buildtools/book/BookException.java | 0 .../org/apache/sis/buildtools/book/Characters.java | 0 .../apache/sis/buildtools/book/CodeColorizer.java | 0 .../apache/sis/buildtools/book/package-info.java | 0 .../sis/buildtools/coding/ReorganizeImports.java | 78 +++ .../buildtools/coding/VerifyVersionInJavadoc.java | 0 .../apache/sis/buildtools/coding/package-info.java | 0 .../org/apache/sis/buildtools/doclet/Doclet.java | 0 .../org/apache/sis/buildtools/doclet/Include.java | 0 .../org/apache/sis/buildtools/doclet/Rewriter.java | 0 .../org/apache/sis/buildtools/doclet/Taglet.java | 0 .../apache/sis/buildtools/doclet/package-info.java | 0 .../apache/sis/buildtools/gradle/Assembler.java| 0 .../apache/sis/buildtools/gradle/BuildHelper.java | 0 .../apache/sis/buildtools/gradle/Conventions.java | 0 .../apache/sis/buildtools/gradle/Dependency.java | 0 .../apache/sis/buildtools/gradle/JavaMaker.java| 0 .../sis/buildtools/gradle/ModularCompilation.java | 0 .../apache/sis/buildtools/gradle/ModularJAR.java | 0 .../sis/buildtools/gradle/ModularJavadoc.java | 0 .../sis/buildtools/gradle/ModularPublishing.java | 0 .../sis/buildtools/gradle/ModularSources.java | 0 .../apache/sis/buildtools/gradle/ModularTest.java | 0 .../sis/buildtools/gradle/SISBuildException.java | 0 .../org/apache/sis/buildtools/gradle/UnoPkg.java | 0 .../apache/sis/buildtools/gradle/ZipWriter.java| 0 .../apache/sis/buildtools/gradle/package-info.java | 0
(sis) branch geoapi-4.0 updated (6d1043d683 -> af3440719f)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git from 6d1043d683 When opening files in a folder, inherit the options specified in the parent `StorageConnector`. new 2ef86ebf35 Move the `buildSrc` source code to its traditional location. The "Module Source Hierarchy" has no effect for this sub-project since it contains a single module. The intend is to make easier to add conventions in the way described by Gradle documentation. new af3440719f Create a "sis.library-conventions" with some common configuration for Gradle build. The 2 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: buildSrc/build.gradle.kts | 24 +--- .../org/apache/sis/buildtools/book/Assembler.java | 0 .../apache/sis/buildtools/book/BookException.java | 0 .../org/apache/sis/buildtools/book/Characters.java | 0 .../apache/sis/buildtools/book/CodeColorizer.java | 0 .../apache/sis/buildtools/book/package-info.java | 0 .../sis/buildtools/coding/ReorganizeImports.java | 0 .../buildtools/coding/VerifyVersionInJavadoc.java | 0 .../apache/sis/buildtools/coding/package-info.java | 0 .../org/apache/sis/buildtools/doclet/Doclet.java | 0 .../org/apache/sis/buildtools/doclet/Include.java | 0 .../org/apache/sis/buildtools/doclet/Rewriter.java | 0 .../org/apache/sis/buildtools/doclet/Taglet.java | 0 .../apache/sis/buildtools/doclet/package-info.java | 0 .../apache/sis/buildtools/gradle/Assembler.java| 0 .../apache/sis/buildtools/gradle/BuildHelper.java | 0 .../apache/sis/buildtools/gradle/Conventions.java | 0 .../apache/sis/buildtools/gradle/Dependency.java | 0 .../apache/sis/buildtools/gradle/JavaMaker.java| 0 .../sis/buildtools/gradle/ModularCompilation.java | 0 .../apache/sis/buildtools/gradle/ModularJAR.java | 0 .../sis/buildtools/gradle/ModularJavadoc.java | 0 .../sis/buildtools/gradle/ModularPublishing.java | 0 .../sis/buildtools/gradle/ModularSources.java | 0 .../apache/sis/buildtools/gradle/ModularTest.java | 0 .../sis/buildtools/gradle/SISBuildException.java | 0 .../org/apache/sis/buildtools/gradle/UnoPkg.java | 0 .../apache/sis/buildtools/gradle/ZipWriter.java| 0 .../apache/sis/buildtools/gradle/package-info.java | 0 .../org/apache/sis/buildtools/maven/Element.java | 0 .../org/apache/sis/buildtools/maven/Generator.java | 0 .../apache/sis/buildtools/maven/package-info.java | 0 .../sis/buildtools/maven/workaround/Argument.java | 0 .../maven/workaround/ProxyGenerator.java | 0 .../buildtools/maven/workaround/package-info.java | 0 .../resources/IndexedResourceCompiler.java | 0 .../sis/buildtools/resources/package-info.java | 0 .../main/kotlin/sis.library-conventions.gradle.kts | 68 ++ .../org/apache/sis/buildtools/book/GEOAPI.lst | 0 .../org/apache/sis/buildtools/book/OGC.lst | 0 .../org/apache/sis/buildtools/book/SIS.lst | 0 .../org/apache/sis/buildtools/book/XML_PREFIX.lst | 0 .../resources/IndexedResourceCompilerTest.java | 0 endorsed/build.gradle.kts | 27 + incubator/build.gradle.kts | 24 +--- optional/build.gradle.kts | 25 +--- 46 files changed, 76 insertions(+), 92 deletions(-) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/book/Assembler.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/book/BookException.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/book/Characters.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/book/CodeColorizer.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/book/package-info.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/coding/ReorganizeImports.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/coding/VerifyVersionInJavadoc.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/coding/package-info.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/doclet/Doclet.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main => main/java}/org/apache/sis/buildtools/doclet/Include.java (100%) rename buildSrc/src/{org.apache.sis.buildtools/main =>
(sis) 01/02: Move the `buildSrc` source code to its traditional location. The "Module Source Hierarchy" has no effect for this sub-project since it contains a single module. The intend is to make easi
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 2ef86ebf35a088c3d11ad60226d29432b45123da Author: Martin Desruisseaux AuthorDate: Mon Nov 27 12:30:29 2023 +0100 Move the `buildSrc` source code to its traditional location. The "Module Source Hierarchy" has no effect for this sub-project since it contains a single module. The intend is to make easier to add conventions in the way described by Gradle documentation. --- buildSrc/build.gradle.kts | 23 -- .../org/apache/sis/buildtools/book/Assembler.java | 0 .../apache/sis/buildtools/book/BookException.java | 0 .../org/apache/sis/buildtools/book/Characters.java | 0 .../apache/sis/buildtools/book/CodeColorizer.java | 0 .../apache/sis/buildtools/book/package-info.java | 0 .../sis/buildtools/coding/ReorganizeImports.java | 0 .../buildtools/coding/VerifyVersionInJavadoc.java | 0 .../apache/sis/buildtools/coding/package-info.java | 0 .../org/apache/sis/buildtools/doclet/Doclet.java | 0 .../org/apache/sis/buildtools/doclet/Include.java | 0 .../org/apache/sis/buildtools/doclet/Rewriter.java | 0 .../org/apache/sis/buildtools/doclet/Taglet.java | 0 .../apache/sis/buildtools/doclet/package-info.java | 0 .../apache/sis/buildtools/gradle/Assembler.java| 0 .../apache/sis/buildtools/gradle/BuildHelper.java | 0 .../apache/sis/buildtools/gradle/Conventions.java | 0 .../apache/sis/buildtools/gradle/Dependency.java | 0 .../apache/sis/buildtools/gradle/JavaMaker.java| 0 .../sis/buildtools/gradle/ModularCompilation.java | 0 .../apache/sis/buildtools/gradle/ModularJAR.java | 0 .../sis/buildtools/gradle/ModularJavadoc.java | 0 .../sis/buildtools/gradle/ModularPublishing.java | 0 .../sis/buildtools/gradle/ModularSources.java | 0 .../apache/sis/buildtools/gradle/ModularTest.java | 0 .../sis/buildtools/gradle/SISBuildException.java | 0 .../org/apache/sis/buildtools/gradle/UnoPkg.java | 0 .../apache/sis/buildtools/gradle/ZipWriter.java| 0 .../apache/sis/buildtools/gradle/package-info.java | 0 .../org/apache/sis/buildtools/maven/Element.java | 0 .../org/apache/sis/buildtools/maven/Generator.java | 0 .../apache/sis/buildtools/maven/package-info.java | 0 .../sis/buildtools/maven/workaround/Argument.java | 0 .../maven/workaround/ProxyGenerator.java | 0 .../buildtools/maven/workaround/package-info.java | 0 .../resources/IndexedResourceCompiler.java | 0 .../sis/buildtools/resources/package-info.java | 0 .../org/apache/sis/buildtools/book/GEOAPI.lst | 0 .../org/apache/sis/buildtools/book/OGC.lst | 0 .../org/apache/sis/buildtools/book/SIS.lst | 0 .../org/apache/sis/buildtools/book/XML_PREFIX.lst | 0 .../resources/IndexedResourceCompilerTest.java | 0 42 files changed, 23 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index c32e77e311..cfbc70ea94 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -27,29 +27,6 @@ gradlePlugin { } } -/* - * Source files are organized following the same convention than other Apache SIS sub-projects. - * However since there is currently only one module in `buildSRC`, we do not need to configure - * for Module Source Hierarchy. We let Gradle uses Package Hierarchy (the default Gradle mode) - * and simulate the module source hierarchy with `setSrcDirs(…)`. - */ -sourceSets { -main { -java { -setSrcDirs(listOf("src/org.apache.sis.buildtools/main")) -} -resources { -setSrcDirs(listOf("src/org.apache.sis.buildtools/main")) -include("**/*.lst") -} -} -test { -java { -setSrcDirs(listOf("src/org.apache.sis.buildtools/test")) -} -} -} - /* * All dependencies used by the plugin. */ diff --git a/buildSrc/src/org.apache.sis.buildtools/main/org/apache/sis/buildtools/book/Assembler.java b/buildSrc/src/main/java/org/apache/sis/buildtools/book/Assembler.java similarity index 100% rename from buildSrc/src/org.apache.sis.buildtools/main/org/apache/sis/buildtools/book/Assembler.java rename to buildSrc/src/main/java/org/apache/sis/buildtools/book/Assembler.java diff --git a/buildSrc/src/org.apache.sis.buildtools/main/org/apache/sis/buildtools/book/BookException.java b/buildSrc/src/main/java/org/apache/sis/buildtools/book/BookException.java similarity index 100% rename from buildSrc/src/org.apache.sis.buildtools/main/org/apache/sis/buildtools/book/BookException.java rename to buildSrc/src/main/java/org/apache/sis/buildtools/book/BookException.java diff --git a/buildSrc/src/org.apache.sis.buildtools/main/org/apache/sis/buildtools/book/Characters.java b/buildSrc/src/main/java/org/apache/sis/buildtools/book/Characters.java
(sis) 02/02: Create a "sis.library-conventions" with some common configuration for Gradle build.
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 af3440719f82877ebc51684d79e386379c644f01 Author: Martin Desruisseaux AuthorDate: Mon Nov 27 14:04:17 2023 +0100 Create a "sis.library-conventions" with some common configuration for Gradle build. --- buildSrc/build.gradle.kts | 1 + .../main/kotlin/sis.library-conventions.gradle.kts | 68 ++ endorsed/build.gradle.kts | 27 + incubator/build.gradle.kts | 24 +--- optional/build.gradle.kts | 25 +--- 5 files changed, 76 insertions(+), 69 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index cfbc70ea94..8b74d433bc 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -16,6 +16,7 @@ */ plugins { `java-gradle-plugin` +`kotlin-dsl` } gradlePlugin { diff --git a/buildSrc/src/main/kotlin/sis.library-conventions.gradle.kts b/buildSrc/src/main/kotlin/sis.library-conventions.gradle.kts new file mode 100644 index 00..140c601648 --- /dev/null +++ b/buildSrc/src/main/kotlin/sis.library-conventions.gradle.kts @@ -0,0 +1,68 @@ +/* + * 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. + */ +group = "org.apache.sis" +version = "2.0-SNAPSHOT" + +/* + * "org.apache.sis.buildtools" is a custom Gradle plugin for building a project with Module Source Hierarchy + * as specified in https://docs.oracle.com/en/java/javase/21/docs/specs/man/javac.html#directory-hierarchies + * The expected hierarchy is: + * + * endorsed + * ├─ build + * └─ src + * ├─ org.apache.sis.metadata + * │├─ main + * ││ ├─ module-info.java + * ││ └─ org/apache/sis/metadata/… + * │└─ test + * │└─ org/apache/sis/metadata/… + * ├─ org.apache.sis.referencing + * │├─ main + * ││ ├─ module-info.java + * ││ └─ org/apache/sis/referencing/… + * │└─ test + * │└─ org/apache/sis/referencing/… + * └─ etc. + */ +plugins { +`java-library` +`maven-publish` +signing +} + +/* + * Configuration of the repositories where to deploy artifacts. + */ +publishing { +repositories { +maven { +name = "Apache" +url = uri(if (version.toString().endsWith("SNAPSHOT")) + "https://repository.apache.org/content/repositories/snapshots; else + "https://repository.apache.org/service/local/staging/deploy/maven2;) +credentials { +val asfNexusUsername = providers.gradleProperty("asfNexusUsername") +val asfNexusPassword = providers.gradleProperty("asfNexusPassword") +if (asfNexusUsername.isPresent() && asfNexusPassword.isPresent()) { +username = asfNexusUsername.get() +password = asfNexusPassword.get() +} +} +} +} +} diff --git a/endorsed/build.gradle.kts b/endorsed/build.gradle.kts index 828fc2b9d5..39ec0363db 100644 --- a/endorsed/build.gradle.kts +++ b/endorsed/build.gradle.kts @@ -14,12 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -group = "org.apache.sis" -version = "2.0-SNAPSHOT" /* - * "org.apache.sis.buildtools" is a custom Gradle plugin for building a project with Module Source Hierarchy - * as specified in https://docs.oracle.com/en/java/javase/20/docs/specs/man/javac.html#directory-hierarchies + * This project uses a custom Gradle plugin for building a project with Module Source Hierarchy as specified + * in https://docs.oracle.com/en/java/javase/21/docs/specs/man/javac.html#directory-hierarchies documentation. * The expected hierarchy is: * * endorsed @@ -40,9 +38,7 @@ version = "2.0-SNAPSHOT" * └─ etc. */ plugins { -`java-library` -`maven-publish` -signing +id("sis.library-conventions") id("org.apache.sis.buildtools") }
(sis) 03/03: When opening files in a folder, inherit the options specified in the parent `StorageConnector`.
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 6d1043d6839d9c534fa565a47e97955dbaaf4abe Author: Martin Desruisseaux AuthorDate: Mon Nov 27 11:59:04 2023 +0100 When opening files in a folder, inherit the options specified in the parent `StorageConnector`. --- .../org/apache/sis/storage/StorageConnector.java | 35 .../main/org/apache/sis/storage/folder/Store.java | 46 ++ .../apache/sis/storage/folder/WritableStore.java | 5 +-- 3 files changed, 48 insertions(+), 38 deletions(-) diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/StorageConnector.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/StorageConnector.java index 7d48090aee..708d431156 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/StorageConnector.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/StorageConnector.java @@ -17,6 +17,7 @@ package org.apache.sis.storage; import java.util.Map; +import java.util.HashMap; import java.util.Iterator; import java.util.IdentityHashMap; import java.util.function.UnaryOperator; @@ -55,9 +56,11 @@ import org.apache.sis.util.ObjectConverters; import org.apache.sis.util.UnconvertibleObjectException; import org.apache.sis.util.resources.Errors; import org.apache.sis.util.logging.Logging; +import org.apache.sis.util.internal.Strings; import org.apache.sis.util.collection.TreeTable; import org.apache.sis.util.collection.TableColumn; import org.apache.sis.util.collection.DefaultTreeTable; +import org.apache.sis.util.collection.Containers; import org.apache.sis.storage.internal.Resources; import org.apache.sis.storage.base.StoreUtilities; import org.apache.sis.io.InvalidSeekException; @@ -72,7 +75,6 @@ import org.apache.sis.io.stream.InputStreamAdapter; import org.apache.sis.io.stream.RewindableLineReader; import org.apache.sis.io.stream.InternalOptionKey; import org.apache.sis.system.Configuration; -import org.apache.sis.util.internal.Strings; import org.apache.sis.setup.OptionKey; @@ -623,15 +625,19 @@ public class StorageConnector implements Serializable { } /** - * Returns the option value for the given key, or {@code null} if none. + * Creates a new data store connection which has a sub-component of a larger data store. + * The new storage connector inherits all options that were specified in the parent connector. * - * @paramthe type of option value. - * @param key the option for which to get the value. - * @return the current value for the given option, or {@code null} if none. + * @param parent the storage connector from which to inherit options. + * @param storage the input/output object as a URL, file, image input stream, etc.. + * + * @since 1.5 */ -public T getOption(final OptionKey key) { -ArgumentChecks.ensureNonNull("key", key); -return key.getValueFrom(options); +public StorageConnector(final StorageConnector parent, final Object storage) { +this(storage); +if (!Containers.isNullOrEmpty(parent.options)) { +options = new HashMap<>(parent.options); +} } /** @@ -653,6 +659,19 @@ public class StorageConnector implements Serializable { options = key.setValueInto(options, value); } +/** + * Returns the option value for the given key, or {@code null} if none. + * This is the value specified by the last call to a {@code setOption(…)} with the given key. + * + * @paramthe type of option value. + * @param key the option for which to get the value. + * @return the current value for the given option, or {@code null} if none. + */ +public T getOption(final OptionKey key) { +ArgumentChecks.ensureNonNull("key", key); +return key.getValueFrom(options); +} + /** * Returns the input/output object given at construction time. * The object can be of any type, but the class javadoc lists the most typical ones. diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/folder/Store.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/folder/Store.java index af69ac87f5..f6821a7fd4 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/folder/Store.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/folder/Store.java @@ -32,6 +32,7 @@ import java.nio.file.Path; import java.nio.file.Files; import java.nio.file.DirectoryStream; import java.nio.file.DirectoryIteratorException; +import java.nio.file.StandardOpenOption; import org.opengis.util.GenericName; import org.opengis.util.NameFactory; import org.opengis.util.NameSpace; @@ -99,19 +100,10 @@ class Store extends DataStore
(sis) 01/03: Miscellaneous utilities: - CommonCRS.Temporal.TROPICAL_YEAR - QuantityFormat.parseNumber(…) - IOUtilities.toBuffered(Reader)
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 f97dcee389051880134f53ef52571973b5f55682 Author: Martin Desruisseaux AuthorDate: Sun Nov 26 19:10:58 2023 +0100 Miscellaneous utilities: - CommonCRS.Temporal.TROPICAL_YEAR - QuantityFormat.parseNumber(…) - IOUtilities.toBuffered(Reader) --- .../main/org/apache/sis/console/package-info.java | 2 +- .../main/org/apache/sis/referencing/CommonCRS.java | 57 +- .../org/apache/sis/referencing/package-info.java | 2 +- .../org/apache/sis/referencing/CommonCRSTest.java | 1 + .../main/org/apache/sis/io/stream/IOUtilities.java | 16 ++ .../org/apache/sis/storage/csv/StoreProvider.java | 2 +- .../org/apache/sis/measure/QuantityFormat.java | 20 +++- .../main/org/apache/sis/measure/package-info.java | 2 +- .../main/org/apache/sis/util/Classes.java | 1 + .../org/apache/sis/util/collection/Containers.java | 4 ++ .../org/apache/sis/util/resources/Vocabulary.java | 10 .../sis/util/resources/Vocabulary.properties | 2 + .../sis/util/resources/Vocabulary_fr.properties| 2 + 13 files changed, 94 insertions(+), 27 deletions(-) diff --git a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/package-info.java b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/package-info.java index e5dd6749b0..1a880bf399 100644 --- a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/package-info.java +++ b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/package-info.java @@ -25,7 +25,7 @@ * the following environment variable can be set: * * {@snippet lang="shell" : - * export JDK_JAVA_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:8000 + * export JDK_JAVA_OPTIONS="-enableassertions -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:8000" * } * * SIS installation on remote machines diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CommonCRS.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CommonCRS.java index 56979288ba..62a21cb608 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CommonCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CommonCRS.java @@ -143,7 +143,7 @@ import static org.apache.sis.util.internal.StandardDateFormat.MILLISECONDS_PER_D * * * @author Martin Desruisseaux (Geomatys) - * @version 1.4 + * @version 1.5 * * @see org.apache.sis.referencing.factory.CommonAuthorityFactory * @@ -1511,12 +1511,13 @@ public enum CommonCRS { * Java time{@code SIS:JavaTime} CRS {@link #JAVA} * Julian {@code OGC:JulianDate} CRS, Datum {@link #JULIAN} * Modified Julian {@code SIS:ModifiedJulianDate} CRS, Datum {@link #MODIFIED_JULIAN} + * Tropical year{@code SIS:TropicalYear} CRS {@link #TROPICAL_YEAR} * Truncated Julian {@code OGC:TruncatedJulianDate} CRS, Datum {@link #TRUNCATED_JULIAN} * Unix/POSIX time {@code OGC:UnixTime} CRS, Datum {@link #UNIX} * * * @author Martin Desruisseaux (Geomatys) - * @version 1.3 + * @version 1.5 * * @see Engineering#TIME * @@ -1575,6 +1576,23 @@ public enum CommonCRS { DUBLIN_JULIAN(Vocabulary.Keys.DublinJulian, -25568L * MILLISECONDS_PER_DAY + MILLISECONDS_PER_DAY/2, "DublinJulian", false), +/** + * Time measured in units of tropical years since January 1, 2000 at 00:00 UTC. + * The length of a tropical year is defined by the International Union of Geological Sciences (IUGS) + * as exactly 31556925.445 seconds (approximately 365.24219 days) taken as the length of the tropical + * year in the year 2000. Apache SIS extends this definition by using January 1st, 2000 as the epoch + * (by contrast, the IUGS definition is only about duration). + * + * Application to geodesy + * The tropical year is the unit of measurement used in EPSG geodetic database for year duration. + * It it used for rate of changes such as "centimeters per year". Its identifier is EPSG:1029. + * + * @see Units#TROPICAL_YEAR + * + * @since 1.5 + */ +TROPICAL_YEAR(Vocabulary.Keys.TropicalYear, 94668480L, "TropicalYear", false), + /** * Time measured as seconds since January 1st, 1970 at 00:00 UTC. */ @@ -1707,6 +1725,7 @@ public enum CommonCRS { * Dublin Julian {@link #DUBLIN_JULIAN} * Julian {@link #JULIAN} * Modified Julian{@link
(sis) branch geoapi-4.0 updated (d747d8924b -> 6d1043d683)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git from d747d8924b feat(Shapefile): implement ResourceOnFileSystem new f97dcee389 Miscellaneous utilities: - CommonCRS.Temporal.TROPICAL_YEAR - QuantityFormat.parseNumber(…) - IOUtilities.toBuffered(Reader) new e92eacbe6d Fix a ClassCastException when no resource is using deferred loading. new 6d1043d683 When opening files in a folder, inherit the options specified in the parent `StorageConnector`. The 3 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/org/apache/sis/console/package-info.java | 2 +- .../main/org/apache/sis/referencing/CommonCRS.java | 57 +- .../org/apache/sis/referencing/package-info.java | 2 +- .../org/apache/sis/referencing/CommonCRSTest.java | 1 + .../main/org/apache/sis/io/stream/IOUtilities.java | 16 ++ .../org/apache/sis/storage/StorageConnector.java | 35 ++--- .../aggregate/ConcatenatedGridCoverage.java| 27 +- .../org/apache/sis/storage/csv/StoreProvider.java | 2 +- .../main/org/apache/sis/storage/folder/Store.java | 46 - .../apache/sis/storage/folder/WritableStore.java | 5 +- .../org/apache/sis/measure/QuantityFormat.java | 20 +++- .../main/org/apache/sis/measure/package-info.java | 2 +- .../main/org/apache/sis/util/Classes.java | 1 + .../org/apache/sis/util/collection/Containers.java | 4 ++ .../org/apache/sis/util/resources/Vocabulary.java | 10 .../sis/util/resources/Vocabulary.properties | 2 + .../sis/util/resources/Vocabulary_fr.properties| 2 + 17 files changed, 167 insertions(+), 67 deletions(-)
(sis) 02/03: Fix a ClassCastException when no resource is using deferred loading.
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 e92eacbe6dfc8a76c369a7b51a304550bba93a80 Author: Martin Desruisseaux AuthorDate: Mon Nov 27 11:06:21 2023 +0100 Fix a ClassCastException when no resource is using deferred loading. --- .../aggregate/ConcatenatedGridCoverage.java| 27 -- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/ConcatenatedGridCoverage.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/ConcatenatedGridCoverage.java index 42de890c71..6cfec2278a 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/ConcatenatedGridCoverage.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/ConcatenatedGridCoverage.java @@ -63,12 +63,20 @@ final class ConcatenatedGridCoverage extends GridCoverage { private static final class Loader { /** * Whether loading of grid coverages should be deferred to rendering time. - * This is a bit set packed as {@code long} values. A bit value of 1 means + * This is a bit set packed as {@code int} values. A bit value of 1 means * that the coverages at the corresponding index should be loaded from the * {@linkplain #slices slices} at same index only when first needed. * + * Invariant + * Deferred {@linkplain #slices slices} shall be instances of {@link GridCoverage} + * and non-deferred slices shall be instances of {@link GridCoverageResource}. + * So the {@code deferred} flags are redundant with {@code instanceof} checks. + * However, implementation classes may implement both interfaces. + * So those flags tell how to use a slice instance. + * * @see ConcatenatedGridResource#deferredLoading * @see #isDeferred(int) + * @see #valid() */ final int[] deferred; @@ -176,6 +184,7 @@ final class ConcatenatedGridCoverage extends GridCoverage { this.isConverted = source.isConverted; this.locator = source.locator; this.strategy= source.strategy; +assert valid(); } /** @@ -192,6 +201,20 @@ final class ConcatenatedGridCoverage extends GridCoverage { this.locator = source.locator; this.strategy= source.strategy; this.isConverted = converted; +assert valid(); +} + +/** + * Verifies that all {@linkplain #slices} are instances of the expected interface. + * This is used for assertions only. + */ +private boolean valid() { +for (int i=0; i < slices.length; i++) { +final Object actual = slices[i]; +Class expected = isDeferred(i) ? GridCoverageResource.class : GridCoverage.class; +if (!expected.isInstance(actual)) throw new AssertionError(actual); +} +return true; } /** @@ -200,7 +223,7 @@ final class ConcatenatedGridCoverage extends GridCoverage { * If {@code false}, then {@code slices[i]} shall be an instance of {@link GridCoverage}. */ private boolean isDeferred(final int i) { -return (loader == null) || (loader.deferred[i >>> Numerics.INT_SHIFT] & (1 << i)) != 0; +return (loader != null) && (loader.deferred[i >>> Numerics.INT_SHIFT] & (1 << i)) != 0; } /**
(sis) branch geoapi-4.0 updated: feat(Shapefile): implement ResourceOnFileSystem
This is an automated email from the ASF dual-hosted git repository. jsorel pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git The following commit(s) were added to refs/heads/geoapi-4.0 by this push: new d747d8924b feat(Shapefile): implement ResourceOnFileSystem d747d8924b is described below commit d747d8924bba34be21f506ed2fe1e12ffa0cfb02 Author: jsorel AuthorDate: Mon Nov 27 09:17:59 2023 +0100 feat(Shapefile): implement ResourceOnFileSystem --- .../org.apache.sis.storage/main/module-info.java | 1 + .../sis/storage/shapefile/ShapefileStore.java | 26 ++- .../sis/storage/shapefile/ShapefileStoreTest.java | 196 +++-- 3 files changed, 131 insertions(+), 92 deletions(-) diff --git a/endorsed/src/org.apache.sis.storage/main/module-info.java b/endorsed/src/org.apache.sis.storage/main/module-info.java index 0866bdc06c..b7ce508e35 100644 --- a/endorsed/src/org.apache.sis.storage/main/module-info.java +++ b/endorsed/src/org.apache.sis.storage/main/module-info.java @@ -54,6 +54,7 @@ module org.apache.sis.storage { org.apache.sis.storage.geotiff, org.apache.sis.storage.earthobservation, org.apache.sis.storage.coveragejson,// In the "incubator" sub-project. +org.apache.sis.storage.shapefile, // In the "incubator" sub-project. org.apache.sis.util,// For the "About" command. org.apache.sis.console, org.apache.sis.openoffice, diff --git a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java index c419a714bb..303b6d6f20 100644 --- a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java +++ b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java @@ -89,6 +89,7 @@ import org.apache.sis.storage.Query; import org.apache.sis.storage.StorageConnector; import org.apache.sis.storage.UnsupportedQueryException; import org.apache.sis.storage.WritableFeatureSet; +import org.apache.sis.storage.base.ResourceOnFileSystem; import org.apache.sis.storage.shapefile.cpg.CpgFiles; import org.apache.sis.storage.shapefile.dbf.DBFField; import org.apache.sis.storage.shapefile.dbf.DBFHeader; @@ -125,7 +126,7 @@ import org.opengis.filter.ValueReference; * * @author Johann Sorel (Geomatys) */ -public final class ShapefileStore extends DataStore implements WritableFeatureSet { +public final class ShapefileStore extends DataStore implements WritableFeatureSet, ResourceOnFileSystem { private static final String GEOMETRY_NAME = "geometry"; private static final Logger LOGGER = Logger.getLogger("org.apache.sis.storage.shapefile"); @@ -220,7 +221,12 @@ public final class ShapefileStore extends DataStore implements WritableFeatureSe featureSetView.replaceIf(predicate, unaryOperator); } -private class AsFeatureSet extends AbstractFeatureSet implements WritableFeatureSet { +@Override +public Path[] getComponentFiles() throws DataStoreException { +return featureSetView.getComponentFiles(); +} + +private class AsFeatureSet extends AbstractFeatureSet implements WritableFeatureSet, ResourceOnFileSystem { private final Rectangle2D.Double filter; private final Set dbfProperties; @@ -692,6 +698,22 @@ public final class ShapefileStore extends DataStore implements WritableFeatureSe if (!isDefaultView()) throw new DataStoreException("Resource not writable in current filter state"); throw new UnsupportedOperationException("Not supported yet."); } + +@Override +public Path[] getComponentFiles() throws DataStoreException { +final List paths = new ArrayList<>(); +final Path shp = files.shpFile; +final Path shx = files.getShx(false); +final Path dbf = files.getDbf(false); +final Path prj = files.getPrj(false); +final Path cpg = files.getCpg(false); +if (shp != null && Files.exists(shp)) paths.add(shp); +if (shx != null && Files.exists(shx)) paths.add(shx); +if (dbf != null && Files.exists(dbf)) paths.add(dbf); +if (prj != null && Files.exists(prj)) paths.add(prj); +if (cpg != null && Files.exists(cpg)) paths.add(cpg); +return paths.toArray(Path[]::new); +} } /** diff --git a/incubator/src/org.apache.sis.storage.shapefile/test/org/apache/sis/storage/shapefile/ShapefileStoreTest.java b/incubator/src/org.apache.sis.storage.shapefile/test/org/apache/sis/storage/shapefile/ShapefileStoreTest.java index 81d2da30a7..6d0152954f 100644 ---