← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1852: Changed the xml format for coordinates.

 

------------------------------------------------------------
revno: 1852
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Wed 2010-07-14 21:36:41 +0200
message:
  Changed the xml format for coordinates.
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/CoordinatesTuple.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitTest.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/resources/transform/gml2dxf.xsl
  dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/GML2DXFTest.java
  dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfOrganisationUnits.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/CoordinatesTuple.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/CoordinatesTuple.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/CoordinatesTuple.java	2010-07-14 19:36:41 +0000
@@ -0,0 +1,74 @@
+package org.hisp.dhis.organisationunit;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CoordinatesTuple
+{
+    private List<String> coordinatesTuple = new ArrayList<String>();
+
+    public void addCoordinates( String coordinates )
+    {
+        this.coordinatesTuple.add( coordinates );
+    }
+    
+    public long getNumberOfCoordinates()
+    {
+        return this.coordinatesTuple.size();
+    }
+    
+    public List<String> getCoordinatesTuple()
+    {
+        return coordinatesTuple;
+    }
+
+    @Override
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        
+        for ( String c : coordinatesTuple )
+        {
+            result = prime * result + c.hashCode();
+        }
+        
+        return result;
+    }
+
+    @Override
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+        {
+            return true;
+        }
+        
+        if ( o == null )
+        {
+            return false;
+        }
+        
+        if ( getClass() != o.getClass() )
+        {
+            return false;
+        }
+        
+        final CoordinatesTuple other = (CoordinatesTuple) o;
+
+        if ( coordinatesTuple.size() != other.getCoordinatesTuple().size() )
+        {
+            return false;
+        }
+        
+        for ( int i = 0; i < coordinatesTuple.size(); i++ )
+        {
+            if ( !coordinatesTuple.get( i ).equals( other.getCoordinatesTuple().get( i ) ) )
+            {
+                return false;
+            }
+        }
+        
+        return true;
+    }    
+}

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2010-07-13 20:21:23 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2010-07-14 19:36:41 +0000
@@ -28,7 +28,6 @@
  */
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
@@ -49,7 +48,7 @@
 {
     private static final Pattern JSON_COORDINATE_PATTERN = Pattern.compile( "(\\[{3}.*?\\]{3})" );
 
-    private static final Pattern GML_COORDINATE_PATTERN = Pattern.compile("([\\-0-9.]+,[\\-0-9.]+)");
+    private static final Pattern COORDINATE_PATTERN = Pattern.compile("([\\-0-9.]+,[\\-0-9.]+)");
     
     private Set<OrganisationUnit> children = new HashSet<OrganisationUnit>();
 
@@ -157,57 +156,47 @@
         return coordinates != null && coordinates.trim().length() > 0;
     }
     
-    public Collection<String> getCoordinatesAsCollection()
+    public List<CoordinatesTuple> getCoordinatesAsList()
     {
-        Collection<String> collection = new ArrayList<String>();
+        List<CoordinatesTuple> list = new ArrayList<CoordinatesTuple>();
         
         if ( coordinates != null && !coordinates.trim().isEmpty() )
         {
-            Matcher matcher = JSON_COORDINATE_PATTERN.matcher( coordinates );
-            
-            while ( matcher.find() )
-            {
-                collection.add( matcher.group().replaceAll( "\\]\\,", "] " ).replaceAll( "[\\[\\]]", "" ) );
-            }
-        }
-        
-        return collection;
-    }
+            Matcher jsonMatcher = JSON_COORDINATE_PATTERN.matcher( coordinates );
 
-    public Collection<String> getAllCoordinates()
-    {
-        Collection<String> collection = new ArrayList<String>();
-        
-        if ( coordinates != null && !coordinates.trim().isEmpty() )
-        {
-            Matcher matcher = GML_COORDINATE_PATTERN.matcher( coordinates );
-            
-            while ( matcher.find() )
+            while ( jsonMatcher.find() )
             {
-                collection.add( matcher.group() );
+                CoordinatesTuple tuple = new CoordinatesTuple();
+                
+                Matcher matcher = COORDINATE_PATTERN.matcher( jsonMatcher.group() );
+                
+                while ( matcher.find() )
+                {
+                    tuple.addCoordinates( matcher.group() );
+                }
+                
+                list.add( tuple );
             }
         }
         
-        return collection;
+        return list;
     }
     
