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 2563f4abe541415da8c7a81576868cad17a128fa Merge: 8dbe7f3e64 62047abd7a Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Fri Aug 30 13:06:41 2024 +0200 Merge branch 'geoapi-4.0' into geoapi-3.1: - Partial upgrade for ISO 19111:2019 (not yet finished) - Make SQLStore more extensible for allowing usage by Geopackage - Two new formats in incubator: Geopackage and GIMI. buildSrc/build.gradle.kts | 4 +- .../apache/sis/buildtools/gradle/Conventions.java | 3 +- .../apache/sis/buildtools/gradle/Dependency.java | 5 + .../sis/buildtools/gradle/ModularCompilation.java | 2 +- .../org/apache/sis/buildtools/maven/Generator.java | 52 +- .../apache/sis/coverage/grid/GridDerivation.java | 1 + .../sis/coverage/privy/ColorModelFactory.java | 2 - .../sis/feature/builder/AttributeTypeBuilder.java | 2 +- .../apache/sis/geometry/wrapper/GeometryType.java | 178 +- .../apache/sis/geometry/wrapper/esri/Factory.java | 2 +- .../apache/sis/geometry/wrapper/j2d/Factory.java | 2 +- .../sis/geometry/wrapper/GeometryTypeTest.java | 25 +- .../org.apache.sis.metadata/main/module-info.java | 1 + .../org/apache/sis/metadata/iso/ISOMetadata.java | 2 +- .../iso/quality/DefaultQuantitativeResult.java | 2 +- .../apache/sis/metadata/sql/MetadataWriter.java | 14 +- .../org/apache/sis/metadata/sql/privy/Dialect.java | 81 +- .../apache/sis/metadata/sql/privy/SQLBuilder.java | 40 + .../sis/metadata/sql/privy/SQLUtilities.java | 22 +- .../sis/metadata/sql/privy/ScriptRunner.java | 6 +- .../apache/sis/metadata/sql/privy/Supports.java | 74 + .../org/apache/sis/util/iso/DefaultScopedName.java | 5 +- .../sis/metadata/sql/IdentifierGeneratorTest.java | 2 +- .../org/apache/sis/metadata/sql/TestDatabase.java | 10 +- .../gazetteer/ReferencingByIdentifiers.java | 6 +- .../main/module-info.java | 1 + .../org/apache/sis/geometry/ArrayEnvelope.java | 22 +- .../org/apache/sis/geometry/DirectPosition1D.java | 2 +- .../apache/sis/geometry/GeneralDirectPosition.java | 6 +- .../sis/parameter/DefaultParameterDescriptor.java | 3 + .../parameter/DefaultParameterDescriptorGroup.java | 4 + .../org/apache/sis/parameter/TensorValues.java | 6 + .../apache/sis/referencing/crs/AbstractCRS.java | 2 + .../sis/referencing/crs/AbstractDerivedCRS.java | 6 +- .../sis/referencing/crs/AbstractSingleCRS.java | 6 +- .../sis/referencing/crs/DefaultCompoundCRS.java | 6 +- .../sis/referencing/crs/DefaultDerivedCRS.java | 4 +- .../sis/referencing/crs/DefaultProjectedCRS.java | 4 +- .../org/apache/sis/referencing/cs/AbstractCS.java | 4 + .../cs/DefaultCoordinateSystemAxis.java | 2 + .../sis/referencing/datum/AbstractDatum.java | 59 +- .../sis/referencing/datum/BursaWolfParameters.java | 20 +- .../referencing/datum/DefaultDatumEnsemble.java | 5 +- .../sis/referencing/datum/DefaultEllipsoid.java | 4 + .../referencing/datum/DefaultGeodeticDatum.java | 156 +- .../sis/referencing/datum/DefaultImageDatum.java | 4 + .../referencing/datum/DefaultPrimeMeridian.java | 4 + .../referencing/datum/DefaultTemporalDatum.java | 4 + .../referencing/datum/DefaultVerticalDatum.java | 87 + .../apache/sis/referencing/datum/PseudoDatum.java | 21 +- .../sis/referencing/datum/TimeDependentBWP.java | 16 +- .../referencing/factory/GeodeticObjectFactory.java | 71 +- .../referencing/factory/sql/EPSGDataAccess.java | 14 +- .../operation/AbstractCoordinateOperation.java | 2 + .../operation/DefaultConcatenatedOperation.java | 6 +- .../operation/DefaultOperationMethod.java | 2 + .../operation/DefaultPassThroughOperation.java | 6 +- .../operation/matrix/GeneralMatrix.java | 2 +- .../operation/matrix/NonSquareMatrix.java | 2 +- .../operation/transform/ConcatenatedTransform.java | 2 +- .../operation/transform/CopyTransform.java | 2 +- .../operation/transform/DatumShiftTransform.java | 6 +- .../transform/EllipsoidToCentricTransform.java | 6 +- .../transform/ExponentialTransform1D.java | 4 +- .../operation/transform/InterpolatedTransform.java | 6 +- .../operation/transform/LinearTransform1D.java | 4 +- .../operation/transform/MolodenskyTransform.java | 6 +- .../operation/transform/PassThroughTransform.java | 6 +- .../operation/transform/PoleRotation.java | 4 + .../operation/transform/PowerTransform1D.java | 4 +- .../operation/transform/ProjectiveTransform.java | 4 +- .../operation/transform/ScaleTransform.java | 4 +- .../transform/SpecializableTransform.java | 9 +- .../operation/transform/TranslationTransform.java | 4 +- .../operation/transform/WraparoundTransform.java | 4 + .../main/org/apache/sis/storage/landsat/Band.java | 2 +- .../apache/sis/storage/landsat/LandsatStore.java | 7 +- .../apache/sis/storage/landsat/package-info.java | 2 +- .../apache/sis/storage/geotiff/GeoTiffStore.java | 6 +- .../sis/storage/geotiff/GeoTiffStoreProvider.java | 8 +- .../org/apache/sis/storage/geotiff/Writer.java | 5 + .../apache/sis/storage/geotiff/package-info.java | 3 +- .../sis/storage/geotiff/spi/SchemaModifier.java | 2 +- .../storage/geotiff/writer/CompressionChannel.java | 6 +- .../sis/storage/geotiff/writer/PixelChannel.java | 1 + .../storage/geotiff/writer/PredictorChannel.java | 1 + .../org/apache/sis/storage/geotiff/writer/ZIP.java | 1 + .../org/apache/sis/storage/netcdf/NetcdfStore.java | 7 +- .../apache/sis/storage/netcdf/package-info.java | 2 +- .../main/module-info.java | 24 +- .../org/apache/sis/storage/sql/DataAccess.java | 338 +++ .../apache/sis/storage/sql/ResourceDefinition.java | 47 +- .../main/org/apache/sis/storage/sql/SQLStore.java | 503 +++- .../apache/sis/storage/sql/SQLStoreProvider.java | 16 +- .../apache/sis/storage/sql/SimpleFeatureStore.java | 168 ++ .../apache/sis/storage/sql/feature/Analyzer.java | 172 +- .../sis/storage/sql/feature/CRSEncoding.java} | 28 +- .../apache/sis/storage/sql/feature/Database.java | 507 ++-- .../sis/storage/sql/feature/FeatureAnalyzer.java | 3 +- .../sis/storage/sql/feature/FeatureIterator.java | 14 +- .../sis/storage/sql/feature/FeatureStream.java | 11 +- .../sis/storage/sql/feature/GeometryGetter.java | 4 +- .../storage/sql/feature/GeometryTypeEncoding.java | 56 + .../sis/storage/sql/feature/InfoStatements.java | 729 +++-- .../sis/storage/sql/feature/QueryAnalyzer.java | 2 +- .../sis/storage/sql/feature/SchemaModifier.java | 2 +- .../sis/storage/sql/feature/SpatialSchema.java | 212 ++ .../org/apache/sis/storage/sql/feature/Table.java | 5 +- .../sis/storage/sql/feature/TableAnalyzer.java | 1 - .../sis/storage/sql/feature/ValueGetter.java | 6 +- .../org/apache/sis/storage/sql/package-info.java | 32 +- .../sis/storage/sql/postgis/ExtendedInfo.java | 7 +- .../sis/storage/sql/postgis/ExtentEstimator.java | 2 +- .../apache/sis/storage/sql/postgis/Postgres.java | 42 +- .../org/apache/sis/util/stream/DeferredStream.java | 64 +- .../org/apache/sis/storage/sql/DataAccessTest.java | 69 + .../org/apache/sis/storage/sql/SQLStoreTest.java | 45 +- .../storage/sql/feature/InfoStatementsTest.java | 161 ++ .../sql/feature/SelectionClauseWriterTest.java | 2 +- .../sql/feature/TemporalValueGetterTest.java | 2 +- .../sis/storage/sql/postgis/PostgresTest.java | 4 +- .../org.apache.sis.storage/main/module-info.java | 4 + .../apache/sis/io/stream/InternalOptionKey.java | 25 + .../main/org/apache/sis/storage/DataStore.java | 22 +- .../org/apache/sis/storage/StorageConnector.java | 91 +- .../main/org/apache/sis/storage/URLDataSource.java | 198 ++ .../org/apache/sis/storage/WritableAggregate.java | 2 +- .../apache/sis/storage/base/MetadataFetcher.java | 126 +- .../apache/sis/storage/base/TiledGridCoverage.java | 18 +- .../org/apache/sis/storage/internal/Resources.java | 5 + .../sis/storage/internal/Resources.properties | 1 + .../sis/storage/internal/Resources_fr.properties | 1 + .../src/org.apache.sis.util/main/module-info.java | 1 + .../main/org/apache/sis/util/privy/Constants.java | 2 +- .../org/apache/sis/test/TestConfiguration.java | 18 +- geoapi/snapshot | 2 +- incubator/build.gradle.kts | 41 + .../org.apache.sis.storage.DataStoreProvider | 4 + .../main/module-info.java | 57 + .../org/apache/sis/storage/geopackage/Content.java | 466 ++++ .../sis/storage/geopackage/ContentHandler.java | 91 + .../sis/storage/geopackage/ContentWriter.java | 232 ++ .../org/apache/sis/storage/geopackage/Core.sql | 126 + .../sis/storage/geopackage/Extension Metadata.sql | 38 + .../sis/storage/geopackage/Extension Schema.sql | 40 + .../Extension Tiled Gridded Coverage Data.sql | 47 + .../apache/sis/storage/geopackage/GpkgStore.java | 456 +++ .../sis/storage/geopackage/GpkgStoreProvider.java | 284 ++ .../apache/sis/storage/geopackage/Initializer.java | 178 ++ .../sis/storage/geopackage/package-info.java | 22 +- .../apache/sis/storage/geopackage/FeatureSet.sql | 164 ++ .../storage/geopackage/GpkgStoreProviderTest.java | 32 +- .../sis/storage/geopackage/GpkgStoreTest.java | 338 +++ .../conformance/CoreConformanceTest.java | 219 ++ .../org.apache.sis.storage.DataStoreProvider | 4 + ...org.apache.sis.storage.gimi.isobmff.BoxRegistry | 8 + .../main/module-info.java | 25 +- .../org/apache/sis/storage/gimi/GimiProvider.java | 108 + .../org/apache/sis/storage/gimi/GimiStore.java | 177 ++ .../main/org/apache/sis/storage/gimi/GimiTile.java | 66 + .../apache/sis/storage/gimi/GimiTileMatrix.java | 116 + .../apache/sis/storage/gimi/GimiTileMatrixSet.java | 72 + .../org/apache/sis/storage/gimi/GimiUtils.java | 52 + .../main/org/apache/sis/storage/gimi/Item.java | 136 + .../org/apache/sis/storage/gimi/ResourceGrid.java | 134 + .../apache/sis/storage/gimi/ResourceImageJpeg.java | 61 + .../storage/gimi/ResourceImageUncompressed.java | 181 ++ .../apache/sis/storage/gimi/ResourcePyramid.java | 145 + .../apache/sis/storage/gimi/ResourceUnknown.java | 34 +- .../storage/gimi/internal/MatrixGridRessource.java | 137 + .../sis/storage/gimi/internal/ScaleSortedMap.java | 104 + .../sis/storage/gimi/internal/StringUtilities.java | 63 + .../sis/storage/gimi/internal/TileMatrices.java | 60 + .../org/apache/sis/storage/gimi/isobmff/Box.java | 278 ++ .../sis/storage/gimi/isobmff/BoxRegistry.java | 64 + .../apache/sis/storage/gimi/isobmff/FullBox.java | 23 +- .../sis/storage/gimi/isobmff/ISOBMFFReader.java | 157 ++ .../apache/sis/storage/gimi/isobmff/gimi/GIMI.java | 65 + .../gimi/isobmff/gimi/ModelTiePointProperty.java | 63 + .../isobmff/gimi/ModelTransformationProperty.java | 34 +- .../gimi/isobmff/gimi/WellKnownText2Property.java | 27 +- .../gimi/isobmff/iso14496_10/ContentDescribes.java | 19 +- .../gimi/isobmff/iso14496_10/ISO14496_10.java | 60 + .../isobmff/iso14496_12/ColourInformation.java | 55 + .../gimi/isobmff/iso14496_12/CombinaisonType.java | 33 +- .../gimi/isobmff/iso14496_12/EntityToGroup.java | 28 +- .../gimi/isobmff/iso14496_12/ExtendedType.java | 25 +- .../gimi/isobmff/iso14496_12/Extension.java | 19 +- .../isobmff/iso14496_12/FDItemInfoExtension.java | 28 +- .../storage/gimi/isobmff/iso14496_12/FileType.java | 16 +- .../gimi/isobmff/iso14496_12/FreeSpace.java | 19 +- .../gimi/isobmff/iso14496_12/GeneralType.java | 52 + .../gimi/isobmff/iso14496_12/GroupList.java | 23 +- .../gimi/isobmff/iso14496_12/HandlerReference.java | 33 +- .../gimi/isobmff/iso14496_12/ISO14496_12.java | 114 + .../isobmff/iso14496_12/IdentifiedMediaData.java | 49 + .../storage/gimi/isobmff/iso14496_12/ItemData.java | 28 +- .../gimi/isobmff/iso14496_12/ItemFullProperty.java | 16 +- .../storage/gimi/isobmff/iso14496_12/ItemInfo.java | 42 +- .../gimi/isobmff/iso14496_12/ItemInfoEntry.java | 74 + .../gimi/isobmff/iso14496_12/ItemLocation.java | 155 ++ .../gimi/isobmff/iso14496_12/ItemProperties.java | 23 +- .../gimi/isobmff/iso14496_12/ItemProperty.java | 16 +- .../iso14496_12/ItemPropertyAssociation.java | 68 + .../isobmff/iso14496_12/ItemPropertyContainer.java | 23 +- .../gimi/isobmff/iso14496_12/ItemReference.java | 49 + .../gimi/isobmff/iso14496_12/MediaData.java | 28 +- .../sis/storage/gimi/isobmff/iso14496_12/Meta.java | 24 +- .../storage/gimi/isobmff/iso14496_12/Movie.java | 24 +- .../gimi/isobmff/iso14496_12/MovieHeader.java | 30 +- .../gimi/isobmff/iso14496_12/OriginalFileType.java | 23 +- .../gimi/isobmff/iso14496_12/PrimaryItem.java | 32 +- .../iso14496_12/ProgressiveDownloadInfo.java | 28 +- .../iso14496_12/SingleItemTypeReference.java | 49 + .../iso14496_12/SingleItemTypeReferenceLarge.java | 26 +- .../storage/gimi/isobmff/iso14496_12/Track.java | 24 +- .../gimi/isobmff/iso14496_12/TrackHeader.java | 28 +- .../gimi/isobmff/iso23001_17/ChromaLocation.java | 27 +- .../isobmff/iso23001_17/ComponentDefinition.java | 67 + .../gimi/isobmff/iso23001_17/ComponentPalette.java | 57 + .../iso23001_17/ComponentPatternDefinition.java | 49 + .../iso23001_17/ComponentReferenceLevel.java | 27 +- .../iso23001_17/DepthMappingInformation.java | 27 +- .../isobmff/iso23001_17/DisparityInformation.java | 27 +- .../iso23001_17/FieldInterlaceProperty.java | 27 +- .../isobmff/iso23001_17/FieldInterlaceType.java | 27 +- .../iso23001_17/FramePackingInformation.java | 27 +- .../gimi/isobmff/iso23001_17/ISO23001_17.java | 92 + .../iso23001_17/PolarizationPatternDefinition.java | 27 +- .../isobmff/iso23001_17/SensorBadPixelsMap.java | 27 +- .../iso23001_17/SensorNonUniformityCorrection.java | 27 +- .../gimi/isobmff/iso23001_17/TAIClockInfo.java | 48 + .../gimi/isobmff/iso23001_17/TAITimeStamp.java | 45 + .../iso23001_17/UncompressedFrameConfig.java | 92 + .../isobmff/iso23008_12/DerivedImageReference.java | 19 +- .../gimi/isobmff/iso23008_12/ISO23008_12.java | 71 + .../iso23008_12/ImagePyramidEntityGroup.java | 62 + .../isobmff/iso23008_12/ImageSpatialExtents.java | 44 +- .../iso23008_12/PixelInformationProperty.java | 30 +- .../iso23008_12/UserDescriptionProperty.java | 33 +- .../org/apache/sis/storage/gimi/package-info.java | 14 +- .../org/apache/sis/storage/gimi/StoreTest.java | 17 +- .../main/module-info.java | 15 +- .../main/org/apache/sis/storage/gsf/Attitude.java | 89 + .../main/org/apache/sis/storage/gsf/Comment.java | 63 + .../main/org/apache/sis/storage/gsf/DataID.java | 69 + .../main/org/apache/sis/storage/gsf/GSF.java | 1786 ++++++++++++ .../apache/sis/storage/gsf/GSFRecordReader.java | 88 + .../apache/sis/storage/gsf/HVNavigationError.java | 89 + .../main/org/apache/sis/storage/gsf/Header.java | 40 +- .../main/org/apache/sis/storage/gsf/History.java | 105 + .../apache/sis/storage/gsf/NavigationError.java | 96 + .../main/org/apache/sis/storage/gsf/Position.java | 74 + .../apache/sis/storage/gsf/PositionOffsets.java | 86 + .../sis/storage/gsf/ProcessingParameters.java | 65 + .../main/org/apache/sis/storage/gsf/Records.java | 146 + .../apache/sis/storage/gsf/SBSensorSpecific.java | 110 + .../main/org/apache/sis/storage/gsf/SVP.java | 90 + .../org/apache/sis/storage/gsf/ScaleFactors.java | 72 + .../main/org/apache/sis/storage/gsf/ScaleInfo.java | 85 + .../apache/sis/storage/gsf/SensorParameters.java | 106 + .../org/apache/sis/storage/gsf/SensorSpecific.java | 108 + .../org/apache/sis/storage/gsf/SingleBeamPing.java | 216 ++ .../org/apache/sis/storage/gsf/StructClass.java | 219 ++ .../org/apache/sis/storage/gsf/SwathBathyPing.java | 354 +++ .../apache/sis/storage/gsf/SwathBathySummary.java | 94 + .../main/org/apache/sis/storage/gsf/TimeSpec.java | 60 + .../org/apache/sis/storage/gsf/package-info.java | 14 +- .../sis/storage/gsf/specific/BDBSpecific.java | 133 + .../sis/storage/gsf/specific/CmpSassSpecific.java | 73 + .../sis/storage/gsf/specific/DeltaTSpecific.java | 405 +++ .../sis/storage/gsf/specific/EM100Specific.java | 152 + .../sis/storage/gsf/specific/EM121ASpecific.java | 454 +++ .../sis/storage/gsf/specific/EM12Specific.java | 356 +++ .../storage/gsf/specific/EM3ImagerySpecific.java | 488 ++++ .../sis/storage/gsf/specific/EM3RawSpecific.java | 875 ++++++ .../sis/storage/gsf/specific/EM3RawTxSector.java | 488 ++++ .../sis/storage/gsf/specific/EM3RunTime.java | 1313 +++++++++ .../sis/storage/gsf/specific/EM3Specific.java | 539 ++++ .../storage/gsf/specific/EM4ImagerySpecific.java | 670 +++++ .../sis/storage/gsf/specific/EM4Specific.java | 832 ++++++ .../sis/storage/gsf/specific/EM4TxSector.java | 533 ++++ .../sis/storage/gsf/specific/EM950Specific.java | 320 +++ .../sis/storage/gsf/specific/EMPUStatus.java | 356 +++ .../apache/sis/storage/gsf/specific/EMRunTime.java | 1531 ++++++++++ .../sis/storage/gsf/specific/EchotracSpecific.java | 184 ++ .../sis/storage/gsf/specific/ElacMkIISpecific.java | 364 +++ .../storage/gsf/specific/GeoSwathPlusSpecific.java | 1212 ++++++++ .../sis/storage/gsf/specific/KMALLExtraDet.java | 218 ++ .../storage/gsf/specific/KMALLImagerySpecific.java | 126 + .../sis/storage/gsf/specific/KMALLSpecific.java | 988 +++++++ .../sis/storage/gsf/specific/KMALLTxSector.java | 670 +++++ .../gsf/specific/Klein5410BssImagerySpecific.java | 297 ++ .../storage/gsf/specific/Klein5410BssSpecific.java | 851 ++++++ .../sis/storage/gsf/specific/MGD77Specific.java | 320 +++ .../sis/storage/gsf/specific/NOSHDBSpecific.java | 140 + .../gsf/specific/R2SonicImagerySpecific.java | 1355 +++++++++ .../sis/storage/gsf/specific/R2SonicSpecific.java | 1568 +++++++++++ .../gsf/specific/Reson7100ImagerySpecific.java | 173 ++ .../storage/gsf/specific/Reson7100Specific.java | 2267 +++++++++++++++ .../gsf/specific/Reson8100ImagerySpecific.java | 127 + .../storage/gsf/specific/Reson8100Specific.java | 1301 +++++++++ .../gsf/specific/ResonTSeriesImagerySpecific.java | 173 ++ .../storage/gsf/specific/ResonTSeriesSpecific.java | 2923 ++++++++++++++++++++ .../sis/storage/gsf/specific/SBAmpSpecific.java | 320 +++ .../sis/storage/gsf/specific/SBBDBSpecific.java | 444 +++ .../storage/gsf/specific/SBEchotracSpecific.java | 309 +++ .../sis/storage/gsf/specific/SBMGD77Specific.java | 400 +++ .../sis/storage/gsf/specific/SBNOSHDBSpecific.java | 218 ++ .../storage/gsf/specific/SBNavisoundSpecific.java | 173 ++ .../storage/gsf/specific/SeaBat8101Specific.java | 850 ++++++ .../sis/storage/gsf/specific/SeaBatIISpecific.java | 490 ++++ .../sis/storage/gsf/specific/SeaBatSpecific.java | 320 +++ .../storage/gsf/specific/SeaBeam2112Specific.java | 524 ++++ .../sis/storage/gsf/specific/SeabeamSpecific.java | 94 + .../sis/storage/gsf/specific/SeamapSpecific.java | 521 ++++ .../sis/storage/gsf/specific/TypeIIISpecific.java | 319 +++ .../test/org/apache/sis/storage/gsf/StoreTest.java | 17 +- .../apache/sis/storage/shapefile/dbf/DBFField.java | 22 +- .../sis/storage/shapefile/dbf/DBFHeader.java | 3 +- netbeans-project/ivy.xml | 17 +- netbeans-project/nbproject/project.properties | 9 + netbeans-project/nbproject/project.xml | 1 + optional/build.gradle.kts | 95 +- .../apache/sis/gui/coverage/CoverageCanvas.java | 4 +- .../main/META-INF/NOTICE | 1 + .../org.apache.sis.setup.InstallationResources | 4 + .../main/module-info.java | 43 + .../sis/resources/embedded/EmbeddedResources.java | 153 + .../sis/resources/embedded/package-info.java | 35 + .../resources/embedded/EmbeddedResourcesTest.java | 140 + .../apache/sis/resources/embedded/Generator.java | 222 ++ .../main/META-INF/NOTICE | 10 + .../org.apache.sis.setup.InstallationResources | 4 + .../main/module-info.java | 41 + .../sis/referencing/factory/sql/epsg/.gitignore | 7 + .../sis/referencing/factory/sql/epsg/README.md | 23 + .../factory/sql/epsg/ScriptProvider.java | 104 + .../referencing/factory/sql/epsg/package-info.java | 37 + .../factory/sql/epsg/DataScriptFormatter.java | 3 +- .../factory/sql/epsg/DataScriptFormatterTest.java | 2 +- .../referencing/factory/sql/epsg/DebugTools.sql | 0 .../sis/referencing/factory/sql/epsg/README.md | 3 +- .../factory/sql/epsg/ScriptProviderTest.java | 91 + settings.gradle.kts | 20 +- 345 files changed, 46187 insertions(+), 1670 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/AbstractDatum.java index e0f39c219d,a49256eaae..7fc8ec1690 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/AbstractDatum.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/AbstractDatum.java @@@ -47,8 -47,14 +47,9 @@@ import static org.apache.sis.util.Utili import static org.apache.sis.util.collection.Containers.property; // Specific to the geoapi-3.1 and geoapi-4.0 branches: + import org.opengis.referencing.datum.DynamicReferenceFrame; import org.opengis.metadata.Identifier; -// Specific to the geoapi-4.0 branch: -import org.opengis.annotation.UML; -import static org.opengis.annotation.Obligation.*; -import static org.opengis.annotation.Specification.*; - /** * Specifies the relationship of a Coordinate System to the earth. @@@ -322,21 -312,17 +323,32 @@@ public class AbstractDatum extends Abst return Optional.ofNullable(anchorEpoch); } + /** + * The time after which this datum definition is valid. + * + * @return the time after which this datum definition is valid, or {@code null} if none. + * + * @deprecated Since ISO 19111:2019, replaced by {@link #getAnchorEpoch()}. + */ + @Override + @Deprecated(since = "1.5") + @XmlSchemaType(name = "date") + @XmlElement(name = "realizationEpoch") + public Date getRealizationEpoch() { + return Datum.super.getRealizationEpoch(); + } + + /** + * Returns the frame reference epoch if this datum is dynamic, or {@code null} if this datum is static. + * This method is overridden with public access in Apache SIS {@code Dynamic} subclasses. + * The default implementation should be suitable for non-SIS implementations. + * + * @return the reference epoch if this datum is dynamic, or {@code null} if this datum is static. + */ + Temporal getFrameReferenceEpoch() { + return (this instanceof DynamicReferenceFrame) ? ((DynamicReferenceFrame) this).getFrameReferenceEpoch() : null; + } + /** * Returns the date on which the datum definition was published. * diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java index 7c3ccf465b,7240e83da7..0ea312039c --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java @@@ -32,11 -33,9 +33,12 @@@ import org.apache.sis.referencing.privy import org.apache.sis.referencing.internal.VerticalDatumTypes; import org.apache.sis.metadata.privy.ImplementationHelper; +// Specific to the main and geoapi-3.1 branches: +import org.opengis.referencing.datum.VerticalDatumType; + // Specific to the geoapi-3.1 and geoapi-4.0 branches: import java.util.Optional; + import org.opengis.referencing.datum.DynamicReferenceFrame; import org.opengis.referencing.datum.RealizationMethod; import org.opengis.metadata.Identifier; @@@ -236,25 -213,87 +238,106 @@@ public class DefaultVerticalDatum exten return Optional.ofNullable(method); } + /** + * Returns the type of this vertical datum. + * + * <h4>Historical note:</h4> + * This property was defined in the ISO 19111 specification published in 2003, + * but removed from the revision published 2007. + * This property provides an information similar to the {@linkplain #getAnchorPoint() anchor definition}, + * but in a programmatic way more suitable to coordinate transformation engines. + * + * @return the type of this vertical datum. + * + * @deprecated As of ISO 19111:2019, the {@code VerticalDatumType} argument is replaced by {@code RealizationMethod}. + */ + @Override + @Deprecated(since = "2.0") // Temporary version number until this branch is released. + public VerticalDatumType getVerticalDatumType() { + return type; + } + + /** + * A vertical reference frame in which some of the defining parameters have time dependency. + * The parameter values are valid at the time given by the + * {@linkplain #getFrameReferenceEpoch() frame reference epoch}. + * + * @author Martin Desruisseaux (Geomatys) + * @version 1.5 + * @since 1.5 + */ + public static class Dynamic extends DefaultVerticalDatum implements DynamicReferenceFrame { + /** + * For cross-version compatibility. + */ + private static final long serialVersionUID = -2047994195060747008L; + + /** + * The epoch to which the definition of the dynamic reference frame is referenced. + */ + @SuppressWarnings("serial") // Standard Java implementations are serializable. + private final Temporal frameReferenceEpoch; + + /** + * Creates a dynamic reference frame from the given properties. + * See super-class constructor for more information. + * + * @param properties the properties to be given to the identified object. + * @param epoch the epoch to which the definition of the dynamic reference frame is referenced. + */ + public Dynamic(Map<String,?> properties, RealizationMethod method, Temporal epoch) { + super(properties, method); + frameReferenceEpoch = Objects.requireNonNull(epoch); + } + + /** + * Creates a new datum with the same values as the specified datum, which must be dynamic. + * + * @param datum the datum to copy. + * @param method the realization method (geoid, tidal, <i>etc.</i>), or {@code null} if unspecified. + * @throws ClassCastException if the given datum is not an instance of {@link DynamicReferenceFrame}. + * + * @see #castOrCopy(VerticalDatum) + */ + protected Dynamic(final VerticalDatum datum) { + super(datum); + frameReferenceEpoch = Objects.requireNonNull(((DynamicReferenceFrame) datum).getFrameReferenceEpoch()); + } + + /** + * Returns the epoch to which the coordinates of stations defining the dynamic reference frame are referenced. + * The type of the returned object depends on the epoch accuracy and the calendar in use. + * It may be merely a {@link java.time.Year}. + * + * @return the epoch to which the definition of the dynamic reference frame is referenced. + */ + @Override + public Temporal getFrameReferenceEpoch() { + return frameReferenceEpoch; + } + + /** + * Compares the specified object with this datum for equality. + * + * @hidden because nothing new to said. + */ + @Override + public boolean equals(final Object object, final ComparisonMode mode) { + return super.equals(object) && (mode != ComparisonMode.STRICT || + frameReferenceEpoch.equals(((Dynamic) object).frameReferenceEpoch)); + } + + /** + * Invoked by {@code hashCode()} for computing the hash code when first needed. + * + * @hidden because nothing new to said. + */ + @Override + protected long computeHashCode() { + return super.computeHashCode() + 31 * frameReferenceEpoch.hashCode(); + } + } + /** * Compares this vertical datum with the specified object for equality. * @@@ -263,9 -302,10 +346,11 @@@ * {@link ComparisonMode#IGNORE_METADATA IGNORE_METADATA} for comparing only * properties relevant to coordinate transformations. * @return {@code true} if both objects are equal. + * + * @hidden because nothing new to said. */ @Override + @SuppressWarnings("deprecation") public boolean equals(final Object object, final ComparisonMode mode) { if (object == this) { return true; // Slight optimization. diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/PseudoDatum.java index 1edef9d645,7c4cfef555..eed9024fad --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/PseudoDatum.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/PseudoDatum.java @@@ -433,10 -431,11 +433,11 @@@ public abstract class PseudoDatum<D ext * Returns the primary name by which the datum ensemble is identified. * * @return {@code ensemble.getName()}. - * @hidden + * + * @hidden because nothing new to said. */ @Override - public Identifier getName() { + public ReferenceIdentifier getName() { return ensemble.getName(); } @@@ -455,10 -455,11 +457,11 @@@ * Returns an identifier which references elsewhere the datum ensemble information. * * @return {@code ensemble.getIdentifiers()}. - * @hidden + * + * @hidden because nothing new to said. */ @Override - public Set<Identifier> getIdentifiers() { + public Set<ReferenceIdentifier> getIdentifiers() { return ensemble.getIdentifiers(); } @@@ -645,10 -575,11 +649,11 @@@ check: if (it.hasNext()) * Returns comments on or information about the datum ensemble. * * @return {@code ensemble.getRemarks()}. - * @hidden + * + * @hidden because nothing new to said. */ @Override - public Optional<InternationalString> getRemarks() { + public InternationalString getRemarks() { return ensemble.getRemarks(); } diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java index 4b07d1abfd,623e89a925..098500a7cf --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java @@@ -1074,33 -1058,37 +1108,64 @@@ public class GeodeticObjectFactory exte return unique("createVerticalDatum", datum); } + /** + * Creates a vertical datum from an enumerated type value. + * The default implementation creates a {@link DefaultVerticalDatum} instance. + * + * @param properties name and other properties to give to the new object. + * @param type the type of this vertical datum (often geoidal). + * @throws FactoryException if the object creation failed. + * + * @see DefaultVerticalDatum#DefaultVerticalDatum(Map, VerticalDatumType) + * @see GeodeticAuthorityFactory#createVerticalDatum(String) + * + * @deprecated As of ISO 19111:2019, the {@code VerticalDatumType} argument is replaced by {@code RealizationMethod}. + */ + @Override + @Deprecated(since = "2.0") // Temporary version number until this branch is released. + public VerticalDatum createVerticalDatum(final Map<String,?> properties, + final VerticalDatumType type) throws FactoryException + { + final DefaultVerticalDatum datum; + try { + datum = new DefaultVerticalDatum(complete(properties), type); + } catch (IllegalArgumentException exception) { + throw new InvalidGeodeticParameterException(exception); + } + return unique("createVerticalDatum", datum); + } + + /** + * Creates a dynamic vertical datum from a realization method and a frame reference epoch. + * The arguments are the same as for the {@linkplain #createVerticalDatum(Map, RealizationMethod) + * static datum}, with the addition of a mandatory frame reference epoch. + * The returned object implements the {@link DynamicReferenceFrame} interface. + * + * @param properties name and other properties to give to the new object. + * @param method the realization method of the vertical datum, or {@code null} if none. + * @param epoch the epoch to which the definition of the dynamic reference frame is referenced. + * @throws FactoryException if the object creation failed. + * + * @see DefaultVerticalDatum.Dynamic#Dynamic(Map, RealizationMethod, Temporal) + * @see GeodeticAuthorityFactory#createVerticalDatum(String) + * + * @since 2.0 (temporary version number until this branch is released) + */ + @Override + public VerticalDatum createVerticalDatum(final Map<String,?> properties, + final RealizationMethod method, + final Temporal epoch) + throws FactoryException + { + final DefaultVerticalDatum datum; + try { + datum = new DefaultVerticalDatum.Dynamic(complete(properties), method, epoch); + } catch (IllegalArgumentException exception) { + throw new InvalidGeodeticParameterException(exception); + } + return unique("createVerticalDatum", datum); + } + /** * Creates a vertical coordinate system. * This coordinate system can be used with vertical and derived CRS. diff --cc geoapi/snapshot index 83b14aa703,367366e67f..99dad58954 --- a/geoapi/snapshot +++ b/geoapi/snapshot @@@ -1,1 -1,1 +1,1 @@@ - Subproject commit 83b14aa7031624172b5ab29b0bc534a588ec1ec5 -Subproject commit 367366e67f7f860e100e0e8dafa3a03f34162e71 ++Subproject commit 99dad589544973864a78b982a48766b2c6a0e872