sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1707472 - in /sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis: parameter/ referencing/crs/ referencing/operation/
Date Thu, 08 Oct 2015 10:53:42 GMT
Author: desruisseaux
Date: Thu Oct  8 10:53:42 2015
New Revision: 1707472

URL: http://svn.apache.org/viewvc?rev=1707472&view=rev
Log:
Take advantage of xlink:href in some test files.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/DuplicatedParameters.xml
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/ParameterValueGroup.xml
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Conversion.xml
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Transformation.xml

Modified: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/DuplicatedParameters.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/DuplicatedParameters.xml?rev=1707472&r1=1707471&r2=1707472&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/DuplicatedParameters.xml
(original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/DuplicatedParameters.xml
Thu Oct  8 10:53:42 2015
@@ -65,14 +65,12 @@
       <gml:name codeSpace="EPSG">Mercator (variant A)</gml:name>
       <gml:name codeSpace="OGC">Mercator_1SP</gml:name>
       <gml:minimumOccurs>0</gml:minimumOccurs>
-
-      <!-- Parameters below this point are duplication of the parameters already defined
above.
-           We could use xlink:href attribute for avoiding duplication (this is the purpose
of
-           the ParameterValueGroup.xml test file), but in this file we intentionally keep
the
-           duplication in order to test Apache SIS capability to replace duplicated instances
-           by unique instances. Note that we have to change the gml:id attribute values used
-           below for avoiding collisions with the gml:id attribute used in above parameters.
-->
-
+      <!--
+        Parameters below this point are duplications of the parameters already defined above.
+        In this file we intentionally do this duplication in order to test SIS capability
to
+        replace duplicated instances by unique instances.   The better alternative, which
is
+        to use xlink:href attributes, is tested in a separated file: ParameterValueGroup.xml
+      -->
       <gml:parameter>
         <gml:OperationParameter gml:id="epsg-8801">
           <gml:identifier codeSpace="IOGP">urn:ogc:def:parameter:EPSG::8801</gml:identifier>

Modified: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/ParameterValueGroup.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/ParameterValueGroup.xml?rev=1707472&r1=1707471&r2=1707472&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/ParameterValueGroup.xml
(original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/parameter/ParameterValueGroup.xml
Thu Oct  8 10:53:42 2015
@@ -19,8 +19,8 @@
 -->
 
 <gml:ParameterValueGroup xsi:schemaLocation = "http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/coordinateOperations.xsd"
-                         xmlns:xlink        = "http://www.w3.org/1999/xlink"
                          xmlns:gml          = "http://www.opengis.net/gml/3.2"
+                         xmlns:xlink        = "http://www.w3.org/1999/xlink"
                          xmlns:xsi          = "http://www.w3.org/2001/XMLSchema-instance">
 
   <gml:parameterValue>
@@ -66,11 +66,11 @@
       <gml:name codeSpace="EPSG">Mercator (variant A)</gml:name>
       <gml:name codeSpace="OGC">Mercator_1SP</gml:name>
       <gml:minimumOccurs>0</gml:minimumOccurs>
-
-      <!-- The first 3 parameters below this point are duplication of the parameters already
defined above.
-           The xlink:href attribute allows to reference existing instances instead than repeating
them.
-           See https://issues.apache.org/jira/browse/SIS-173 -->
-
+      <!--
+        The first three parameters below this point are the same than the parameters defined
above.
+        The xlink:href attribute allows to reference existing instances instead than repeating
them.
+        Repetition will be tested with another file: DuplicatedParameters.xml
+      -->
       <gml:parameter xlink:href="#epsg-parameter-8801"/>
       <gml:parameter xlink:href="#epsg-parameter-8802"/>
       <gml:parameter xlink:href="#epsg-parameter-8805"/>

Modified: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml?rev=1707472&r1=1707471&r2=1707472&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml
(original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml
Thu Oct  8 10:53:42 2015
@@ -20,6 +20,7 @@
 
 <gml:ProjectedCRS xsi:schemaLocation = "http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/coordinateReferenceSystems.xsd"
                   xmlns:gml          = "http://www.opengis.net/gml/3.2"
+                  xmlns:xlink        = "http://www.w3.org/1999/xlink"
                   xmlns:xsi          = "http://www.w3.org/2001/XMLSchema-instance"
                   gml:id             = "epsg-crs-27572">
 
@@ -70,68 +71,34 @@
           </gml:parameter>
         </gml:OperationMethod>
       </gml:method>
-
-      <!--
-        All parameters below this point are duplication of the parameters already defined
above.
-        For now we do not yet use the XML references, but this is something that we will
need to
-        support in a future SIS version. See https://issues.apache.org/jira/browse/SIS-173
issue.
-        In the meantime, we have to change the gml:id attribute values used below for avoiding
-        collisions with the gml:id attribute used in above parameters.
-      -->
-
       <gml:parameterValue>
         <gml:ParameterValue>
           <gml:value uom="urn:ogc:def:uom:EPSG::9105">52</gml:value>
-          <gml:operationParameter>
-            <gml:OperationParameter gml:id="t-8801">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:parameter:EPSG::8801</gml:identifier>
-              <gml:name>Latitude of natural origin</gml:name>
-            </gml:OperationParameter>
-          </gml:operationParameter>
+          <gml:operationParameter xlink:href="#epsg-param-8801"/>
         </gml:ParameterValue>
       </gml:parameterValue>
       <gml:parameterValue>
         <gml:ParameterValue>
           <gml:value uom="urn:ogc:def:uom:EPSG::9105">0</gml:value>
-          <gml:operationParameter>
-            <gml:OperationParameter gml:id="t-8802">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:parameter:EPSG::8802</gml:identifier>
-              <gml:name>Longitude of natural origin</gml:name>
-            </gml:OperationParameter>
-          </gml:operationParameter>
+          <gml:operationParameter xlink:href="#epsg-param-8802"/>
         </gml:ParameterValue>
       </gml:parameterValue>
       <gml:parameterValue>
         <gml:ParameterValue>
           <gml:value uom="urn:ogc:def:uom:EPSG::9201">0.99987742</gml:value>
-          <gml:operationParameter>
-            <gml:OperationParameter gml:id="t-8805">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:parameter:EPSG::8805</gml:identifier>
-              <gml:name>Scale factor at natural origin</gml:name>
-            </gml:OperationParameter>
-          </gml:operationParameter>
+          <gml:operationParameter xlink:href="#epsg-param-8805"/>
         </gml:ParameterValue>
       </gml:parameterValue>
       <gml:parameterValue>
         <gml:ParameterValue>
           <gml:value uom="urn:ogc:def:uom:EPSG::9001">600000</gml:value>
-          <gml:operationParameter>
-            <gml:OperationParameter gml:id="t-8806">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:parameter:EPSG::8806</gml:identifier>
-              <gml:name>False easting</gml:name>
-            </gml:OperationParameter>
-          </gml:operationParameter>
+          <gml:operationParameter xlink:href="#epsg-param-8806"/>
         </gml:ParameterValue>
       </gml:parameterValue>
       <gml:parameterValue>
         <gml:ParameterValue>
           <gml:value uom="urn:ogc:def:uom:EPSG::9001">2200000</gml:value>
-          <gml:operationParameter>
-            <gml:OperationParameter gml:id="t-8807">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:parameter:EPSG::8807</gml:identifier>
-              <gml:name>False northing</gml:name>
-            </gml:OperationParameter>
-          </gml:operationParameter>
+          <gml:operationParameter xlink:href="#epsg-param-8807"/>
         </gml:ParameterValue>
       </gml:parameterValue>
     </gml:Conversion>

Modified: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Conversion.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Conversion.xml?rev=1707472&r1=1707471&r2=1707472&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Conversion.xml
(original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Conversion.xml
Thu Oct  8 10:53:42 2015
@@ -91,13 +91,13 @@
   <gml:parameterValue>
     <gml:ParameterValue>
       <gml:value uom="urn:ogc:def:uom:EPSG::9102">-0</gml:value>    <!-- Intentionally
negative for testing purpose. -->
-
-      <!-- All descriptors below this point are duplication of the descriptors already
defined above.
-           For now we do not yet use the XML references, but this is something that we will
need to
-           support in a future SIS version. See https://issues.apache.org/jira/browse/SIS-173
issue.
-           In the meantime, we have to change the gml:id attribute values used below for
avoiding
-           collisions with the gml:id attribute used in above descriptors. -->
-
+      <!--
+        All descriptors below this point are duplications of the descriptors already defined
above.
+        We could use the xlink:href attribute, but we rather repeat the descriptors in this
file in
+        order to test SIS capability to replace duplicated instances by unique instances.
Note that
+        we have to use different gml:id attribute values for avoiding collisions with the
values in
+        above descriptors.
+      -->
       <gml:operationParameter>
         <gml:OperationParameter gml:id="LatitudeOfNaturalOrigin">
           <gml:identifier codeSpace="IOGP">urn:ogc:def:parameter:EPSG::8801</gml:identifier>

Modified: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Transformation.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Transformation.xml?rev=1707472&r1=1707471&r2=1707472&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Transformation.xml
(original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/operation/Transformation.xml
Thu Oct  8 10:53:42 2015
@@ -68,14 +68,14 @@
           <gml:name>Nouvelle Triangulation Française (Paris)</gml:name>
           <gml:scope>Topographic mapping.</gml:scope>
           <gml:primeMeridian>
-            <gml:PrimeMeridian gml:id = "ParisMeridian">
+            <gml:PrimeMeridian gml:id="ParisMeridian">
               <gml:identifier codeSpace="IOGP">urn:ogc:def:meridian:EPSG::8901</gml:identifier>
               <gml:name>Greenwich</gml:name>
               <gml:greenwichLongitude uom="urn:ogc:def:uom:EPSG::9105">2.5969213</gml:greenwichLongitude>
             </gml:PrimeMeridian>
           </gml:primeMeridian>
           <gml:ellipsoid>
-            <gml:Ellipsoid gml:id = "Ellipsoid">
+            <gml:Ellipsoid gml:id="Ellipsoid">
               <gml:identifier codeSpace="IOGP">urn:ogc:def:ellipsoid:EPSG::7030</gml:identifier>
               <gml:name>Clarke 1880 (IGN)</gml:name>
               <gml:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">6378249.2</gml:semiMajorAxis>
@@ -94,65 +94,27 @@
   <!--
     Following CRS definition contains a lot of information identical to the source CRS.
     The only difference are the datum and the prime meridian.
-
-    See https://issues.apache.org/jira/browse/SIS-173 issue.
-    Duplicated value have the "-copy" suffix in gml:id.
+    We reuse the above definitions with xlink:href attributes.
   -->
   <gml:targetCRS>
     <gml:GeodeticCRS gml:id="Greenwich">
       <gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4275</gml:identifier>
       <gml:name>NTF</gml:name>
       <gml:scope>Geodetic survey.</gml:scope>
-      <gml:ellipsoidalCS>
-        <!-- TODO (SIS-173): replace following element by IDREF -->
-        <gml:EllipsoidalCS gml:id="CoordinateSystem-copy">
-          <gml:identifier codeSpace="IOGP">urn:ogc:def:cs:EPSG::6422</gml:identifier>
-          <gml:name>Latitude (north), Longitude (east)</gml:name>
-          <gml:axis>
-            <gml:CoordinateSystemAxis gml:id="φ-copy" uom="urn:ogc:def:uom:EPSG::9122">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:axis:EPSG::106</gml:identifier>
-              <gml:name>Geodetic latitude</gml:name>
-              <gml:axisAbbrev>φ</gml:axisAbbrev>
-              <gml:axisDirection codeSpace="EPSG">north</gml:axisDirection>
-              <gml:rangeMeaning codeSpace="EPSG">exact</gml:rangeMeaning>
-            </gml:CoordinateSystemAxis>
-          </gml:axis>
-          <gml:axis>
-            <gml:CoordinateSystemAxis gml:id="λ-copy" uom="urn:ogc:def:uom:EPSG::9122">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:axis:EPSG::107</gml:identifier>
-              <gml:name>Geodetic longitude</gml:name>
-              <gml:axisAbbrev>λ</gml:axisAbbrev>
-              <gml:axisDirection codeSpace="EPSG">east</gml:axisDirection>
-              <gml:rangeMeaning codeSpace="EPSG">wraparound</gml:rangeMeaning>
-            </gml:CoordinateSystemAxis>
-          </gml:axis>
-        </gml:EllipsoidalCS>
-      </gml:ellipsoidalCS>
+      <gml:ellipsoidalCS xlink:href="#CoordinateSystem"/>
       <gml:geodeticDatum>
         <gml:GeodeticDatum gml:id="GreenwichDatum">
           <gml:identifier codeSpace="IOGP">urn:ogc:def:datum:EPSG::6275</gml:identifier>
           <gml:name>Nouvelle Triangulation Française</gml:name>
           <gml:scope>Topographic mapping.</gml:scope>
           <gml:primeMeridian>
-            <gml:PrimeMeridian gml:id = "GreenwichMeridian">
+            <gml:PrimeMeridian gml:id="GreenwichMeridian">
               <gml:identifier codeSpace="IOGP">urn:ogc:def:meridian:EPSG::8901</gml:identifier>
               <gml:name>Greenwich</gml:name>
               <gml:greenwichLongitude uom="urn:ogc:def:uom:EPSG::9102">0</gml:greenwichLongitude>
             </gml:PrimeMeridian>
           </gml:primeMeridian>
-          <!-- TODO (SIS-173): replace following element by IDREF -->
-          <gml:ellipsoid>
-            <gml:Ellipsoid gml:id = "Ellipsoid-copy">
-              <gml:identifier codeSpace="IOGP">urn:ogc:def:ellipsoid:EPSG::7011</gml:identifier>
-              <gml:name>Clarke 1880 (IGN)</gml:name>
-              <gml:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">6378249.2</gml:semiMajorAxis>
-              <gml:secondDefiningParameter>
-                <gml:SecondDefiningParameter>
-                  <gml:semiMinorAxis uom="urn:ogc:def:uom:EPSG::9001">6356515</gml:semiMinorAxis>
-                </gml:SecondDefiningParameter>
-              </gml:secondDefiningParameter>
-            </gml:Ellipsoid>
-          </gml:ellipsoid>
+          <gml:ellipsoid xlink:href="#Ellipsoid"/>
         </gml:GeodeticDatum>
       </gml:geodeticDatum>
     </gml:GeodeticCRS>
@@ -179,7 +141,7 @@
       <gml:value uom="urn:ogc:def:uom:EPSG::9105">2.5969213</gml:value>
       <!--
         The following duplicates the descriptor defined in above <gml:method>, so we
could replace the definition
-        by a gml:idref="ParameterDescriptor" attribute (http://issues.apache.org/jira/browse/SIS-173).
 But we do
+        by xlink:href="#ParameterDescriptor" attribute (http://issues.apache.org/jira/browse/SIS-173).
 But we do
         not apply this simplification because we want to opportunistically test SIS capability
to consolidate the
         various descriptors into canonical instances based on the parameter name.
       -->



Mime
View raw message