-    public void setCoordinatesFromCollection( Collection<String> collection )
+    public void setCoordinatesFromList( List<CoordinatesTuple> list )
     {
         StringBuilder builder = new StringBuilder();
         
-        if ( collection != null && collection.size() > 0 )
+        if ( list != null && list.size() > 0 )
         {
             builder.append( "[" );
             
-            for ( String c : collection )
+            for ( CoordinatesTuple tuple : list )
             {
                 builder.append( "[[" );
 
-                Matcher matcher = GML_COORDINATE_PATTERN.matcher( c );
-                
-                while ( matcher.find() )
+                for ( String coordinates : tuple.getCoordinatesTuple() )
                 {
-                    builder.append( "[" + matcher.group() + "]," );
+                    builder.append( "[" + coordinates + "]," );
                 }
                 
                 builder.deleteCharAt( builder.lastIndexOf( "," ) );            

=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitTest.java	2010-07-13 20:21:23 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitTest.java	2010-07-14 19:36:41 +0000
@@ -28,10 +28,8 @@
  */
 
 import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
 import org.junit.Before;
@@ -42,28 +40,42 @@
  */
 public class OrganisationUnitTest
 {
-    private List<String> dirtyCoordinatesCollection = new ArrayList<String>();
-    private List<String> cleanCoordinatesCollection = new ArrayList<String>();
+    private List<CoordinatesTuple> coordinatesList = new ArrayList<CoordinatesTuple>();
     
     private String coordinates = "[[[[11.11,22.22],[33.33,44.44],[55.55,66.66]]],[[[77.77,88.88],[99.99,11.11],[22.22,33.33]]],[[[44.44,55.55],[66.66,77.77],[88.88,99.99]]]]";
     
+    private CoordinatesTuple tupleA;
+    private CoordinatesTuple tupleB;
+    private CoordinatesTuple tupleC;
+    
     @Before
     public void before()
     {
-        dirtyCoordinatesCollection.add( "11.11,22.22  33.33,44.44    55.55,66.66" ); // Extra space between coords
-        dirtyCoordinatesCollection.add( "77.77,88.88 99.99,11.11\n22.22,33.33" );  // Newline between coords
-        dirtyCoordinatesCollection.add( "  44.44,55.55 66.66,77.77 88.88,99.99 " );  // Leading and trailing space
-        
-        cleanCoordinatesCollection.add( "11.11,22.22 33.33,44.44 55.55,66.66" ); // Testing on string since we control the output format
-        cleanCoordinatesCollection.add( "77.77,88.88 99.99,11.11 22.22,33.33" );
-        cleanCoordinatesCollection.add( "44.44,55.55 66.66,77.77 88.88,99.99" );
+        tupleA = new CoordinatesTuple();
+        tupleA.addCoordinates( "11.11,22.22" );
+        tupleA.addCoordinates( "33.33,44.44" );
+        tupleA.addCoordinates( "55.55,66.66" );
+        
+        tupleB = new CoordinatesTuple();
+        tupleB.addCoordinates( "77.77,88.88" );
+        tupleB.addCoordinates( "99.99,11.11" );
+        tupleB.addCoordinates( "22.22,33.33" );
+
+        tupleC = new CoordinatesTuple();
+        tupleC.addCoordinates( "44.44,55.55" );
+        tupleC.addCoordinates( "66.66,77.77" );
+        tupleC.addCoordinates( "88.88,99.99" );
+        
+        coordinatesList.add( tupleA );
+        coordinatesList.add( tupleB );
+        coordinatesList.add( tupleC );
     }
 
     @Test
     public void testSetCoordinatesFromCollection()
     {
         OrganisationUnit unit = new OrganisationUnit();
-        unit.setCoordinatesFromCollection( dirtyCoordinatesCollection );
+        unit.setCoordinatesFromList( coordinatesList );
         
         assertEquals( coordinates, unit.getCoordinates() );
     }
@@ -74,22 +86,10 @@
         OrganisationUnit unit = new OrganisationUnit();
         unit.setCoordinates( coordinates );
         
-        Collection<String> actual = unit.getCoordinatesAsCollection();
-        
-        assertEquals( 3, actual.size() );
-        assertTrue( actual.contains( cleanCoordinatesCollection.get( 0 ) ) );
-        assertTrue( actual.contains( cleanCoordinatesCollection.get( 1 ) ) );
-        assertTrue( actual.contains( cleanCoordinatesCollection.get( 2 ) ) );
-    }
-    
-    @Test
-    public void testGetCoordinatesAsMap()
-    {
-        OrganisationUnit unit = new OrganisationUnit();
-        unit.setCoordinates( coordinates );
-        
-        Collection<String> actual = unit.getAllCoordinates();
-        
-        assertEquals( 9, actual.size() );        
+        assertEquals( 3, unit.getCoordinatesAsList().size() );
+        
+        assertEquals( tupleA, unit.getCoordinatesAsList().get( 0 ) );
+        assertEquals( tupleB, unit.getCoordinatesAsList().get( 1 ) );
+        assertEquals( tupleC, unit.getCoordinatesAsList().get( 2 ) );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java	2010-07-02 12:53:57 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java	2010-07-14 19:36:41 +0000
@@ -31,6 +31,7 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 import org.amplecode.quick.BatchHandler;
 import org.amplecode.staxwax.reader.XMLReader;
@@ -41,6 +42,7 @@
 import org.hisp.dhis.importexport.XMLConverter;
 import org.hisp.dhis.importexport.analysis.ImportAnalyser;
 import org.hisp.dhis.importexport.importer.OrganisationUnitImporter;
+import org.hisp.dhis.organisationunit.CoordinatesTuple;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.source.Source;
@@ -66,7 +68,8 @@
     private static final String FIELD_ACTIVE = "active";
     private static final String FIELD_COMMENT = "comment";
     private static final String FIELD_GEO_CODE = "geoCode";
-    private static final String FIELD_COORDINATES = "coordinates";
+    private static final String FIELD_COORDINATES_TUPLE = "coordinatesTuple";
+    private static final String FIELD_COORDINATES = "coord";
     private static final String FIELD_FEATURE = "feature";
     private static final String FIELD_LAST_UPDATED = "lastUpdated";
     private static final String ATTRIBUTE_TYPE = "type";
@@ -131,9 +134,14 @@
                 writer.writeElement( FIELD_GEO_CODE, unit.getGeoCode() );
                 
                 writer.openElement( FIELD_FEATURE, ATTRIBUTE_TYPE, unit.getFeatureType() );                
-                for ( String coordinate : unit.getCoordinatesAsCollection() )
+                for ( CoordinatesTuple tuple : unit.getCoordinatesAsList() )
                 {
-                    writer.writeElement( FIELD_COORDINATES, coordinate );
+                    writer.openElement( FIELD_COORDINATES_TUPLE );                    
+                    for ( String coordinates : tuple.getCoordinatesTuple() )
+                    {
+                        writer.writeElement( FIELD_COORDINATES, coordinates );
+                    }                    
+                    writer.closeElement();
                 }
                 writer.closeElement();
                 
@@ -187,12 +195,17 @@
                 reader.moveToStartElement( FIELD_FEATURE );
                 unit.setFeatureType( reader.getAttributeValue( ATTRIBUTE_TYPE ) );
                 
-                Collection<String> coordinates = new ArrayList<String>();
-                while ( reader.moveToStartElement( FIELD_COORDINATES, FIELD_FEATURE ) )
+                List<CoordinatesTuple> list = new ArrayList<CoordinatesTuple>();
+                while ( reader.moveToStartElement( FIELD_COORDINATES_TUPLE, FIELD_FEATURE ) )
                 {
-                    coordinates.add( reader.getElementValue() );
+                    CoordinatesTuple tuple = new CoordinatesTuple();
+                    while ( reader.moveToStartElement( FIELD_COORDINATES, FIELD_COORDINATES_TUPLE ) )
+                    {
+                        tuple.addCoordinates( reader.getElementValue() );
+                    }
+                    list.add( tuple );
                 }
-                unit.setCoordinatesFromCollection( coordinates );
+                unit.setCoordinatesFromList( list );
                 
                 reader.moveToStartElement( FIELD_LAST_UPDATED );
                 unit.setLastUpdated( DateUtils.getMediumDate( reader.getElementValue() ) );

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/transform/gml2dxf.xsl'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/transform/gml2dxf.xsl	2010-07-08 20:31:49 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/transform/gml2dxf.xsl	2010-07-14 19:36:41 +0000
@@ -2,7 +2,24 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:gml="http://www.opengis.net/gml";>
 
 <xsl:template match="gml:coordinates">
-  <coordinates><xsl:value-of select="."/></coordinates>
+  <coordinatesTuple>
+  <xsl:call-template name="coordinates-delimiter">
+    <xsl:with-param name="coordinates"><xsl:value-of select="."/></xsl:with-param>
+  </xsl:call-template>
+</coordinatesTuple>
+</xsl:template>
+
+<xsl:template name="coordinates-delimiter">
+  <xsl:param name="coordinates"/>
+  <xsl:variable name="newlist" select="concat(normalize-space($coordinates), ' ')"/>
+  <xsl:variable name="first" select="substring-before($newlist, ' ')"/>
+  <xsl:variable name="remaining" select="substring-after($newlist, ' ')"/>
+  <coord><xsl:value-of select="$first"/></coord>
+  <xsl:if test="$remaining">
+    <xsl:call-template name="coordinates-delimiter">
+      <xsl:with-param name="coordinates" select="$remaining"/>
+    </xsl:call-template>
+  </xsl:if>
 </xsl:template>
 
 <xsl:template match="gml:Polygon">
@@ -48,4 +65,4 @@
 </dxf>
 </xsl:template>
 
-</xsl:stylesheet>
+</xsl:stylesheet>
\ No newline at end of file

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/GML2DXFTest.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/GML2DXFTest.java	2010-07-13 20:21:23 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/GML2DXFTest.java	2010-07-14 19:36:41 +0000
@@ -80,21 +80,23 @@
         assertNotNull( organisationUnitService.getAllOrganisationUnits() );
         assertEquals( 13, organisationUnitService.getAllOrganisationUnits().size() );
         
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Bo" ).getCoordinatesAsCollection().size() );
-        assertEquals( 18, organisationUnitService.getOrganisationUnitByName( "Bonthe" ).getCoordinatesAsCollection().size() );
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Moyamba" ).getCoordinatesAsCollection().size() );
-        assertEquals( 3, organisationUnitService.getOrganisationUnitByName( "Pujehun" ).getCoordinatesAsCollection().size() );
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Kailahun" ).getCoordinatesAsCollection().size() );
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Kenema" ).getCoordinatesAsCollection().size() );
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Kono" ).getCoordinatesAsCollection().size() );
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Bombali" ).getCoordinatesAsCollection().size() );
-        assertEquals( 3, organisationUnitService.getOrganisationUnitByName( "Kambia" ).getCoordinatesAsCollection().size() );
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Koinadugu" ).getCoordinatesAsCollection().size() );
-        assertEquals( 9, organisationUnitService.getOrganisationUnitByName( "Port Loko" ).getCoordinatesAsCollection().size() );
-        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Tonkolili" ).getCoordinatesAsCollection().size() );
-        assertEquals( 2, organisationUnitService.getOrganisationUnitByName( "Western Area" ).getCoordinatesAsCollection().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Bo" ).getCoordinatesAsList().size() );
+        assertEquals( 18, organisationUnitService.getOrganisationUnitByName( "Bonthe" ).getCoordinatesAsList().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Moyamba" ).getCoordinatesAsList().size() );
+        assertEquals( 3, organisationUnitService.getOrganisationUnitByName( "Pujehun" ).getCoordinatesAsList().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Kailahun" ).getCoordinatesAsList().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Kenema" ).getCoordinatesAsList().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Kono" ).getCoordinatesAsList().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Bombali" ).getCoordinatesAsList().size() );
+        assertEquals( 3, organisationUnitService.getOrganisationUnitByName( "Kambia" ).getCoordinatesAsList().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Koinadugu" ).getCoordinatesAsList().size() );
+        assertEquals( 9, organisationUnitService.getOrganisationUnitByName( "Port Loko" ).getCoordinatesAsList().size() );
+        assertEquals( 1, organisationUnitService.getOrganisationUnitByName( "Tonkolili" ).getCoordinatesAsList().size() );
+        assertEquals( 2, organisationUnitService.getOrganisationUnitByName( "Western Area" ).getCoordinatesAsList().size() );
         
-        assertEquals( 76, organisationUnitService.getOrganisationUnitByName( "Bo" ).getAllCoordinates().size() );
-        //assertEquals( 474, organisationUnitService.getOrganisationUnitByName( "Bonthe" ).getAllCoordinates().size() );
+        assertEquals( 76, organisationUnitService.getOrganisationUnitByName( "Bo" ).getCoordinatesAsList().get( 0 ).getNumberOfCoordinates() );
+        assertEquals( 7, organisationUnitService.getOrganisationUnitByName( "Pujehun" ).getCoordinatesAsList().get( 0 ).getNumberOfCoordinates() );
+        assertEquals( 7, organisationUnitService.getOrganisationUnitByName( "Pujehun" ).getCoordinatesAsList().get( 1 ).getNumberOfCoordinates() );
+        assertEquals( 159, organisationUnitService.getOrganisationUnitByName( "Pujehun" ).getCoordinatesAsList().get( 2 ).getNumberOfCoordinates() );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfOrganisationUnits.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfOrganisationUnits.xml	2010-06-02 13:17:11 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfOrganisationUnits.xml	2010-07-14 19:36:41 +0000
@@ -12,9 +12,9 @@
 <comment>Comment</comment>
 <geoCode>GeoCode</geoCode>
 <feature type="MultiPolygon">
-<coordinates>11.11,22.22 33.33,44.44 55.55,66.66</coordinates>
-<coordinates>77.77,88.88 99.99,11.11 22.22,33.33</coordinates>
-<coordinates>44.44,55.55 66.66,77.77 88.88,99.99</coordinates>
+<coordinatesTuple><coord>11.11,22.22</coord><coord>33.33,44.44</coord><coord>55.55,66.66</coord></coordinatesTuple>
+<coordinatesTuple><coord>77.77,88.88</coord><coord>99.99,11.11</coord><coord>22.22,33.33</coord></coordinatesTuple>
+<coordinatesTuple><coord>44.44,55.55</coord><coord>66.66,77.77</coord><coord>88.88,99.99</coord></coordinatesTuple>
 </feature>
 <lastUpdated>2010-01-01</lastUpdated>
 </organisationUnit>
@@ -30,9 +30,9 @@
 <comment>Comment</comment>
 <geoCode>GeoCode</geoCode>
 <feature type="MultiPolygon">
-<coordinates>11.11,22.22 33.33,44.44 55.55,66.66</coordinates>
-<coordinates>77.77,88.88 99.99,11.11 22.22,33.33</coordinates>
-<coordinates>44.44,55.55 66.66,77.77 88.88,99.99</coordinates>
+<coordinatesTuple><coord>11.11,22.22</coord><coord>33.33,44.44</coord><coord>55.55,66.66</coord></coordinatesTuple>
+<coordinatesTuple><coord>77.77,88.88</coord><coord>99.99,11.11</coord><coord>22.22,33.33</coord></coordinatesTuple>
+<coordinatesTuple><coord>44.44,55.55</coord><coord>66.66,77.77</coord><coord>88.88,99.99</coord></coordinatesTuple>
 </feature>
 <lastUpdated>2010-01-01</lastUpdated>
 </organisationUnit>
@@ -48,9 +48,9 @@
 <comment>Comment</comment>
 <geoCode>GeoCode</geoCode>
 <feature type="MultiPolygon">
-<coordinates>11.11,22.22 33.33,44.44 55.55,66.66</coordinates>
-<coordinates>77.77,88.88 99.99,11.11 22.22,33.33</coordinates>
-<coordinates>44.44,55.55 66.66,77.77 88.88,99.99</coordinates>
+<coordinatesTuple><coord>11.11,22.22</coord><coord>33.33,44.44</coord><coord>55.55,66.66</coord></coordinatesTuple>
+<coordinatesTuple><coord>77.77,88.88</coord><coord>99.99,11.11</coord><coord>22.22,33.33</coord></coordinatesTuple>
+<coordinatesTuple><coord>44.44,55.55</coord><coord>66.66,77.77</coord><coord>88.88,99.99</coord></coordinatesTuple>
 </feature>
 <lastUpdated>2010-01-01</lastUpdated>
 </organisationUnit>