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 a2ecd9979befe31a431e72013a83ec3cae0ba347
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Tue Nov 29 19:52:29 2022 +0100

    Include version number in fallback CRS.
    It is a way to tell that those definitions do not use datum ensemble.
---
 .../java/org/apache/sis/referencing/EPSGFactoryFallback.java |  4 +++-
 .../java/org/apache/sis/referencing/StandardDefinitions.java | 12 ++++++++++--
 .../main/java/org/apache/sis/referencing/package-info.java   |  2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
index 12aab7b9df..af802a3bed 100644
--- 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
+++ 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
@@ -52,6 +52,7 @@ import org.apache.sis.internal.util.MetadataServices;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.util.URLs;
 import org.apache.sis.setup.InstallationResources;
+import org.apache.sis.util.SimpleInternationalString;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Debug;
@@ -65,7 +66,7 @@ import org.apache.sis.measure.Units;
  * in the {@link CRS#forCode(String)} method javadoc is always available.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.2
+ * @version 1.3
  * @since   0.7
  * @module
  */
@@ -120,6 +121,7 @@ final class EPSGFactoryFallback extends 
GeodeticAuthorityFactory
         if (authority == null) {
             final DefaultCitation c = new DefaultCitation(Citations.EPSG);
             
c.setTitle(Vocabulary.formatInternational(Vocabulary.Keys.SubsetOf_1, 
c.getTitle()));
+            c.setEdition(new 
SimpleInternationalString(StandardDefinitions.VERSION));
             authority = c;
         }
         return authority;
diff --git 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
index e85ed225a7..38c6e147a4 100644
--- 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
+++ 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
@@ -37,6 +37,7 @@ import org.opengis.referencing.crs.VerticalCRS;
 import org.opengis.referencing.operation.OperationMethod;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.util.NoSuchIdentifierException;
+import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.metadata.AxisNames;
 import org.apache.sis.internal.referencing.CoordinateOperations;
 import org.apache.sis.internal.referencing.provider.TransverseMercator;
@@ -75,11 +76,18 @@ import static 
org.apache.sis.internal.metadata.ReferencingServices.AUTHALIC_RADI
  * This class should not be loaded when a connection to an EPSG geodetic 
dataset is available.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.0
+ * @version 1.3
  * @since   0.4
  * @module
  */
 final class StandardDefinitions {
+    /**
+     * The EPSG database version that most closely match the fallback CRS.
+     * We refer to latest version of the 9.x series instead of more recent
+     * data because the fallback CRS does not use datum ensemble.
+     */
+    static final String VERSION = "9.9.1";
+
     /**
      * The EPSG code for Greenwich meridian.
      *
@@ -105,7 +113,7 @@ final class StandardDefinitions {
     private static Map<String,Object> properties(final int code, final String 
name, final String alias, final boolean world) {
         final Map<String,Object> map = new HashMap<>(8);
         if (code != 0) {
-            map.put(IDENTIFIERS_KEY, new NamedIdentifier(Citations.EPSG, 
String.valueOf(code)));
+            map.put(IDENTIFIERS_KEY, new NamedIdentifier(Citations.EPSG, 
Constants.EPSG, String.valueOf(code), VERSION, null));
         }
         map.put(NAME_KEY, new NamedIdentifier(Citations.EPSG, name));
         map.put(ALIAS_KEY, alias);                                      // May 
be null, which is okay.
diff --git 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
index 053d543b94..a5a1b17e80 100644
--- 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
+++ 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
@@ -94,7 +94,7 @@
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Guilhem Legal (Geomatys)
- * @version 1.1
+ * @version 1.3
  * @since   0.4
  * @module
  */

Reply via email to