1 |
3032
|
perry
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2 |
|
|
<!--
|
3 |
|
|
Description: transforms an OWS Context document Coverage resource element into
|
4 |
|
|
the request string (HTTP GET only for now)
|
5 |
|
|
Author: adair
|
6 |
|
|
Licence: LGPL as specified in http://www.gnu.org/copyleft/lesser.html .
|
7 |
|
|
|
8 |
|
|
$Id$
|
9 |
|
|
$Name$
|
10 |
|
|
-->
|
11 |
|
|
|
12 |
|
|
<xsl:stylesheet version="1.0"
|
13 |
|
|
xmlns:wmc="http://www.opengis.net/context"
|
14 |
|
|
xmlns:mb="http://mapbuilder.sourceforge.net/mapbuilder"
|
15 |
|
|
xmlns:param="http;//www.opengis.net/param"
|
16 |
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
|
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
18 |
|
|
|
19 |
|
|
<xsl:output method="xml"/>
|
20 |
|
|
<xsl:strip-space elements="*"/>
|
21 |
|
|
|
22 |
|
|
<xsl:param name="bBoxMinX"/>
|
23 |
|
|
<xsl:param name="bBoxMinY"/>
|
24 |
|
|
<xsl:param name="bBoxMaxX"/>
|
25 |
|
|
<xsl:param name="bBoxMaxY"/>
|
26 |
|
|
<xsl:param name="width"/>
|
27 |
|
|
<xsl:param name="height"/>
|
28 |
|
|
<xsl:param name="srs"/>
|
29 |
|
|
<xsl:param name="version"/>
|
30 |
|
|
|
31 |
|
|
<xsl:template match="wmc:Coverage">
|
32 |
|
|
<xsl:variable name="bbox">
|
33 |
|
|
<xsl:value-of select="$bBoxMinX"/>,<xsl:value-of select="$bBoxMinY"/>,
|
34 |
|
|
<xsl:value-of select="$bBoxMaxX"/>,<xsl:value-of select="$bBoxMaxY"/>
|
35 |
|
|
</xsl:variable>
|
36 |
|
|
<GetCoverage>
|
37 |
|
|
<mb:QueryString>
|
38 |
|
|
<xsl:variable name="src">
|
39 |
|
|
VERSION=<xsl:value-of select="$version"/>
|
40 |
|
|
&REQUEST=GetCoverage
|
41 |
|
|
&SERVICE=WCS
|
42 |
|
|
&CRS=<xsl:value-of select="$srs"/>
|
43 |
|
|
&BBOX=<xsl:value-of select="$bbox"/>
|
44 |
|
|
&WIDTH=<xsl:value-of select="$width"/>
|
45 |
|
|
&HEIGHT=<xsl:value-of select="$height"/>
|
46 |
|
|
&COVERAGE=<xsl:value-of select="wmc:Name"/>
|
47 |
|
|
&FORMAT=<xsl:value-of select="wmc:FormatList/wmc:Format[@current='1']"/>
|
48 |
|
|
<xsl:for-each select="wmc:DimensionList/wmc:Dimension">
|
49 |
|
|
&<xsl:value-of select="@name"/>=<xsl:value-of select="."/>
|
50 |
|
|
</xsl:for-each>
|
51 |
|
|
<xsl:for-each select="wmc:ParameterList/wmc:Parameter">
|
52 |
|
|
&<xsl:value-of select="param:kvp/@name"/>=<xsl:value-of select="param:kvp/@value"/>
|
53 |
|
|
</xsl:for-each>
|
54 |
|
|
</xsl:variable>
|
55 |
|
|
<xsl:value-of select="translate(normalize-space($src),' ', '' )" disable-output-escaping="no"/>
|
56 |
|
|
</mb:QueryString>
|
57 |
|
|
</GetCoverage>
|
58 |
|
|
</xsl:template>
|
59 |
|
|
|
60 |
|
|
<xsl:template match="text()|@*"/>
|
61 |
|
|
|
62 |
|
|
</xsl:stylesheet>
|