from pyoos.collectors.ioos.swe_sos import IoosSweSos
import datetime
dtstart, dtend = datetime.datetime(2013, 12, 25, 3, 0), datetime.datetime(2013, 12, 25, 22, 0)
dataCollector = IoosSweSos(url='http://ioossos.axiomalaska.com/52n-sos-ioos-stable/sos/kvp', xml=None)
c = dataCollector
c.start_time = dtstart
c.end_time = dtend
c.features = ['urn:ioos:station:test:5']
c.variables=['http://mmisw.org/ont/cf/parameter/air_temperature']
#raw=c.raw(offerings=['urn:ioos:station:test:5'], responseFormat='text/xml; subtype="om/1.0.0/profiles/ioos_sos/1.0"')
obs=c.collect(offerings=['urn:ioos:station:test:5'])
ob=obs[0]
ob.feature, len(ob.feature._elements)
(<paegan.cdm.dsg.features.station.Station at 0x106828dd0>, 19)
acoll = IoosSweSos(url='http://64.72.74.102/dev/sos/wflow700-agg.ncml', xml=None)
acoll.start_time = dtstart
acoll.end_time = dtend
acoll.features = ['urn:ioos:station:ncsos:station-700']
acoll.variables=['wind_speed', 'wind_direction']
#acoll.raw(offerings=['urn:ioos:station:ncsos:station-700'], responseFormat='text/xml;schema="om/1.0.0/profiles/ioos_sos/1.0"')
obs=acoll.collect(offerings=['urn:ioos:station:ncsos:station-700'])
ob=obs[0]
ob.feature, len(ob.feature._elements)
(<paegan.cdm.dsg.features.station.Station at 0x1067b5710>, 144)