You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2017/02/23 09:24:33 UTC

svn commit: r1784096 - /sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java

Author: desruisseaux
Date: Thu Feb 23 09:24:33 2017
New Revision: 1784096

URL: http://svn.apache.org/viewvc?rev=1784096&view=rev
Log:
Remove the WGS84 and revert to the no-argument constructor instead, but we a Javadoc notice about the default datum choice.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java?rev=1784096&r1=1784095&r2=1784096&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] Thu Feb 23 09:24:33 2017
@@ -124,11 +124,6 @@ public class MilitaryGridReferenceSystem
     };
 
     /**
-     * Military Grid Reference System (MGRS) instance using the WGS84 datum.
-     */
-    public static final MilitaryGridReferenceSystem WGS84 = new MilitaryGridReferenceSystem(CommonCRS.WGS84);
-
-    /**
      * The datum to which to transform the coordinate before formatting the MGRS reference.
      * Only the datums enumerated in {@link CommonCRS} are currently supported.
      */
@@ -155,6 +150,17 @@ public class MilitaryGridReferenceSystem
     private transient short northOffset;
 
     /**
+     * Creates a new Military Grid Reference System (MGRS) using the default datum.
+     * The current Apache SIS version uses the {@linkplain CommonCRS#WGS84 WGS84} datum,
+     * but this choice may change in the future if there is a need to adapt to new MGRS specifications.
+     * For a more specific datum, consider using the {@link #MilitaryGridReferenceSystem(CommonCRS)} constructor.
+     */
+    public MilitaryGridReferenceSystem() {
+        datum = CommonCRS.WGS84;
+        avoidDatumChange = false;
+    }
+
+    /**
      * Creates a new Military Grid Reference System (MGRS) using the specified datum.
      * Only the datums enumerated in {@link CommonCRS} are currently supported.
      *