How to best represent Qualifier Codes in WaterML2 timeseries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to best represent Qualifier Codes in WaterML2 timeseries

dlcoyle
I'd like to get an opinion on two perspectives for representing qualifiers in WaterML time series output.

For example, see: http://waterservices.usgs.gov/nwis/iv/?format=waterml,2.0&sites=01646500¶meterCd=00060,00065

Thanks in advance! -- David Coyle, USGS, OWI SE, NWISWeb

The problem is that we want to be able to provide three "items":
  1) The actual value of the code -- ie. "S"
  2) The domain it refers to -- ie. geLevMethCd, or gwLevStatusCd,
  3) The definition of that code within the domain -- xlink:href="http://waterdata.usgs.gov/nwisweb/rdf?gwLevStatusCd=S"

So the first approach is to use the basic approach as follows (based on one of the well-known examples from the docs):

We don't see an xlink:value attribute but we did find an xlink:label at https://www.w3.org/TR/xlink/   section 4.1.

So we thought something like this be possible:
  <wml2:qualifier  xlink:label=S xlink:title="gwLevStatusCd" xlink:href="http://waterdata.usgs.gov/nwisweb/rdf?gwLevStatusCd=S” />

However, if we can't find a valid way to include the raw code value we may just have to either overload title like -->> xlink:title="gwLevStatusCd:S"  or make the user parse it off the end of the URI.


So this discussion brought forward the question should we use the swe:Category. The counter argument of course is that this approach is not complex and not warranted. An advantage of this approach (to me at least) is that we have use of the optional swe:label, as well as the optional swe:codespace. So here is the counter-proposal that we are currently considering:

The counter example proposed earlier and now introduces the use of swe:label which addresses the concern about showing the domain it refers to, as well as a place to show the value (swe:value). It also makes it possible to eliminate the xlink "title" field - which may be unclear in its meaning for users. The swe:codespace field can be removed for now but is available for possible future use:

<wml2:point>
  <wml2:MeasurementTVP>
    <wml2:time>2016-08-17T11:15:00-05:00</wml2:time>
    <wml2:value>3010.0</wml2:value>
    <wml2:metadata>
      <wml2:TVPMeasurementMetadata>
        <wml2:qualifier>
          <swe:Category definition="http://waterdata.usgs.gov/nwisweb/rdf?ivQualCd=e">
            <swe:label>IVQualCode</swe:label>
            <swe:value>e</swe:value>
          </swe:Category>
        </wml2:qualifier>
      </wml2:TVPMeasurementMetadata>
    </wml2:metadata>
  </wml2:MeasurementTVP>
</wml2:point>

Note: This second proposal is based on the OGC SWE Common Data Model Encoding Standard, Section 1.1.13 (pages 81-83), Quality Element Group.



Reply | Threaded
Open this post in threaded view
|

Re: How to best represent Qualifier Codes in WaterML2 timeseries

Carsten Hollmann
Hi David,

the XLink approach with the xlink:href, xlink:title and xlink:label
attributes is certainly a compact variant to  provide the information
but in this case you have to define how the user has to interpret the
attributes, for example by a profile definition.

With the swe:Category approach increases the doc but I guess it is
easier to interpret and directly understandable. This approach is also
used in the OGC WaterML 2.0 Qualifier example [0]. And as you mentioned,
the optional elements/attributes of the swe:Category can be used in the
future to add more information.

Best,
Carsten

[0]
http://schemas.opengis.net/waterml/2.0/examples/measurement-timeseries-qualifier.xml
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: How to best represent Qualifier Codes in WaterML2 timeseries

TSlawecki
Carsten/others -

We are interested in including similar qualifiers with our data. Some questions:

  - Can XLink qualifiers currently be inserted as part of an InsertResultTemplate?

  - If not, is there an example of a preferred way to do this?

  - Are there any issues related to sparseness - e.g. do we need to have qualifiers for all data, or just for questionable?

Thanks,

Tad
 
Reply | Threaded
Open this post in threaded view
|

Re: How to best represent Qualifier Codes in WaterML2 timeseries

Carsten Hollmann
Hi Tad,

>   - Can XLink qualifiers currently be inserted as part of an
> InsertResultTemplate?

No, qualifiers are currently not supported by the 52N SOS and so they
can not be inserted via InsertResultTemplate.

>   - If not, is there an example of a preferred way to do this?

In the development version of the SOS you can use the om:parameter for
single observations.

>   - Are there any issues related to sparseness - e.g. do we need to have
> qualifiers for all data, or just for questionable?

As mentioned before, the qualifiers are not yet supported in the 52N SOS
database model and de-/encoding.

Best,
Carsten
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines