(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 fafbe8a7b643a4994eb5fe2917721e380d381af2 Merge: ed9308d56c 2bffeac5a6 Author: Martin Desruisseaux AuthorDate: Mon Nov 6 12:37:23 2023 +0100 Merge branch 'geoapi-3.1' endorsed/build.gradle.kts | 3 +- .../org.apache.sis.feature/main/module-info.java | 1 + .../grid/BandAggregateGridCoverageTest.java| 4 +- .../coverage/grid/ConvertedGridCoverageTest.java | 6 +- .../coverage/grid/DimensionalityReductionTest.java | 2 +- .../sis/coverage/grid/GridCoverage2DTest.java | 4 +- .../sis/coverage/grid/GridCoverageBuilderTest.java | 2 +- .../sis/coverage/grid/GridDerivationTest.java | 8 +- .../apache/sis/coverage/grid/GridExtentTest.java | 2 +- .../apache/sis/coverage/grid/GridGeometryTest.java | 8 +- .../coverage/grid/ResampledGridCoverageTest.java | 8 +- .../sis/coverage/grid/ReshapedImageTest.java | 6 +- .../coverage/grid/TranslatedGridCoverageTest.java | 2 +- .../apache/sis/feature/EnvelopeOperationTest.java | 2 +- .../apache/sis/feature/FeatureOperationsTest.java | 6 +- .../feature/builder/FeatureTypeBuilderTest.java| 8 +- .../feature/internal/AttributeConventionTest.java | 2 +- .../sis/filter/BinarySpatialFilterTestCase.java| 4 +- .../apache/sis/filter/sqlmm/RegistryTestCase.java | 4 +- .../org/apache/sis/filter/sqlmm/SQLMMTest.java | 2 +- .../sis/geometry/wrapper/GeometriesTestCase.java | 4 +- .../org/apache/sis/image/ResamplingGridTest.java | 4 +- .../apache/sis/metadata/MetadataCopierTest.java| 4 +- .../apache/sis/metadata/MetadataStandardTest.java | 6 +- .../apache/sis/metadata/PropertyAccessorTest.java | 14 +- .../sis/metadata/PropertyInformationTest.java | 2 +- .../org/apache/sis/metadata/SpecialCasesTest.java | 6 +- .../sis/metadata/sql/IdentifierGeneratorTest.java | 1 - .../sis/metadata/sql/MetadataWriterTest.java | 4 +- .../xml/bind/fra/DirectReferenceSystemTest.java| 4 +- .../apache/sis/geometry/AbstractEnvelopeTest.java | 6 +- .../org/apache/sis/geometry/ArrayEnvelopeTest.java | 4 +- .../apache/sis/geometry/CoordinateFormatTest.java | 6 +- .../org/apache/sis/geometry/Envelope2DTest.java| 2 +- .../org/apache/sis/geometry/EnvelopesTest.java | 2 +- .../sis/geometry/GeneralDirectPositionTest.java| 2 +- .../apache/sis/geometry/GeneralEnvelopeTest.java | 4 +- .../apache/sis/geometry/ImmutableEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/SubEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/TransformTestCase.java | 8 +- .../sis/geometry/WraparoundAdjustmentTest.java | 4 +- .../sis/referencing/AuthorityFactoriesTest.java| 4 +- .../test/org/apache/sis/referencing/CRSTest.java | 6 +- .../sis/referencing/GeodesicsOnEllipsoidTest.java | 2 +- .../sis/referencing/GeodeticCalculatorTest.java| 2 +- .../sis/referencing/IdentifiedObjectsTest.java | 2 +- .../sis/referencing/StandardDefinitionsTest.java | 10 +- .../sis/referencing/crs/AbstractCRSTest.java | 4 +- .../referencing/crs/DefaultCompoundCRSTest.java| 4 +- .../sis/referencing/crs/DefaultDerivedCRSTest.java | 4 +- .../referencing/crs/DefaultEngineeringCRSTest.java | 2 +- .../sis/referencing/crs/DefaultImageCRSTest.java | 4 +- .../referencing/crs/DefaultProjectedCRSTest.java | 2 +- .../referencing/crs/DefaultTemporalCRSTest.java| 2 +- .../apache/sis/referencing/crs/HardCodedCRS.java | 4 +- .../sis/referencing/crs/HardCodedCRSTest.java | 2 +- .../datum/DefaultTemporalDatumTest.java| 2 +- .../sis/referencing/datum/HardCodedDatum.java | 4 +- .../referencing/factory/AuthorityFactoryMock.java | 2 + .../factory/MultiAuthoritiesFactoryTest.java | 6 +- .../internal/ServicesForMetadataTest.java | 2 +- .../operation/CoordinateOperationFinderTest.java | 4 +- .../DefaultConcatenatedOperationTest.java | 4 +- .../operation/DefaultConversionTest.java | 12 +- .../operation/DefaultTransformationTest.java | 8 +- .../operation/HardCodedConversions.java| 2 + .../builder/LinearTransformBuilderTest.java| 6 +- .../operation/builder/LinearizerTest.java | 4 +- .../operation/provider/GeographicOffsetsTest.java | 2 +- .../transform/AbridgedMolodenskyTransformTest.java | 4 +- .../transform/CoordinateSystemTransformTest.java | 2 +- .../transform/DefaultMathTransformFactoryTest.java | 8 +- .../InterpolatedGeocentricTransformTest.java | 2 +- .../transform/MathTransformFactoryBase.java| 2 + .../transform/MolodenskyTransformTest.java | 4 +- .../transform/TransformSeparatorTest.java | 6 +-
(sis) branch main updated (ed9308d56c -> fafbe8a7b6)
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 ed9308d56c Merge branch 'geoapi-3.1' add 0de784f0e4 Reorganize import statements with a better separation of test dependencies. add f7dabc89f1 Replace `api` dependency to Glassfish by a pair of `compileOnly` and `runtimeOnly`. The intend is to avoid that this dependency appears in Maven pom files. add b12a8b466a Add `ImageOutputStream` support in `StorageConnector`. add 313bfa0ac1 Add compression support for GeoTIFF. Only "Deflate" is supported for now. add 5aa4b67d01 Rename `GeoTiffOption` as `FormatModifier`. add 851bb80250 feat(Shapefile): add shp file read and write support add f2347a9fbe feat(shapefile): add dbf read support add 374367cabf Add support for predictor before writing images in a GeoTIFF file. add 51fc2ddf3e Fix the writing of GeoTIFF planar image (banded sample model). add 1bcda2bd6b Use TIFF strips instead of tiles when the rows are not divided in tiles. The intend is to avoid the restriction about tile size multiple of 16 bytes. add 924462e3c6 feat(Shapefile): add shapefile store add f361498610 When writing a TIFF file, make possible (in some circumstances) to send data directly from raster to deflater, bypassing the intermediate buffer. Switch `Compression.DEFLATE` to no predictor by default for improving the chances that the direct mode can be used, and also because experiences suggest that horizontal differentiating predictor can sometime be counter-productive. add c835c4786f Fix the case when raster data of a tile to write does not start at the beginning of the backing array. add ba3b3c577b Performance tuning: use the ByteBuffer API for copying block of data in `CopyFromBytes`. The previous code was assuming that the amount of bytes to copy is small (typically 1), but that assumption become wrong when the tile width is larger that the buffer capacity. This commit also increases the default buffer size. add df8c4d966c Superficial reformatting of shapefile commit before merge. add 2bffeac5a6 Merge branch 'geoapi-4.0' into geoapi-3.1 new fafbe8a7b6 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: endorsed/build.gradle.kts | 3 +- .../org.apache.sis.feature/main/module-info.java | 1 + .../grid/BandAggregateGridCoverageTest.java| 4 +- .../coverage/grid/ConvertedGridCoverageTest.java | 6 +- .../coverage/grid/DimensionalityReductionTest.java | 2 +- .../sis/coverage/grid/GridCoverage2DTest.java | 4 +- .../sis/coverage/grid/GridCoverageBuilderTest.java | 2 +- .../sis/coverage/grid/GridDerivationTest.java | 8 +- .../apache/sis/coverage/grid/GridExtentTest.java | 2 +- .../apache/sis/coverage/grid/GridGeometryTest.java | 8 +- .../coverage/grid/ResampledGridCoverageTest.java | 8 +- .../sis/coverage/grid/ReshapedImageTest.java | 6 +- .../coverage/grid/TranslatedGridCoverageTest.java | 2 +- .../apache/sis/feature/EnvelopeOperationTest.java | 2 +- .../apache/sis/feature/FeatureOperationsTest.java | 6 +- .../feature/builder/FeatureTypeBuilderTest.java| 8 +- .../feature/internal/AttributeConventionTest.java | 2 +- .../sis/filter/BinarySpatialFilterTestCase.java| 4 +- .../apache/sis/filter/sqlmm/RegistryTestCase.java | 4 +- .../org/apache/sis/filter/sqlmm/SQLMMTest.java | 2 +- .../sis/geometry/wrapper/GeometriesTestCase.java | 4 +- .../org/apache/sis/image/ResamplingGridTest.java | 4 +- .../apache/sis/metadata/MetadataCopierTest.java| 4 +- .../apache/sis/metadata/MetadataStandardTest.java | 6 +- .../apache/sis/metadata/PropertyAccessorTest.java | 14 +- .../sis/metadata/PropertyInformationTest.java | 2 +- .../org/apache/sis/metadata/SpecialCasesTest.java | 6 +- .../sis/metadata/sql/IdentifierGeneratorTest.java | 1 - .../sis/metadata/sql/MetadataWriterTest.java | 4 +- .../xml/bind/fra/DirectReferenceSystemTest.java| 4 +- .../apache/sis/geometry/AbstractEnvelopeTest.java | 6 +- .../org/apache/sis/geometry/ArrayEnvelopeTest.java | 4 +- .../apache/sis/geometry/CoordinateFormatTest.java | 6 +- .../org/apache/sis/geometry/Envelope2DTest.java| 2 +- .../org/apache/sis/geometry/EnvelopesTest.java | 2 +- .../sis/geometry/GeneralDirectPositionTest.java| 2 +- .../apache/sis/geometry/GeneralEnvelopeTest.java | 4 +- .../apache/sis/geometry/ImmutableEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/SubEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/TransformTestCase.java |
(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 2bffeac5a64482570ce95dc5ef42d0392bf06f4a Merge: 0a72e06db9 df8c4d966c Author: Martin Desruisseaux AuthorDate: Mon Nov 6 11:59:38 2023 +0100 Merge branch 'geoapi-4.0' into geoapi-3.1 endorsed/build.gradle.kts | 3 +- .../org.apache.sis.feature/main/module-info.java | 1 + .../grid/BandAggregateGridCoverageTest.java| 4 +- .../coverage/grid/ConvertedGridCoverageTest.java | 6 +- .../coverage/grid/DimensionalityReductionTest.java | 2 +- .../sis/coverage/grid/GridCoverage2DTest.java | 4 +- .../sis/coverage/grid/GridCoverageBuilderTest.java | 2 +- .../sis/coverage/grid/GridDerivationTest.java | 8 +- .../apache/sis/coverage/grid/GridExtentTest.java | 2 +- .../apache/sis/coverage/grid/GridGeometryTest.java | 8 +- .../coverage/grid/ResampledGridCoverageTest.java | 8 +- .../sis/coverage/grid/ReshapedImageTest.java | 6 +- .../coverage/grid/TranslatedGridCoverageTest.java | 2 +- .../apache/sis/feature/EnvelopeOperationTest.java | 2 +- .../apache/sis/feature/FeatureOperationsTest.java | 6 +- .../feature/builder/FeatureTypeBuilderTest.java| 8 +- .../feature/internal/AttributeConventionTest.java | 2 +- .../sis/filter/BinarySpatialFilterTestCase.java| 4 +- .../apache/sis/filter/sqlmm/RegistryTestCase.java | 4 +- .../org/apache/sis/filter/sqlmm/SQLMMTest.java | 2 +- .../sis/geometry/wrapper/GeometriesTestCase.java | 4 +- .../org/apache/sis/image/ResamplingGridTest.java | 4 +- .../apache/sis/metadata/MetadataCopierTest.java| 4 +- .../apache/sis/metadata/MetadataStandardTest.java | 6 +- .../apache/sis/metadata/PropertyAccessorTest.java | 14 +- .../sis/metadata/PropertyInformationTest.java | 2 +- .../org/apache/sis/metadata/SpecialCasesTest.java | 6 +- .../sis/metadata/sql/IdentifierGeneratorTest.java | 1 - .../sis/metadata/sql/MetadataWriterTest.java | 4 +- .../xml/bind/fra/DirectReferenceSystemTest.java| 4 +- .../apache/sis/geometry/AbstractEnvelopeTest.java | 6 +- .../org/apache/sis/geometry/ArrayEnvelopeTest.java | 4 +- .../apache/sis/geometry/CoordinateFormatTest.java | 6 +- .../org/apache/sis/geometry/Envelope2DTest.java| 2 +- .../org/apache/sis/geometry/EnvelopesTest.java | 2 +- .../sis/geometry/GeneralDirectPositionTest.java| 2 +- .../apache/sis/geometry/GeneralEnvelopeTest.java | 4 +- .../apache/sis/geometry/ImmutableEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/SubEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/TransformTestCase.java | 8 +- .../sis/geometry/WraparoundAdjustmentTest.java | 4 +- .../sis/referencing/AuthorityFactoriesTest.java| 4 +- .../test/org/apache/sis/referencing/CRSTest.java | 6 +- .../sis/referencing/GeodesicsOnEllipsoidTest.java | 2 +- .../sis/referencing/GeodeticCalculatorTest.java| 2 +- .../sis/referencing/IdentifiedObjectsTest.java | 2 +- .../sis/referencing/StandardDefinitionsTest.java | 10 +- .../sis/referencing/crs/AbstractCRSTest.java | 4 +- .../referencing/crs/DefaultCompoundCRSTest.java| 4 +- .../sis/referencing/crs/DefaultDerivedCRSTest.java | 4 +- .../referencing/crs/DefaultEngineeringCRSTest.java | 2 +- .../sis/referencing/crs/DefaultImageCRSTest.java | 4 +- .../referencing/crs/DefaultProjectedCRSTest.java | 2 +- .../referencing/crs/DefaultTemporalCRSTest.java| 2 +- .../apache/sis/referencing/crs/HardCodedCRS.java | 4 +- .../sis/referencing/crs/HardCodedCRSTest.java | 2 +- .../datum/DefaultTemporalDatumTest.java| 2 +- .../sis/referencing/datum/HardCodedDatum.java | 4 +- .../referencing/factory/AuthorityFactoryMock.java | 2 + .../factory/MultiAuthoritiesFactoryTest.java | 6 +- .../internal/ServicesForMetadataTest.java | 2 +- .../operation/CoordinateOperationFinderTest.java | 4 +- .../DefaultConcatenatedOperationTest.java | 4 +- .../operation/DefaultConversionTest.java | 12 +- .../operation/DefaultTransformationTest.java | 8 +- .../operation/HardCodedConversions.java| 2 + .../builder/LinearTransformBuilderTest.java| 6 +- .../operation/builder/LinearizerTest.java | 4 +- .../operation/provider/GeographicOffsetsTest.java | 2 +- .../transform/AbridgedMolodenskyTransformTest.java | 4 +- .../transform/CoordinateSystemTransformTest.java | 2 +- .../transform/DefaultMathTransformFactoryTest.java | 8 +- .../InterpolatedGeocentricTransformTest.java | 2 +- .../transform/MathTransformFactoryBase.java| 2 + .../transform/MolodenskyTransformTest.java | 4 +- .../transform/TransformSeparatorTest.java |
(sis) branch geoapi-3.1 updated (0a72e06db9 -> 2bffeac5a6)
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 0a72e06db9 Merge branch 'geoapi-4.0' into geoapi-3.1 add 0de784f0e4 Reorganize import statements with a better separation of test dependencies. add f7dabc89f1 Replace `api` dependency to Glassfish by a pair of `compileOnly` and `runtimeOnly`. The intend is to avoid that this dependency appears in Maven pom files. add b12a8b466a Add `ImageOutputStream` support in `StorageConnector`. add 313bfa0ac1 Add compression support for GeoTIFF. Only "Deflate" is supported for now. add 5aa4b67d01 Rename `GeoTiffOption` as `FormatModifier`. add 851bb80250 feat(Shapefile): add shp file read and write support add f2347a9fbe feat(shapefile): add dbf read support add 374367cabf Add support for predictor before writing images in a GeoTIFF file. add 51fc2ddf3e Fix the writing of GeoTIFF planar image (banded sample model). add 1bcda2bd6b Use TIFF strips instead of tiles when the rows are not divided in tiles. The intend is to avoid the restriction about tile size multiple of 16 bytes. add 924462e3c6 feat(Shapefile): add shapefile store add f361498610 When writing a TIFF file, make possible (in some circumstances) to send data directly from raster to deflater, bypassing the intermediate buffer. Switch `Compression.DEFLATE` to no predictor by default for improving the chances that the direct mode can be used, and also because experiences suggest that horizontal differentiating predictor can sometime be counter-productive. add c835c4786f Fix the case when raster data of a tile to write does not start at the beginning of the backing array. add ba3b3c577b Performance tuning: use the ByteBuffer API for copying block of data in `CopyFromBytes`. The previous code was assuming that the amount of bytes to copy is small (typically 1), but that assumption become wrong when the tile width is larger that the buffer capacity. This commit also increases the default buffer size. add df8c4d966c Superficial reformatting of shapefile commit before merge. new 2bffeac5a6 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: endorsed/build.gradle.kts | 3 +- .../org.apache.sis.feature/main/module-info.java | 1 + .../grid/BandAggregateGridCoverageTest.java| 4 +- .../coverage/grid/ConvertedGridCoverageTest.java | 6 +- .../coverage/grid/DimensionalityReductionTest.java | 2 +- .../sis/coverage/grid/GridCoverage2DTest.java | 4 +- .../sis/coverage/grid/GridCoverageBuilderTest.java | 2 +- .../sis/coverage/grid/GridDerivationTest.java | 8 +- .../apache/sis/coverage/grid/GridExtentTest.java | 2 +- .../apache/sis/coverage/grid/GridGeometryTest.java | 8 +- .../coverage/grid/ResampledGridCoverageTest.java | 8 +- .../sis/coverage/grid/ReshapedImageTest.java | 6 +- .../coverage/grid/TranslatedGridCoverageTest.java | 2 +- .../apache/sis/feature/EnvelopeOperationTest.java | 2 +- .../apache/sis/feature/FeatureOperationsTest.java | 6 +- .../feature/builder/FeatureTypeBuilderTest.java| 8 +- .../feature/internal/AttributeConventionTest.java | 2 +- .../sis/filter/BinarySpatialFilterTestCase.java| 4 +- .../apache/sis/filter/sqlmm/RegistryTestCase.java | 4 +- .../org/apache/sis/filter/sqlmm/SQLMMTest.java | 2 +- .../sis/geometry/wrapper/GeometriesTestCase.java | 4 +- .../org/apache/sis/image/ResamplingGridTest.java | 4 +- .../apache/sis/metadata/MetadataCopierTest.java| 4 +- .../apache/sis/metadata/MetadataStandardTest.java | 6 +- .../apache/sis/metadata/PropertyAccessorTest.java | 14 +- .../sis/metadata/PropertyInformationTest.java | 2 +- .../org/apache/sis/metadata/SpecialCasesTest.java | 6 +- .../sis/metadata/sql/IdentifierGeneratorTest.java | 1 - .../sis/metadata/sql/MetadataWriterTest.java | 4 +- .../xml/bind/fra/DirectReferenceSystemTest.java| 4 +- .../apache/sis/geometry/AbstractEnvelopeTest.java | 6 +- .../org/apache/sis/geometry/ArrayEnvelopeTest.java | 4 +- .../apache/sis/geometry/CoordinateFormatTest.java | 6 +- .../org/apache/sis/geometry/Envelope2DTest.java| 2 +- .../org/apache/sis/geometry/EnvelopesTest.java | 2 +- .../sis/geometry/GeneralDirectPositionTest.java| 2 +- .../apache/sis/geometry/GeneralEnvelopeTest.java | 4 +- .../apache/sis/geometry/ImmutableEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/SubEnvelopeTest.java | 2 +- .../org/apache/sis/geometry/TransformTestCase.java | 8 +-
(sis) branch geoapi-4.0 updated: Superficial reformatting of shapefile commit before merge.
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 The following commit(s) were added to refs/heads/geoapi-4.0 by this push: new df8c4d966c Superficial reformatting of shapefile commit before merge. df8c4d966c is described below commit df8c4d966c6f75c0b62df6b37fb68fbbc5cc2919 Author: Martin Desruisseaux AuthorDate: Mon Nov 6 11:51:31 2023 +0100 Superficial reformatting of shapefile commit before merge. --- .../org.apache.sis.feature/main/module-info.java| 2 +- .../src/org.apache.sis.util/main/module-info.java | 2 +- .../sis/storage/shapefile/ShapefileProvider.java| 21 ++--- .../sis/storage/shapefile/ShapefileStore.java | 21 - .../storage/shapefile/shp/ShapeGeometryEncoder.java | 4 ++-- .../sis/storage/shapefile/shx/IndexReader.java | 1 + .../sis/storage/shapefile/ShapefileStoreTest.java | 20 +--- 7 files changed, 36 insertions(+), 35 deletions(-) diff --git a/endorsed/src/org.apache.sis.feature/main/module-info.java b/endorsed/src/org.apache.sis.feature/main/module-info.java index b9f78b899c..2c55dac851 100644 --- a/endorsed/src/org.apache.sis.feature/main/module-info.java +++ b/endorsed/src/org.apache.sis.feature/main/module-info.java @@ -51,8 +51,8 @@ module org.apache.sis.feature { org.apache.sis.storage, org.apache.sis.storage.xml, org.apache.sis.storage.netcdf, +org.apache.sis.storage.shapefile, // In the "incubator" sub-project. org.apache.sis.portrayal, -org.apache.sis.storage.shapefile,// In the "incubator" sub-project. org.apache.sis.gui; // In the "optional" sub-project. exports org.apache.sis.geometry.wrapper to diff --git a/endorsed/src/org.apache.sis.util/main/module-info.java b/endorsed/src/org.apache.sis.util/main/module-info.java index ed334ac345..afebada7be 100644 --- a/endorsed/src/org.apache.sis.util/main/module-info.java +++ b/endorsed/src/org.apache.sis.util/main/module-info.java @@ -127,9 +127,9 @@ module org.apache.sis.util { org.apache.sis.storage.netcdf, org.apache.sis.storage.geotiff, org.apache.sis.storage.earthobservation, +org.apache.sis.storage.shapefile, // In the "incubator" sub-project. org.apache.sis.cql, // In the "incubator" sub-project. org.apache.sis.portrayal, -org.apache.sis.storage.shapefile, org.apache.sis.cloud.aws, org.apache.sis.console, org.apache.sis.gui, // In the "optional" sub-project. diff --git a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java index 3d371337a3..1420cef0e8 100644 --- a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java +++ b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java @@ -18,28 +18,28 @@ package org.apache.sis.storage.shapefile; import java.net.URI; import java.nio.file.Path; +import org.opengis.parameter.ParameterDescriptor; +import org.opengis.parameter.ParameterDescriptorGroup; import org.apache.sis.parameter.ParameterBuilder; import org.apache.sis.storage.DataStore; import org.apache.sis.storage.DataStoreException; import org.apache.sis.storage.DataStoreProvider; -import static org.apache.sis.storage.DataStoreProvider.LOCATION; import org.apache.sis.storage.ProbeResult; import org.apache.sis.storage.StorageConnector; -import org.opengis.parameter.ParameterDescriptor; -import org.opengis.parameter.ParameterDescriptorGroup; + /** * Shapefile format datastore provider. - * + * * @author Johann Sorel (Geomatys) * @see http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf;>ESRI Shapefile Specification */ public final class ShapefileProvider extends DataStoreProvider { public static final String NAME = "Shapefile"; - + public static final String MIME_TYPE = "application/x-shapefile"; - + /** * URI to the shp file. */ @@ -47,14 +47,14 @@ public final class ShapefileProvider extends DataStoreProvider { .addName(LOCATION) .setRequired(true) .create(URI.class, null); - + public static final ParameterDescriptorGroup PARAMETERS_DESCRIPTOR = new ParameterBuilder().addName(NAME).addName("ShapefileParameters").createGroup( PATH); - -public ShapefileProvider() { + +public ShapefileProvider() { } - + @Override public String getShortName()
(sis) branch geoapi-4.0 updated: Performance tuning: use the ByteBuffer API for copying block of data in `CopyFromBytes`. The previous code was assuming that the amount of bytes to copy is small (typi
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 The following commit(s) were added to refs/heads/geoapi-4.0 by this push: new ba3b3c577b Performance tuning: use the ByteBuffer API for copying block of data in `CopyFromBytes`. The previous code was assuming that the amount of bytes to copy is small (typically 1), but that assumption become wrong when the tile width is larger that the buffer capacity. This commit also increases the default buffer size. ba3b3c577b is described below commit ba3b3c577b239326e1a6aade3239ffe2227fcf06 Author: Martin Desruisseaux AuthorDate: Mon Nov 6 11:31:46 2023 +0100 Performance tuning: use the ByteBuffer API for copying block of data in `CopyFromBytes`. The previous code was assuming that the amount of bytes to copy is small (typically 1), but that assumption become wrong when the tile width is larger that the buffer capacity. This commit also increases the default buffer size. --- .../storage/geotiff/inflater/CopyFromBytes.java| 91 +- .../storage/geotiff/writer/CompressionChannel.java | 10 ++- .../apache/sis/io/stream/FileCacheByteChannel.java | 5 +- .../apache/sis/io/stream/RewindableLineReader.java | 2 +- .../org/apache/sis/storage/StorageConnector.java | 32 ++-- .../main/org/apache/sis/storage/csv/Store.java | 6 +- .../apache/sis/storage/wkt/FirstKeywordPeek.java | 4 +- 7 files changed, 78 insertions(+), 72 deletions(-) diff --git a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/inflater/CopyFromBytes.java b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/inflater/CopyFromBytes.java index 0ea6f0b333..003f3328c7 100644 --- a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/inflater/CopyFromBytes.java +++ b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/inflater/CopyFromBytes.java @@ -229,25 +229,20 @@ abstract class CopyFromBytes extends Inflater { super.uncompressRow(); int skipIndex = 0; final ByteBuffer source = input.buffer; -for (int i = chunksPerRow; --i > 0;) { // (chunksPerRow - 1) iterations. -int n = elementsPerChunk; -input.ensureBufferContains(n); -do bank.put(source.get()); // Number of iterations should be low (often 1). -while (--n != 0); -if (skipAfterChunks != null) { +for (int i = chunksPerRow; --i >= 0;) { +input.ensureBufferContains(elementsPerChunk); +final int limit = source.limit(); +source.limit(source.position() + elementsPerChunk); +bank.put(source); +source.limit(limit); +/* + * It is important to not skip `skipAfterChunks` sample values on the last iteration. + * OTherwise EOF could be thrown if the last pixel is in the last* column of the tile. + */ +if (i != 0 && skipAfterChunks != null) { skipIndex = skipAfterChunk(skipIndex); } } -/* - * Read the last chunk that was not read in above `for` loop, but without skipping `skipAfterChunks` - * sample values after. This is necessary for avoiding EOF if the last pixel to read is in the last - * column of the tile. The `elementsPerChunk` value here may be large if `chunksPerRow` is 1. - */ -input.ensureBufferContains(elementsPerChunk); -final int limit = source.limit(); -source.limit(source.position() + elementsPerChunk); -bank.put(source); -source.limit(limit); } } @@ -275,19 +270,15 @@ abstract class CopyFromBytes extends Inflater { super.uncompressRow(); int skipIndex = 0; final ByteBuffer source = input.buffer; -for (int i = chunksPerRow; --i > 0;) { -int n = elementsPerChunk; -input.ensureBufferContains(n * Short.BYTES); -do bank.put(source.getShort()); -while (--n != 0); -if (skipAfterChunks != null) { +final int n = elementsPerChunk * Short.BYTES; +for (int i = chunksPerRow; --i >= 0;) { +input.ensureBufferContains(n); +bank.put(source.asShortBuffer().limit(elementsPerChunk)); +source.position(source.position() + n); +if (i != 0 && skipAfterChunks != null) { skipIndex = skipAfterChunk(skipIndex); } } -final int n = elementsPerChunk * Short.BYTES; -