# Sensor Observation Service API for Providing Gridded Climate Data to Agricultural Applications
## 3 Methodology
### Sos Api
#### 3.5.1 getCapabilities  
Clients can ask for available services of urn:NARO:AgroWeatherMesh by issuing getCapabilities request to the service endpoint. The service endpoint of getCapabilities is [19]. An example of an XML request is available at [20]. Table 3 represents the request's parameter of getCapabilities. The response is the information of the available observedProperty and data availability in temporal and spatial dimensions. The metadata of the data source can be obtained from the getCapabilities operation.  
The response of getCapabilities request is in XML encoding. Some part of the response is represented as follows.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Meteorological Variable of AmGSD** & **Refer to Observed Property in SOS** \\ \hline TMP\_mea & daily\_average\_air\_temperature \\ TMP\_max & daily\_maximum\_air\_Temperature \\ TMP\_min & daily\_minimum\_air\_Temperature \\ RH & daily\_average\_relative\_humidity \\ SSD & daily\_sunshine\_duration \\ GSR & daily\_global\_solar\_radiant\_exposure \\ DLR & daily\_downward\_longwave\_radiation \\ APCP & daily\_precipitation \\ WIND & daily\_average\_wind\_speed \\ \hline \hline \end{tabular}
\end{table}
Table 2: Mapping the meteorological variable of AmGSD to observedProperty.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**HTTP/GET** & **HTTP/POST** & **Description** \\ \hline \multirow{2}{*}{sos} & \multirow{2}{*}{N/A} & Defining response encoding. \\  & & true: response is encoded in XML \\ \cline{1-1}  & & false: response is encoded in JSON (JavaScript Object Notation) \\ \hline \hline \end{tabular}
\end{table}
Table 3: Request parameter of the getCapabilities operation.  
<swes:offering> <sos:ObservationOffering> <swes:description>Agro-Meteorological Grid Square Data System</swes:description> <swes:identifier>urn:NARO:AgroWeatherMesh</swes:identifier> <swes:name>Chubu University</swes:name> <swes:procedure>urn:NARO:AgroWeatherMesh</swes:procedure> <swes:observableProperty>daily_average_air_temperature</swes:observableProperty> <swes:observableProperty>daily_maximum_air_temperature</swes:observableProperty> <swes:observableProperty>daily_minimum_air_temperature</swes:observableProperty> <swes:observableProperty>daily_average_relative_humidity</swes:observableProperty> <swes:observableProperty>daily_sunshine_duration</swes:observableProperty> <swes:observableProperty>daily_global_solar_radiant_exposure </swes:observableProperty> <swes:observableProperty>daily_downward_longwave_radiant_exposure </swes:observableProperty> <swes:observableProperty>daily_precipitation</swes:observableProperty> <swes:observableProperty>daily_average_wind_speed</swes:observableProperty> <sos:observedArea> <gml:Envelope ssrsName=\"[[http://www.opengis.net/def/crs/EPSG/0/4326](http://www.opengis.net/def/crs/EPSG/0/4326)]([http://www.opengis.net/def/crs/EPSG/0/4326](http://www.opengis.net/def/crs/EPSG/0/4326))\"> <gml:lowerCorner>24.0 122.0</gml:lowerCorner> <gml:upperCorner>46.0 146.0</gml:upperCorner> </gml:Envelope> </sos:observedArea> <sos:phenomenTime> <gml:TimePeriod gml:id=\"phenomenonTime0\"> <gml:beginPosition>1980-01-01T00:00:00+0900</gml:beginPosition> <gml:endPosition>2016-04-24T00:00:00+0900</gml:endPosition> </gml:TimePeriod> </sos:phenomenTime> </sos:ObservationOffering> </swes:offering> ```  
The above response means nine of the observedProperty are available for requesting. The coverage area of the service is within 24.0 122.0 and 46.0 146.0, and the data are available from 1 st January 1980 until 24 th April 2016. According to the getCapabilities response, clients can filter data on the getObservation operation.