Project

General

Profile

WMSExtensions » History » Version 5

Ernst de Vreede, 06/13/2013 02:42 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 4 Ernst de Vreede
<pre><code="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 2 Ernst de Vreede
85 1 Maarten Plieger
86 1 Maarten Plieger
h2. GetMetaData