52North / sos4R

R client for the OGC Sensor Observation Service
https://52north.github.io/sos4R/
13 stars 13 forks source link

Support for CompositePhenomenon in ObservationOffering #29

Closed nuest closed 5 years ago

nuest commented 10 years ago

The following observed property is not parsed by sos4R:

<sos:observedProperty>
          <swe:CompositePhenomenon gml:id="WaterQuality" dimension="4">
            <gml:name>WaterQuality</gml:name>
            <swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:ID"/>
            <swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:STN_ID"/>
            <swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:DATETIME"/>
            <swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:VALUE"/>
          </swe:CompositePhenomenon>
        </sos:observedProperty>

Taken from https://github.com/nuest/sos4R/blob/0a22387e6dfca886514ac82a3b272ce2f3c9b354/tests/responses/GetCapabilities_Mapserver.xml

Continue in https://github.com/nuest/sos4R/blob/0a22387e6dfca886514ac82a3b272ce2f3c9b354/tests/testthat/capabilities.R

valruggero commented 10 years ago

For subsequent queries I would need sosObservedProperties(__myOfferings)[[1]] to return "WaterQuality"!

nuest commented 9 years ago

Ok. for that to work you (or me) will have to implement a parsing function for the composite phenomenon (similiar to what happens in this function: https://github.com/52North/sos4R/blob/master/R/SWE-methods-parsing.R#L270). Are you interested or able to do this? You can also check if the vignette's section on writing your own parsers can already help you.

I can't say right now when I will be able to implement this, probably not in the next week.

nuest commented 9 years ago

@valruggero you can test the new parsing by installing a branch from GitHub:

devtools::install_github("sos4R", username = "nuest", ref = "parsing")