Observation API

Gets the observation station that is closest to the location that has been given based on the paramters. It returns only Environment Canada weather stations or regional Personal Weather stations.

e.g. http://developer.simcoe-weather.com/api/?method=simcoeweather.obs.get&location=Barrie...

Parameters

Required
method
The method to call this particular method

Optional
units
Specifies the units. If set to "f" it will displays all values in english units (fahrenheit, miles per hour etc), otherwise the values will be all metric
location
The location of the forecast (within south-central Ontario). It will also compare the distance between the location you searched and the closest observation station
metar_code
Filters the results to only show a certain observation based on a inputted metar code
obs_id
Filters the results to show only an observation based on a certain station id in our database
obs_ec
If set to "true" it will only get the Environment Canada observations
obs_pws
If set to "true" it will only get the Personal Weather Station observations
last_24_hours
If set to "true" and "obs_id" does not equal nothing, then it will show all observations within the last 24 hours for that particular station
format
The desired response format, which can be either "XML", "KML" or "JSON". (Default value is XML.)
callback
Name of a function to call. This is primarily to enable cross-domain javascript requests using the <script> tag, sometimes known as "JSONP". This works only when the parameter "format" is set to "JSON"

If there is no filter then it will list all of the latest weather observations in our forecast area.

Sample Response

<sw status="ok">
<location>
<place>Barrie</place>
<latitude>44.389244</latitude>
<longitude>-79.690162</longitude>
</location>
<observation>
<last_updated>
<date_stamp>2009-11-18 17:20:00</date_stamp>
<unix_stamp>1258582800</unix_stamp>
</last_updated>
<station>Lake Simcoe Regional Airport</station>
<condition/>
<temperature>-1.1</temperature>
<dewpoint>-7.5</dewpoint>
<pressure>102.8</pressure>
<humidity>62</humidity>
<winddir>WNW</winddir>
<windspeed>18</windspeed>
<windgust/>
<distance_from_location>14</distance_from_location>
</observation>
</sw>

Note: All times displayed are in GMT/UTC.

Errors

40: Invalid Method - You have entered an incorrect API method.
50: To many requests per day - You have accessed this API to many times during a 1 hour period.