dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36245
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18561: Fixed inner and outer boundary being merged instead of separated in Polygons and MultiPolygons. H...
------------------------------------------------------------
revno: 18561
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-03-10 13:47:37 +0100
message:
Fixed inner and outer boundary being merged instead of separated in Polygons and MultiPolygons. Holes will now appear corectly for imported GML
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl
--
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
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl 2015-03-05 16:05:19 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/resources/gml/gml2dxf2.xsl 2015-03-10 12:47:37 +0000
@@ -8,8 +8,10 @@
<xsl:param name="precision">4</xsl:param>
<xsl:template match="gml:coordinates">
+ <xsl:text>[</xsl:text>
<xsl:value-of select="java:gmlCoordinatesToString(normalize-space(.),$precision)"
disable-output-escaping="yes"/>
+ <xsl:text>]</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>,</xsl:text>
</xsl:if>
@@ -17,15 +19,14 @@
<xsl:template match="gml:pos">
<xsl:value-of select="java:gmlPosToString(normalize-space(.),$precision)"
- disable-output-escaping="yes"/>
- <xsl:if test="position() != last()">
- <xsl:text>,</xsl:text>
- </xsl:if>
+ disable-output-escaping="yes" />
</xsl:template>
<xsl:template match="gml:posList">
+ <xsl:text>[</xsl:text>
<xsl:value-of select="java:gmlPosListToString(normalize-space(.),$precision)"
disable-output-escaping="yes"/>
+ <xsl:text>]</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>,</xsl:text>
</xsl:if>
@@ -34,10 +35,10 @@
<xsl:template match="gml:Polygon">
<featureType>Polygon</featureType>
<coordinates>
- <xsl:text>[[[</xsl:text>
+ <xsl:text>[[</xsl:text>
<xsl:apply-templates select=".//gml:coordinates"/>
<xsl:apply-templates select=".//gml:posList"/>
- <xsl:text>]]]</xsl:text>
+ <xsl:text>]]</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>,</xsl:text>
</xsl:if>