Project

General

Profile

WMSExtensions » History » Version 11

Ernst de Vreede, 06/13/2013 03:01 PM

1 1 Maarten Plieger
h1. WMS Extensions
2 1 Maarten Plieger
3 1 Maarten Plieger
h2. GetFeatureInfo
4 3 Ernst de Vreede
5 2 Ernst de Vreede
The GetFeatureInfo call needs all parameters for a GetMap request, except REQUEST and adds X and Y (the pixel coordinates of interest) and QUERY_LAYERS (the layer(s) of interest)
6 1 Maarten Plieger
7 2 Ernst de Vreede
The ADAGUC service extends the GetFeatureInfo call in a number of aspects:
8 2 Ernst de Vreede
9 2 Ernst de Vreede
New request parameters:
10 5 Ernst de Vreede
11 5 Ernst de Vreede
* ...
12 2 Ernst de Vreede
* JSONP=<javascript_function_name> _data is returned as JavaScript code, where provided function is called with JSON result_
13 2 Ernst de Vreede
14 2 Ernst de Vreede
Extended request parameters:
15 2 Ernst de Vreede
* INFO_FORMAT=<FORMAT> _which can be image/gif, image/png, text/plain, application/xml, text/html, application/json
16 2 Ernst de Vreede
17 2 Ernst de Vreede
h3. JSON format
18 2 Ernst de Vreede
19 4 Ernst de Vreede
The URL
20 4 Ernst de Vreede
http://bvmlab-218-41.knmi.nl/cgi-bin/ECMD_EUR.cgi?&SERVICE=WMS&REQUEST=GetFeatureInfo&VERSION=1.1.1
21 4 Ernst de Vreede
&SRS=EPSG%3A4326&LAYERS=201306130000%2FLS_precipitation&QUERY_LAYERS=201306130000%2FLS_precipitation
22 4 Ernst de Vreede
&BBOX=-180,-131.06076210092687,180,131.06076210092687&WIDTH=971&HEIGHT=707&X=482&Y=224
23 4 Ernst de Vreede
&FORMAT=image/gif&INFO_FORMAT=application/json&STYLES=&&time=2013-06-13T00:00:00Z/2013-06-16T03:00:00Z
24 1 Maarten Plieger
25 4 Ernst de Vreede
gives the following result:
26 4 Ernst de Vreede
<pre><code class="json">
27 4 Ernst de Vreede
[
28 4 Ernst de Vreede
29 4 Ernst de Vreede
    {
30 4 Ernst de Vreede
        "name": "large_scale_precipitation",
31 4 Ernst de Vreede
        "standard_name": "large_scale_precipitation",
32 4 Ernst de Vreede
        "units": "mm",
33 4 Ernst de Vreede
        "point": {
34 4 Ernst de Vreede
            "SRS": "EPSG:4326",
35 4 Ernst de Vreede
            "coords": "-1.297631,48.012358"
36 4 Ernst de Vreede
        },
37 4 Ernst de Vreede
        "dims": "time",
38 4 Ernst de Vreede
        "data": {
39 4 Ernst de Vreede
            "2013-06-13T03:00:00Z": "0.000",
40 4 Ernst de Vreede
            "2013-06-13T06:00:00Z": "0.000",
41 4 Ernst de Vreede
            "2013-06-13T09:00:00Z": "0.222",
42 4 Ernst de Vreede
            "2013-06-13T12:00:00Z": "0.552",
43 4 Ernst de Vreede
            "2013-06-13T15:00:00Z": "0.565",
44 4 Ernst de Vreede
            "2013-06-13T18:00:00Z": "0.565",
45 4 Ernst de Vreede
            "2013-06-13T21:00:00Z": "0.565",
46 4 Ernst de Vreede
            "2013-06-14T00:00:00Z": "0.568",
47 4 Ernst de Vreede
            "2013-06-14T03:00:00Z": "0.568",
48 4 Ernst de Vreede
            "2013-06-14T06:00:00Z": "0.568",
49 4 Ernst de Vreede
            "2013-06-14T09:00:00Z": "0.568",
50 4 Ernst de Vreede
            "2013-06-14T12:00:00Z": "0.568",
51 4 Ernst de Vreede
            "2013-06-14T15:00:00Z": "0.568",
52 4 Ernst de Vreede
            "2013-06-14T18:00:00Z": "0.568",
53 4 Ernst de Vreede
            "2013-06-14T21:00:00Z": "0.566",
54 4 Ernst de Vreede
            "2013-06-15T00:00:00Z": "0.566",
55 4 Ernst de Vreede
            "2013-06-15T03:00:00Z": "0.566",
56 4 Ernst de Vreede
            "2013-06-15T06:00:00Z": "0.614",
57 4 Ernst de Vreede
            "2013-06-15T09:00:00Z": "1.021",
58 4 Ernst de Vreede
            "2013-06-15T12:00:00Z": "1.027",
59 4 Ernst de Vreede
            "2013-06-15T15:00:00Z": "1.027",
60 4 Ernst de Vreede
            "2013-06-15T18:00:00Z": "1.027",
61 4 Ernst de Vreede
            "2013-06-15T21:00:00Z": "1.027",
62 4 Ernst de Vreede
            "2013-06-16T00:00:00Z": "1.027",
63 4 Ernst de Vreede
            "2013-06-16T03:00:00Z": "1.027"
64 4 Ernst de Vreede
        }
65 4 Ernst de Vreede
    }
66 4 Ernst de Vreede
67 4 Ernst de Vreede
]
68 4 Ernst de Vreede
</code></pre>
69 4 Ernst de Vreede
70 4 Ernst de Vreede
This output is more or less self-describing. The requested coordinate is always returned in EPSG:4326. A list of the data's dimensions is also provided.
71 4 Ernst de Vreede
The following code is an example of Javascript to handle the json:
72 8 Ernst de Vreede
<pre><code class="JavaScript">
73 4 Ernst de Vreede
//JSON result is parsed and stored in the variable precip
74 4 Ernst de Vreede
precip["units"] is the units description
75 4 Ernst de Vreede
precip["dims"] is an array of the dimensions.
76 4 Ernst de Vreede
precip["data"]["2013-06-16T03:00:00Z"] is the last value of the requested timeseries data.
77 4 Ernst de Vreede
</code></pre>
78 4 Ernst de Vreede
79 2 Ernst de Vreede
h2. GetPointValue
80 2 Ernst de Vreede
81 1 Maarten Plieger
GetPointValue is kind of a shorthand for GetFeatureInfo. It enables one to do a GetFeatureInfo like request, without specifying a WMS GetMap request.
82 4 Ernst de Vreede
This can be used to retrieve for example a time series of data for a certain lat/lon coordinate or in the case of ensemble data to get all 50 timeseries for a "plume" image.
83 2 Ernst de Vreede
84 6 Ernst de Vreede
Parameters for a GetPointValue request are:
85 2 Ernst de Vreede
86 6 Ernst de Vreede
An example of a multi-dimensional data request:
87 6 Ernst de Vreede
http://bvmlab-218-41.knmi.nl/cgi-bin/ECMD_EUR.cgi?&SERVICE=WMS&REQUEST=GetPointValue&VERSION=1.1.1
88 6 Ernst de Vreede
&SRS=EPSG:4326&QUERY_LAYERS=201306130000/Temperature_pl&X=5.2&Y=52.0&INFO_FORMAT=application/json&
89 6 Ernst de Vreede
time=2013-06-13T00:00:00Z/2013-06-13T12:00:00Z&DIM_pressure=300,500
90 6 Ernst de Vreede
91 6 Ernst de Vreede
Output:
92 6 Ernst de Vreede
<pre><code class="json">
93 6 Ernst de Vreede
[
94 6 Ernst de Vreede
95 6 Ernst de Vreede
    {
96 6 Ernst de Vreede
        "name": "air_temperature",
97 6 Ernst de Vreede
        "standard_name": "air_temperature",
98 6 Ernst de Vreede
        "units": "Celsius",
99 6 Ernst de Vreede
        "point": {
100 6 Ernst de Vreede
            "SRS": "EPSG:4326",
101 6 Ernst de Vreede
            "coords": "5.200000,52.000000"
102 6 Ernst de Vreede
        },
103 6 Ernst de Vreede
        "dims": [
104 6 Ernst de Vreede
            "pressure",
105 6 Ernst de Vreede
            "time"
106 6 Ernst de Vreede
        ],
107 6 Ernst de Vreede
        "data": {
108 6 Ernst de Vreede
            "300": {
109 6 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-39.54",
110 6 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-39.69",
111 6 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-39.62",
112 6 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-39.57",
113 6 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-39.76"
114 6 Ernst de Vreede
            },
115 6 Ernst de Vreede
            "500": {
116 6 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-12.46",
117 6 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-12.20",
118 6 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-12.19",
119 6 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-12.61",
120 6 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-12.59"
121 6 Ernst de Vreede
            }
122 6 Ernst de Vreede
        }
123 6 Ernst de Vreede
    }
124 6 Ernst de Vreede
125 6 Ernst de Vreede
]
126 6 Ernst de Vreede
</code></pre>
127 1 Maarten Plieger
128 7 Ernst de Vreede
A request can also be for multiple variables:
129 7 Ernst de Vreede
http://bvmlab-218-41.knmi.nl/cgi-bin/ECMD_EUR.cgi?&SERVICE=WMS&REQUEST=GetPointValue&VERSION=1.1.1
130 7 Ernst de Vreede
&SRS=EPSG:4326&QUERY_LAYERS=201306130000/Temperature_pl,201306130000/ZGeo_Height&X=5.2&Y=52.0
131 7 Ernst de Vreede
&INFO_FORMAT=application/json&time=2013-06-13T00:00:00Z/2013-06-13T12:00:00Z&DIM_pressure=300,500
132 7 Ernst de Vreede
133 7 Ernst de Vreede
Output:
134 9 Ernst de Vreede
<pre><code class="json">
135 7 Ernst de Vreede
[
136 7 Ernst de Vreede
137 7 Ernst de Vreede
    {
138 7 Ernst de Vreede
        "name": "air_temperature",
139 7 Ernst de Vreede
        "standard_name": "air_temperature",
140 7 Ernst de Vreede
        "units": "Celsius",
141 7 Ernst de Vreede
        "point": {
142 7 Ernst de Vreede
            "SRS": "EPSG:4326",
143 7 Ernst de Vreede
            "coords": "5.200000,52.000000"
144 7 Ernst de Vreede
        },
145 7 Ernst de Vreede
        "dims": [
146 7 Ernst de Vreede
            "pressure",
147 7 Ernst de Vreede
            "time"
148 7 Ernst de Vreede
        ],
149 7 Ernst de Vreede
        "data": {
150 7 Ernst de Vreede
            "300": {
151 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-39.54",
152 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-39.69",
153 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-39.62",
154 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-39.57",
155 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-39.76"
156 7 Ernst de Vreede
            },
157 7 Ernst de Vreede
            "500": {
158 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-12.46",
159 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-12.20",
160 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-12.19",
161 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-12.61",
162 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-12.59"
163 7 Ernst de Vreede
            }
164 7 Ernst de Vreede
        }
165 7 Ernst de Vreede
    },
166 7 Ernst de Vreede
    {
167 7 Ernst de Vreede
        "name": "height",
168 7 Ernst de Vreede
        "standard_name": "height",
169 7 Ernst de Vreede
        "units": "m",
170 7 Ernst de Vreede
        "point": {
171 7 Ernst de Vreede
            "SRS": "EPSG:4326",
172 7 Ernst de Vreede
            "coords": "5.200000,52.000000"
173 7 Ernst de Vreede
        },
174 7 Ernst de Vreede
        "dims": [
175 7 Ernst de Vreede
            "pressure",
176 7 Ernst de Vreede
            "time"
177 7 Ernst de Vreede
        ],
178 7 Ernst de Vreede
        "data": {
179 7 Ernst de Vreede
            "300": {
180 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "9426",
181 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "9411",
182 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "9398",
183 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "9392",
184 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "9377"
185 7 Ernst de Vreede
            },
186 7 Ernst de Vreede
            "500": {
187 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "5723",
188 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "5710",
189 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "5696",
190 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "5689",
191 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "5677"
192 7 Ernst de Vreede
            }
193 7 Ernst de Vreede
        }
194 7 Ernst de Vreede
    }
195 7 Ernst de Vreede
196 7 Ernst de Vreede
]
197 7 Ernst de Vreede
</code></pre>
198 7 Ernst de Vreede
199 1 Maarten Plieger
h2. GetMetaData
200 10 Ernst de Vreede
201 10 Ernst de Vreede
h2. ncWMS extensions
202 10 Ernst de Vreede
203 11 Ernst de Vreede
A number of extensions that where built into ncwms (http://www.resc.rdg.ac.uk/trac/ncWMS) are also built into the ADAGUC service.