A subset of the live weather details from our weather station have been exposed
as an XML Web Service.
The url to the web service is http://weather.cobbnz.com/weatherservice/webservice.asmx
Another simple web page that returns XML has also been written that will allow you
to simply extract relevant details
from our current weather data.
<
weather
>
<TemperatureCurrent>4.28</TemperatureCurrent>
<TemperatureFeelsLike>3.1</TemperatureFeelsLike>
<TemperatureAllTimeMin>-5.2</TemperatureAllTimeMin>
<TemperatureAllTimeMinDateTime>8/Jul/2007 07:58:00</TemperatureAllTimeMinDateTime>
<TemperatureAllTimeMax>33.4</TemperatureAllTimeMax>
<TemperatureAllTimeMaxDateTime>12/Jan/2008 01:42:00</TemperatureAllTimeMaxDateTime>
<TemperatureThisYearMin>-3.2</TemperatureThisYearMin>
<TemperatureThisYearMinDateTime>25/Jun/2008 04:33:00</TemperatureThisYearMinDateTime>
<TemperatureThisYearMax>33.4</TemperatureThisYearMax>
<TemperatureThisYearMaxDateTime>12/Jan/2008 01:42:00</TemperatureThisYearMaxDateTime>
<TemperatureTrend>Falling</TemperatureTrend>
<HeatIndexMax>5.4</HeatIndexMax>
<HeatIndexMin>4.1</HeatIndexMin>
<HeatIndex>4.3</HeatIndex>
<UV>0.0</UV>
<Barometer>1027.3</Barometer>
<BarometerTrend>Falling</BarometerTrend>
<Humidex>2.7</Humidex>
<Humidity>87</Humidity>
<HumidityTrend>Rising</HumidityTrend>
<DewPoint>2.3</DewPoint>
<WindAvgSpeed>0.3</WindAvgSpeed>
<WindChill>4.3</WindChill>
<WindChillMin>3.3</WindChillMin>
<WindChillMax>5.4</WindChillMax>
<WindDirection>238</WindDirection>
<WindDirectionAverage>237</WindDirectionAverage>
<RainToday>0.0</RainToday>
<CloudHeight>892.0</CloudHeight>
<SunRise>6:48am</SunRise>
<SunSet>6:07pm</SunSet>
<MoonRise>9:19am</MoonRise>
<MoonSet>12:08am</MoonSet>
<MoonPhase>33</MoonPhase>
<Weather>Night time/Dry</Weather>
<Icon>1</Icon>
<Forecast> PARTLY TO MOSTLY SUNNY IN THE MORNING, BECOMING SUNNY IN THE AFTERNOON. HIGH 15. WIND WEST AROUND 10 KPH IN THE MORNING, BECOMING SOUTH-SOUTHEAST IN THE AFTERNOON.</Forecast>
<ForecastIcon>4</ForecastIcon>
<Date>6/Sep/2008</Date>
<Time>05:09:54</Time>
<Reading>Saturday, 6 Sep, 2008 05:09:54</Reading>
<ReadingTime>5:09 AM</ReadingTime>
<StationName>Fendalton-5:09:54 a.m.</StationName> </weather>
The url to return just simple XML like shown above is:
http://weather.cobbnz.com/weatherservice/xml.aspx
Note: To display the data in this HTML page I used an XSL Stylesheet along with the XML data.
However you may specify a parameter to the URL ( WebServerURL) which is the path
to someone else's client
raw data, this will allow you to use our service to get
data from other sites and render that how you want.
<
weather
>
<TemperatureCurrent>7.4</TemperatureCurrent>
<TemperatureFeelsLike>8.3</TemperatureFeelsLike>
<TemperatureAllTimeMin>-7.3</TemperatureAllTimeMin>
<TemperatureAllTimeMinDateTime>4/Jul/2000 06:00:00</TemperatureAllTimeMinDateTime>
<TemperatureAllTimeMax>41.8</TemperatureAllTimeMax>
<TemperatureAllTimeMaxDateTime>19/Feb/1973 02:39:00</TemperatureAllTimeMaxDateTime>
<TemperatureThisYearMin>-4.2</TemperatureThisYearMin>
<TemperatureThisYearMinDateTime>25/Jun/2008 06:45:00</TemperatureThisYearMinDateTime>
<TemperatureThisYearMax>34.6</TemperatureThisYearMax>
<TemperatureThisYearMaxDateTime>12/Jan/2008 03:27:00</TemperatureThisYearMaxDateTime>
<TemperatureTrend>Falling</TemperatureTrend>
<HeatIndexMax>9.0</HeatIndexMax>
<HeatIndexMin>5.7</HeatIndexMin>
<HeatIndex>7.4</HeatIndex>
<UV>0.0</UV>
<Barometer>1029.8</Barometer>
<BarometerTrend>Falling</BarometerTrend>
<Humidex>6.4</Humidex>
<Humidity>78</Humidity>
<HumidityTrend>Rising</HumidityTrend>
<DewPoint>3.9</DewPoint>
<WindAvgSpeed>0.1</WindAvgSpeed>
<WindChill>7.4</WindChill>
<WindChillMin>5.6</WindChillMin>
<WindChillMax>9.0</WindChillMax>
<WindDirection>338</WindDirection>
<WindDirectionAverage>337</WindDirectionAverage>
<RainToday>0.2</RainToday>
<CloudHeight>1513.5</CloudHeight>
<SunRise>6:47am</SunRise>
<SunSet>6:07pm</SunSet>
<MoonRise>9:19am</MoonRise>
<MoonSet>12:07am</MoonSet>
<MoonPhase>28</MoonPhase>
<Weather>Cloudy/Dry</Weather>
<Icon>19</Icon>
<Forecast>partly cloudy with little temp. change.</Forecast>
<ForecastIcon>2</ForecastIcon>
<Date>5/Sep/2008</Date>
<Time>17:02:00</Time>
<Reading>Friday, 5 Sep, 2008 05:02:00</Reading>
<ReadingTime>5:02 PM</ReadingTime>
<StationName>Burwood -5:02:03 p.m.</StationName> </weather>
The data above is coming from Weather Station - ZL3GP, Burwood, Christchurch,
New Zealand
The url to return the XML data from ZL3GP is:
http://weather.cobbnz.com/weatherservice/xml.aspx?WebServerURL=http://www.zl3gp.co.nz
Here is an example of taking the data from here and processing it using XSL and
rendering just the temperature.
XSL Document
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/Weather">
The current weather temperature is <xsl:value-of select="TemperatureCurrent"></xsl:value-of>
</xsl:template>
</xsl:stylesheet>
Rendered Result
The current weather temperature is 4.28
|