w3c / sdw-sosa-ssn

Repository of the Spatial Data on the Web Working Group for the SOSA/SSN vocabulary
7 stars 5 forks source link

Missing `SamplingCollection`? #189

Open alexrobin opened 5 months ago

alexrobin commented 5 months ago

I noticed that we have added ObservationCollection, ActuationCollection and SampleCollection to SOSA.

But the actual equivalent of ObservationCollection and ActuationCollection in the sampling module would be SamplingCollection.

While SampleCollection is also useful, I was wondering if the omission of SamplingCollection was intentional.

dr-shorthair commented 5 months ago

Yes - this was intentional. The mismatch was discussed here: https://github.com/w3c/sdw-sosa-ssn/issues/51#issuecomment-1738334326 etc.

The choices of new classes were based on articulated requirements. No-one asked for SamplingCollection and it is less obvious that it would be used. As you know, ActuationCollection was only introduced recently in response to your use-cases.

I recognise that there is a gap that symmetry suggests could be filled. OTOH it could also be argued that Sampling is a subclass of Actuation, so perhaps that conversation should be had first.

ashleysommer commented 2 months ago

@dr-shorthair I've come across this same issue, I need to use a SamplingCollection to group a few hundred thousand Sampling instances with common properties (same usedProcedure, same hasFeatureOfInterest, etc).

As Observation and Sampling are both actions, the use case would be exactly the same as how ObservationCollection is used, simply reducing the number of triples in a Graph by hoisting common properties to the collection level. I agree with the final comments in #51, it seems like when creating SampleCollection there was a missed opportunity because SampleCollection is at the level of ResultCollection, and SamplingCollection should have been created as sample-counterpoint to ObservationCollection.

In the absence of SamplingCollection, what is the recommend method to achieve this result?

dr-shorthair commented 2 months ago

No-one asked for SamplingCollection and it is less obvious that it would be used.

Now it looks like @ashleysommer is asking. Good. (I hope he can also provide 'evidence of implementation' in support ;-) )

To start the process of also adding SamplingCollection please branch/fork and make a PR. At a minimum, the following files will need changing:

dr-shorthair commented 1 month ago

@ashleysommer could you prepare a PR to address this?

ashleysommer commented 1 month ago

Thanks for your response @dr-shorthair Yes, I definitely intend to submit a PR for this, I just need to find the time this week to get it written up.

In regard to 'evidence of implementation', what does that look like? Is it an example usecase of how we'd like to apply SamplingCollection in our datasets, or would it be something like a PR to include the SamplingCollection profiled in the TERN Observations Ontology?

dr-shorthair commented 1 month ago

The latter would suffice.

ashleysommer commented 1 month ago

@dr-shorthair ~I notice as part of the introduction of SampleCollection it was decided it could include properties of both Sample and Sampling, that seems a bit odd to me (notably hasSampledFeature and hasOriginalSample) see attached image.~

~Should these be removed from SampleCollection with the introduction of SamplingCollection as the intention is SamplingCollection will capture properties from Sampling?~

image

EDIT: Actually, perhaps I got it around the wrong way, that image is incorrect because it doesn't match the domainIncludes of hasSampledFeature and hasOriginalSample in the ontology, or in the Sampling.html

sosa:hasOriginalSample 
  a owl:ObjectProperty ;
  rdfs:label "has original sample"@en ;
  skos:definition """
  Link to the original sample collected from the ultimate feature of interest that is related to the context Sample or SampleCollection through a chain of isSampleOf relations.
  """@en ;
  schema:domainIncludes sosa:Sample ;
  schema:domainIncludes sosa:SampleCollection ;
  schema:rangeIncludes sosa:Sample ;
  rdfs:isDefinedBy sosa-sam: .

sosa:hasSampledFeature 
  a owl:ObjectProperty ;
  rdfs:label "has ultimate sampled feature"@en ;
  skos:definition """
  Link to the ultimate feature of interest of the context Sample or SampleCollection - i.e. the end of a chain of isSampleOf relations
  """@en ;
  schema:domainIncludes sosa:Sample ;
  schema:domainIncludes sosa:SampleCollection ;
  schema:rangeIncludes sosa:FeatureOfInterest ;
  rdfs:isDefinedBy sosa-sam: .
dr-shorthair commented 1 month ago

Yes - you are correct. The diagram is wrong. The original proposal was here https://www.w3.org/TR/vocab-ssn-ext/#ultimate-feature-of-interest Figure 2. I think this would be the correct diagram?

Sampling

ashleysommer commented 1 month ago

Yep, that revised diagram looks correct to me. Where is the source file for that diagram? It would be good to be able to add SamplingCollection to it for the PR.

dr-shorthair commented 1 month ago

I sent you a link. Suggest adding SamplingCollection in upper right, in common with Actuation and Observation diagrams.

ashleysommer commented 1 month ago

Okay, I got the link, thanks Simon.

ashleysommer commented 1 month ago

It looks like both the ObservationCollection and ActuationCollection are on the upper left of their respective diagrams, so I've done the same for SamplingCollection. How does this look?: Sampling

dr-shorthair commented 1 month ago

You are right. Mild dyslexia strikes again

ashleysommer commented 1 month ago

Here's the work-in-progress Collections diagram, will be submitted with the PR: Collections(1)

Another thing I noticed, it looks like in the Observations diagram and the Actuation diagram (and the Collections diagram), ObservationCollection has hasResult but not hasSimpleResult, and ActuationCollection has neither hasResult nor hasSimpleResult but in the ontology files both collections have hasResult and hasSimpleResult.

dr-shorthair commented 3 weeks ago

@ashleysommer would you be available to give a briefing on your proposal at a Wednesday evening telecon? People are interested to hear your use-case.