Project

General

Profile

WMSExtensions » History » Version 14

Maarten Plieger, 06/06/2017 10:52 AM

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 14 Maarten Plieger
For multimodel timeseries please check [[Ensemble timeseries]]
8 14 Maarten Plieger
9 2 Ernst de Vreede
The ADAGUC service extends the GetFeatureInfo call in a number of aspects:
10 2 Ernst de Vreede
11 2 Ernst de Vreede
New request parameters:
12 5 Ernst de Vreede
13 5 Ernst de Vreede
* ...
14 2 Ernst de Vreede
* JSONP=<javascript_function_name> _data is returned as JavaScript code, where provided function is called with JSON result_
15 2 Ernst de Vreede
16 2 Ernst de Vreede
Extended request parameters:
17 2 Ernst de Vreede
* INFO_FORMAT=<FORMAT> _which can be image/gif, image/png, text/plain, application/xml, text/html, application/json
18 2 Ernst de Vreede
19 2 Ernst de Vreede
h3. JSON format
20 2 Ernst de Vreede
21 4 Ernst de Vreede
The URL
22 4 Ernst de Vreede
http://bvmlab-218-41.knmi.nl/cgi-bin/ECMD_EUR.cgi?&SERVICE=WMS&REQUEST=GetFeatureInfo&VERSION=1.1.1
23 4 Ernst de Vreede
&SRS=EPSG%3A4326&LAYERS=201306130000%2FLS_precipitation&QUERY_LAYERS=201306130000%2FLS_precipitation
24 4 Ernst de Vreede
&BBOX=-180,-131.06076210092687,180,131.06076210092687&WIDTH=971&HEIGHT=707&X=482&Y=224
25 4 Ernst de Vreede
&FORMAT=image/gif&INFO_FORMAT=application/json&STYLES=&&time=2013-06-13T00:00:00Z/2013-06-16T03:00:00Z
26 1 Maarten Plieger
27 4 Ernst de Vreede
gives the following result:
28 4 Ernst de Vreede
<pre><code class="json">
29 4 Ernst de Vreede
[
30 4 Ernst de Vreede
31 4 Ernst de Vreede
    {
32 4 Ernst de Vreede
        "name": "large_scale_precipitation",
33 4 Ernst de Vreede
        "standard_name": "large_scale_precipitation",
34 4 Ernst de Vreede
        "units": "mm",
35 4 Ernst de Vreede
        "point": {
36 4 Ernst de Vreede
            "SRS": "EPSG:4326",
37 4 Ernst de Vreede
            "coords": "-1.297631,48.012358"
38 4 Ernst de Vreede
        },
39 4 Ernst de Vreede
        "dims": "time",
40 4 Ernst de Vreede
        "data": {
41 4 Ernst de Vreede
            "2013-06-13T03:00:00Z": "0.000",
42 4 Ernst de Vreede
            "2013-06-13T06:00:00Z": "0.000",
43 4 Ernst de Vreede
            "2013-06-13T09:00:00Z": "0.222",
44 4 Ernst de Vreede
            "2013-06-13T12:00:00Z": "0.552",
45 4 Ernst de Vreede
            "2013-06-13T15:00:00Z": "0.565",
46 4 Ernst de Vreede
            "2013-06-13T18:00:00Z": "0.565",
47 4 Ernst de Vreede
            "2013-06-13T21:00:00Z": "0.565",
48 4 Ernst de Vreede
            "2013-06-14T00:00:00Z": "0.568",
49 4 Ernst de Vreede
            "2013-06-14T03:00:00Z": "0.568",
50 4 Ernst de Vreede
            "2013-06-14T06:00:00Z": "0.568",
51 4 Ernst de Vreede
            "2013-06-14T09:00:00Z": "0.568",
52 4 Ernst de Vreede
            "2013-06-14T12:00:00Z": "0.568",
53 4 Ernst de Vreede
            "2013-06-14T15:00:00Z": "0.568",
54 4 Ernst de Vreede
            "2013-06-14T18:00:00Z": "0.568",
55 4 Ernst de Vreede
            "2013-06-14T21:00:00Z": "0.566",
56 4 Ernst de Vreede
            "2013-06-15T00:00:00Z": "0.566",
57 4 Ernst de Vreede
            "2013-06-15T03:00:00Z": "0.566",
58 4 Ernst de Vreede
            "2013-06-15T06:00:00Z": "0.614",
59 4 Ernst de Vreede
            "2013-06-15T09:00:00Z": "1.021",
60 4 Ernst de Vreede
            "2013-06-15T12:00:00Z": "1.027",
61 4 Ernst de Vreede
            "2013-06-15T15:00:00Z": "1.027",
62 4 Ernst de Vreede
            "2013-06-15T18:00:00Z": "1.027",
63 4 Ernst de Vreede
            "2013-06-15T21:00:00Z": "1.027",
64 4 Ernst de Vreede
            "2013-06-16T00:00:00Z": "1.027",
65 4 Ernst de Vreede
            "2013-06-16T03:00:00Z": "1.027"
66 4 Ernst de Vreede
        }
67 4 Ernst de Vreede
    }
68 4 Ernst de Vreede
69 4 Ernst de Vreede
]
70 4 Ernst de Vreede
</code></pre>
71 4 Ernst de Vreede
72 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.
73 4 Ernst de Vreede
The following code is an example of Javascript to handle the json:
74 8 Ernst de Vreede
<pre><code class="JavaScript">
75 4 Ernst de Vreede
//JSON result is parsed and stored in the variable precip
76 4 Ernst de Vreede
precip["units"] is the units description
77 4 Ernst de Vreede
precip["dims"] is an array of the dimensions.
78 4 Ernst de Vreede
precip["data"]["2013-06-16T03:00:00Z"] is the last value of the requested timeseries data.
79 4 Ernst de Vreede
</code></pre>
80 4 Ernst de Vreede
81 2 Ernst de Vreede
h2. GetPointValue
82 2 Ernst de Vreede
83 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.
84 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.
85 2 Ernst de Vreede
86 6 Ernst de Vreede
Parameters for a GetPointValue request are:
87 2 Ernst de Vreede
88 6 Ernst de Vreede
An example of a multi-dimensional data request:
89 6 Ernst de Vreede
http://bvmlab-218-41.knmi.nl/cgi-bin/ECMD_EUR.cgi?&SERVICE=WMS&REQUEST=GetPointValue&VERSION=1.1.1
90 6 Ernst de Vreede
&SRS=EPSG:4326&QUERY_LAYERS=201306130000/Temperature_pl&X=5.2&Y=52.0&INFO_FORMAT=application/json&
91 6 Ernst de Vreede
time=2013-06-13T00:00:00Z/2013-06-13T12:00:00Z&DIM_pressure=300,500
92 6 Ernst de Vreede
93 6 Ernst de Vreede
Output:
94 6 Ernst de Vreede
<pre><code class="json">
95 6 Ernst de Vreede
[
96 6 Ernst de Vreede
97 6 Ernst de Vreede
    {
98 6 Ernst de Vreede
        "name": "air_temperature",
99 6 Ernst de Vreede
        "standard_name": "air_temperature",
100 6 Ernst de Vreede
        "units": "Celsius",
101 6 Ernst de Vreede
        "point": {
102 6 Ernst de Vreede
            "SRS": "EPSG:4326",
103 6 Ernst de Vreede
            "coords": "5.200000,52.000000"
104 6 Ernst de Vreede
        },
105 6 Ernst de Vreede
        "dims": [
106 6 Ernst de Vreede
            "pressure",
107 6 Ernst de Vreede
            "time"
108 6 Ernst de Vreede
        ],
109 6 Ernst de Vreede
        "data": {
110 6 Ernst de Vreede
            "300": {
111 6 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-39.54",
112 6 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-39.69",
113 6 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-39.62",
114 6 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-39.57",
115 6 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-39.76"
116 6 Ernst de Vreede
            },
117 6 Ernst de Vreede
            "500": {
118 6 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-12.46",
119 6 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-12.20",
120 6 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-12.19",
121 6 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-12.61",
122 6 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-12.59"
123 6 Ernst de Vreede
            }
124 6 Ernst de Vreede
        }
125 6 Ernst de Vreede
    }
126 6 Ernst de Vreede
127 6 Ernst de Vreede
]
128 6 Ernst de Vreede
</code></pre>
129 1 Maarten Plieger
130 7 Ernst de Vreede
A request can also be for multiple variables:
131 7 Ernst de Vreede
http://bvmlab-218-41.knmi.nl/cgi-bin/ECMD_EUR.cgi?&SERVICE=WMS&REQUEST=GetPointValue&VERSION=1.1.1
132 7 Ernst de Vreede
&SRS=EPSG:4326&QUERY_LAYERS=201306130000/Temperature_pl,201306130000/ZGeo_Height&X=5.2&Y=52.0
133 7 Ernst de Vreede
&INFO_FORMAT=application/json&time=2013-06-13T00:00:00Z/2013-06-13T12:00:00Z&DIM_pressure=300,500
134 7 Ernst de Vreede
135 7 Ernst de Vreede
Output:
136 9 Ernst de Vreede
<pre><code class="json">
137 7 Ernst de Vreede
[
138 7 Ernst de Vreede
139 7 Ernst de Vreede
    {
140 7 Ernst de Vreede
        "name": "air_temperature",
141 7 Ernst de Vreede
        "standard_name": "air_temperature",
142 7 Ernst de Vreede
        "units": "Celsius",
143 7 Ernst de Vreede
        "point": {
144 7 Ernst de Vreede
            "SRS": "EPSG:4326",
145 7 Ernst de Vreede
            "coords": "5.200000,52.000000"
146 7 Ernst de Vreede
        },
147 7 Ernst de Vreede
        "dims": [
148 7 Ernst de Vreede
            "pressure",
149 7 Ernst de Vreede
            "time"
150 7 Ernst de Vreede
        ],
151 7 Ernst de Vreede
        "data": {
152 7 Ernst de Vreede
            "300": {
153 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-39.54",
154 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-39.69",
155 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-39.62",
156 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-39.57",
157 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-39.76"
158 7 Ernst de Vreede
            },
159 7 Ernst de Vreede
            "500": {
160 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "-12.46",
161 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "-12.20",
162 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "-12.19",
163 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "-12.61",
164 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "-12.59"
165 7 Ernst de Vreede
            }
166 7 Ernst de Vreede
        }
167 7 Ernst de Vreede
    },
168 7 Ernst de Vreede
    {
169 7 Ernst de Vreede
        "name": "height",
170 7 Ernst de Vreede
        "standard_name": "height",
171 7 Ernst de Vreede
        "units": "m",
172 7 Ernst de Vreede
        "point": {
173 7 Ernst de Vreede
            "SRS": "EPSG:4326",
174 7 Ernst de Vreede
            "coords": "5.200000,52.000000"
175 7 Ernst de Vreede
        },
176 7 Ernst de Vreede
        "dims": [
177 7 Ernst de Vreede
            "pressure",
178 7 Ernst de Vreede
            "time"
179 7 Ernst de Vreede
        ],
180 7 Ernst de Vreede
        "data": {
181 7 Ernst de Vreede
            "300": {
182 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "9426",
183 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "9411",
184 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "9398",
185 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "9392",
186 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "9377"
187 7 Ernst de Vreede
            },
188 7 Ernst de Vreede
            "500": {
189 7 Ernst de Vreede
                "2013-06-13T00:00:00Z": "5723",
190 7 Ernst de Vreede
                "2013-06-13T03:00:00Z": "5710",
191 7 Ernst de Vreede
                "2013-06-13T06:00:00Z": "5696",
192 7 Ernst de Vreede
                "2013-06-13T09:00:00Z": "5689",
193 7 Ernst de Vreede
                "2013-06-13T12:00:00Z": "5677"
194 7 Ernst de Vreede
            }
195 7 Ernst de Vreede
        }
196 7 Ernst de Vreede
    }
197 7 Ernst de Vreede
198 7 Ernst de Vreede
]
199 7 Ernst de Vreede
</code></pre>
200 7 Ernst de Vreede
201 1 Maarten Plieger
h2. GetMetaData
202 10 Ernst de Vreede
203 12 Ernst de Vreede
The GetMetaData request fetches the metadata for a layer of a service.
204 12 Ernst de Vreede
205 12 Ernst de Vreede
An example URL:
206 12 Ernst de Vreede
207 12 Ernst de Vreede
http://bvmlab-218-41.knmi.nl/cgi-bin/ECMD_EUR.cgi?&SERVICE=WMS&REQUEST=GetMetaData&VERSION=1.1.1
208 12 Ernst de Vreede
&LAYER=201306130000%2FZGeo_Height&FORMAT=text/html&&time=2013-06-16T03%3A00%3A00Z&DIM_pressure=300
209 12 Ernst de Vreede
210 12 Ernst de Vreede
Output:
211 12 Ernst de Vreede
<pre>
212 12 Ernst de Vreede
CCDFDataModel {
213 12 Ernst de Vreede
dimensions:
214 12 Ernst de Vreede
	lats_1 = 101 ;
215 12 Ernst de Vreede
	lons_1 = 201 ;
216 12 Ernst de Vreede
	time = 26 ;
217 12 Ernst de Vreede
	pressure_level = 5 ;
218 12 Ernst de Vreede
	time2 = 25 ;
219 12 Ernst de Vreede
variables:
220 12 Ernst de Vreede
	float lats_1(lats_1) ;
221 12 Ernst de Vreede
		lats_1:units = "degrees_north" ;
222 12 Ernst de Vreede
		lats_1:long_name = "latitude" ;
223 12 Ernst de Vreede
		lats_1:standard_name = "latitude" ;
224 12 Ernst de Vreede
	float lons_1(lons_1) ;
225 12 Ernst de Vreede
		lons_1:units = "degrees_east" ;
226 12 Ernst de Vreede
		lons_1:long_name = "longitude" ;
227 12 Ernst de Vreede
		lons_1:standard_name = "longitude" ;
228 12 Ernst de Vreede
	double time(time) ;
229 12 Ernst de Vreede
		time:long_name = "time" ;
230 12 Ernst de Vreede
		time:standard_name = "time" ;
231 12 Ernst de Vreede
		time:units = "hours since 2013-06-13 00:00:00" ;
232 12 Ernst de Vreede
	float pressure_level(pressure_level) ;
233 12 Ernst de Vreede
		pressure_level:units = "hPa" ;
234 12 Ernst de Vreede
		pressure_level:standard_name = "pressure_level" ;
235 12 Ernst de Vreede
		pressure_level:long_name = "pressure_level" ;
236 12 Ernst de Vreede
		pressure_level:positive = "down" ;
237 12 Ernst de Vreede
	double time2(time2) ;
238 12 Ernst de Vreede
...
239 12 Ernst de Vreede
...
240 12 Ernst de Vreede
...
241 12 Ernst de Vreede
</pre>
242 12 Ernst de Vreede
243 12 Ernst de Vreede
The metadata returned usually looks like an ncdump output for the requested data.
244 12 Ernst de Vreede
245 10 Ernst de Vreede
h2. ncWMS extensions
246 10 Ernst de Vreede
247 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.
248 13 Maarten Plieger
[[NCWMSExtensions]]