Commit 647ac4ab authored by Kim Mortimer's avatar Kim Mortimer
Browse files

Change geom references to geojson, as per old recovered 2019-04-03 branch

parent b1b9e8d2
...@@ -611,7 +611,7 @@ ...@@ -611,7 +611,7 @@
<location><xsl:value-of select="concat($s, ',', $w)"/></location> <location><xsl:value-of select="concat($s, ',', $w)"/></location>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<geom> <geojson>
<xsl:text>{"type": "polygon",</xsl:text> <xsl:text>{"type": "polygon",</xsl:text>
<xsl:text>"coordinates": [[</xsl:text> <xsl:text>"coordinates": [[</xsl:text>
<xsl:value-of select="concat('[', $w, ',', $s, ']')"/> <xsl:value-of select="concat('[', $w, ',', $s, ']')"/>
...@@ -624,7 +624,7 @@ ...@@ -624,7 +624,7 @@
<xsl:text>,</xsl:text> <xsl:text>,</xsl:text>
<xsl:value-of select="concat('[', $w, ',', $s, ']')"/> <xsl:value-of select="concat('[', $w, ',', $s, ']')"/>
<xsl:text>]]}</xsl:text> <xsl:text>]]}</xsl:text>
</geom> </geojson>
<location><xsl:value-of select="concat( <location><xsl:value-of select="concat(
(number($s) + number($n)) div 2, (number($s) + number($n)) div 2,
...@@ -644,7 +644,7 @@ ...@@ -644,7 +644,7 @@
<xsl:if test="contains(@srsName, 'WGS 84') or contains(@srsName, 'WGS84') or contains(@srsName, '') or contains(@srsName, '/4326') or not(@gml:srsName)"> <xsl:if test="contains(@srsName, 'WGS 84') or contains(@srsName, 'WGS84') or contains(@srsName, '') or contains(@srsName, '/4326') or not(@gml:srsName)">
<!-- if it's a polygon it has an exterior --> <!-- if it's a polygon it has an exterior -->
<!-- initialize geoJson --> <!-- initialize geoJson -->
<geom> <geojson>
<xsl:text>{"type": "Polygon",</xsl:text> <xsl:text>{"type": "Polygon",</xsl:text>
<xsl:text>"coordinates": [ <xsl:text>"coordinates": [
[</xsl:text> [</xsl:text>
...@@ -724,16 +724,16 @@ ...@@ -724,16 +724,16 @@
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:text>] }</xsl:text> <xsl:text>] }</xsl:text>
</geom> </geojson>
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
<xsl:for-each select=".//gmd:EX_BoundingPolygon/gmd:polygon/gml:Point"> <xsl:for-each select=".//gmd:EX_BoundingPolygon/gmd:polygon/gml:Point">
<geom> <geojson>
<xsl:text>{"type": "Point",</xsl:text> <xsl:text>{"type": "Point",</xsl:text>
<xsl:text>"coordinates": </xsl:text> <xsl:text>"coordinates": </xsl:text>
<xsl:value-of select="concat('[', substring-after(. ,'\s'), ', ', substring-before(., '\s'), ']')"/> <xsl:value-of select="concat('[', substring-after(. ,'\s'), ', ', substring-before(., '\s'), ']')"/>
<xsl:text>}</xsl:text> <xsl:text>}</xsl:text>
</geom> </geojson>
</xsl:for-each> </xsl:for-each>
</xsl:for-each> </xsl:for-each>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment