Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOS 2.0 and WaterML2.0 decoder #171

Closed

Conversation

peterataylor
Copy link

Hi Tom,

As discussed in #131.

Adding a decoder for SOS2.0 GetObservation requests that marshals XML responses from O&M and WaterML2.0 formats.

Summarised again here:

  • om.py - handles O&M types. New classes:
    • OM_Observation - handles base level O&M observation properties, with a result property that will vary depending on the type of observation
    • OM_MeasurementObservation - specialised OM_Observation that has a Measurement result (value + uom)
  • waterml2.py - handles WaterML2.0 types. New classes:
    • Timeseries, MeasurementTimeseries, TimeValuePair, TVPMetadata, TVPMeasurementMetadata, MeasurementTimeseriesDomainRange - types to support timeseries. Not all implemented at this stage, but enough to parse results from SOS2.0 instances, specifically the 52North implementations.
    • MeasurementTimeseriesObservation - specialised OM_Observation that has a time-series as a result.
  • sos200.py - added:
    • SOSGetObservationResponse - container for OM_Observation objects that result from a get_observation call to a SOS.
    • ObservationDecoder - decoder class to handle different OM_Observation types. Currently supports OM_MeasurementObservation & MeasurementTimeseriesObservation.

The main test I've added shows basic usage.

I've also changed the README file to be .MD rather than .txt so it renders on the landing page (peterataylor@df622c7, peterataylor@48ea26b and peterataylor@3730a67). I can take these out of the PR if you prefer.

Also added timeout to get_observation call (default 30 seconds) in sos200. Doctests set this to 120 as the services can be slow in responding.

Updated the doco to include doc tests and supported versions: peterataylor@3600cc8.

@avowkind
Copy link
Contributor

avowkind commented Dec 5, 2014

is this likely to be merged into master soon ? I'd like to use it and although I could get this version directly any examples I create will be for users who will have the master.

@peterataylor
Copy link
Author

Hi Andrew,

Hopefully soon. @tomkralidis - any blockers on this?

@gamesbook
Copy link

I have not studied the code in detail but, in principle, would some/any of the non-WaterML specific code be amenable to porting over to support SOS 1.0 (once its been merged, of course).

@tomkralidis
Copy link
Member

@peterataylor any chance you can rebase/squash this PR to bring it up to date?

dblodgett-usgs and others added 25 commits December 8, 2014 13:44
Values are assigned according to table from CSW specification

| DC Metadata element name | Property mapping to ISO 19139 information model         |
|--------------------------|---------------------------------------------------------|
| creator                  | prefix[role.CI_RoleCode@codeListValue=’**originator**’] |
| publisher                | prefix[role.CI_RoleCode@codeListValue=’**publisher**’]  |
| contributor              | prefix[role.CI_RoleCode@codeListValue=’**author**’]     |
It still contained a reference to the university of north carlolina, which I suppose is wrong
 - SOS clients can specify in the kwargs of the methods
   a timeout which gets passed to the URL request.
support for decoding WaterML2.0 and general Observations & Measurement
types.
@kwilcox
Copy link
Member

kwilcox commented May 15, 2015

@peterataylor I'll look at this once the final python 3 compat PR is merged, thanks for the work

@peterataylor
Copy link
Author

Thanks Kyle. I've been meaning to get back to update this PR, but I'll wait for the v3 changes to go through. Let me know if/when you need a hand.

@kwilcox kwilcox mentioned this pull request May 22, 2015
@kwilcox
Copy link
Member

kwilcox commented May 22, 2015

See #241

@kwilcox kwilcox closed this May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet