Commit 78b2f1cb authored by Kim Mortimer's avatar Kim Mortimer
Browse files

Merge branch 'geom-to-geojson' into 'master'

Geom to geojson

See merge request Infrastructure/iso19115.MERIDIAN!8
parents b1b9e8d2 c3e04da0
......@@ -611,7 +611,7 @@
<location><xsl:value-of select="concat($s, ',', $w)"/></location>
</xsl:when>
<xsl:otherwise>
<geom>
<geojson>
<xsl:text>{"type": "polygon",</xsl:text>
<xsl:text>"coordinates": [[</xsl:text>
<xsl:value-of select="concat('[', $w, ',', $s, ']')"/>
......@@ -624,7 +624,7 @@
<xsl:text>,</xsl:text>
<xsl:value-of select="concat('[', $w, ',', $s, ']')"/>
<xsl:text>]]}</xsl:text>
</geom>
</geojson>
<location><xsl:value-of select="concat(
(number($s) + number($n)) div 2,
......@@ -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)">
<!-- if it's a polygon it has an exterior -->
<!-- initialize geoJson -->
<geom>
<geojson>
<xsl:text>{"type": "Polygon",</xsl:text>
<xsl:text>"coordinates": [
[</xsl:text>
......@@ -724,16 +724,16 @@
</xsl:otherwise>
</xsl:choose>
<xsl:text>] }</xsl:text>
</geom>
</geojson>
</xsl:if>
</xsl:for-each>
<xsl:for-each select=".//gmd:EX_BoundingPolygon/gmd:polygon/gml:Point">
<geom>
<geojson>
<xsl:text>{"type": "Point",</xsl:text>
<xsl:text>"coordinates": </xsl:text>
<xsl:value-of select="concat('[', substring-after(. ,'\s'), ', ', substring-before(., '\s'), ']')"/>
<xsl:text>}</xsl:text>
</geom>
</geojson>
</xsl:for-each>
</xsl:for-each>
......
......@@ -694,7 +694,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gmd:geographicElement>
<gmd:EX_BoundingPolygon>
<gmd:polygon>
<gml:Polygon gml:id="polygon18" srsName="CRS:84">
<gml:Polygon gml:id="polygon18" srsName="WGS84">
<gml:exterior>
<gml:LinearRing>
<gml:posList srsDimension="2">116 -21 116 -20 115 -20 115 -19 117 -19 117 -21 116 -21</gml:posList>
......
......@@ -574,7 +574,7 @@ IMOS operated acoustic observatories at four sites: 1) Perth Canyon in Western A
<gmd:geographicElement>
<gmd:EX_BoundingPolygon>
<gmd:polygon>
<gml:Polygon gml:id="polygon1" srsName="CRS:84">
<gml:Polygon gml:id="polygon1" srsName="WGS84">
<gml:exterior>
<gml:LinearRing>
<gml:posList srsDimension="2">114 -32 114 -31 116 -31 116 -32 114 -32</gml:posList>
......
......@@ -1165,7 +1165,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gmd:geographicElement>
<gmd:EX_BoundingPolygon>
<gmd:polygon>
<gml:Polygon gml:id="polygon13" srsName="CRS:84">
<gml:Polygon gml:id="polygon13" srsName="WGS84">
<gml:exterior>
<gml:LinearRing>
<gml:posList srsDimension="2">150 -37 150 -33 151 -33 151 -32 152 -32 152 -30 153 -30 153 -29 152 -29 152 -26 153 -26 153 -27 154 -27 154 -32 153 -32 153 -33 152 -33 152 -35 151 -35 151 -37 150 -37</gml:posList>
......
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