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

[Test description] SPT #58

Open
mbeaufils opened this issue Aug 3, 2023 · 4 comments
Open

[Test description] SPT #58

mbeaufils opened this issue Aug 3, 2023 · 4 comments

Comments

@mbeaufils
Copy link
Collaborator

mbeaufils commented Aug 3, 2023

This issue is for the provision of examples of SPT declarations as Sensor instance in STA.

{
"@iot.id": 1,
"sensorType": "Ideally an entry of a controlled vocabulary to identify the type of test that is performed.",
"name": "A name given to the test that was performed. Most of the time the code / name that is used to mentionned the test",
"description": "Free text you can write to describe the test that was performed",
"metadata": "A link to a resource that propose extra information about the test",
"encodingType": "Type of encoding that is used for the metadata",
"properties": {

"Hammer serial number from manufacturer" : "AB1234",
"Energy ratio of the hammer (%)" : "60",
"Self-weight penetration (mm)" : "25",
"SPT carried out in soft rock" : "No",
"Accrediting body and reference number (when appropriate)" : "UKAS 0000",
"Test status" : "Checked",
"Associated file reference (e.g. test result sheets)"

}
}

@mbeaufils
Copy link
Collaborator Author

mbeaufils commented Aug 3, 2023

{
"@iot.id": 1,
"sensorType": "https://data.geoscience.fr/ncl/Proc/91",
"name": "SPT Test XXX",
"description": "If I had some comments to provide about this test I would have written them here.",
"encodingType": "application/pdf",
"metadata": "https://URItoTheReport/doc.pdf",
"properties": {
"Hammer serial number from manufacturer" : "AB1234",
"Energy ratio of the hammer (%)" : "60",
"Self-weight penetration (mm)" : "25",
"SPT carried out in soft rock" : "No",
"Accrediting body and reference number (when appropriate)" : "UKAS 0000",
"Test status" : "Checked",
"Associated file reference (e.g. test result sheets) : "FS11"
}
}

@mbeaufils
Copy link
Collaborator Author

mbeaufils commented Sep 7, 2023

Alternatives to address values / units :

option 1: separated properties
"properties": {
"energyRatio": 60,
"energyRatioUnit":"%"
}

option 2: value and unit together
"properties": {
"energyRatio": {"value":60, "unit":"%"}
}

option 3: reference to a doc that specify the unit
"properties":{
"energyRatio": 60,
"conformsTo":"BestPracticeUrl"
}

@dponti
Copy link
Collaborator

dponti commented Sep 13, 2023

I would suggest that option 2 above is the cleanest way to handle measurement values where there may be a unit, and wheer applicable, a reason for a null value, using the following object:

{"value": "...","uom": "...","nilreason": "..."}, where ... indicates the inserted value.

I would also like to propose an "other": property, an object to hold values for properties not ore-defined iwithin another object - it would look something like the following:

{"propertyName": "...","value": "...","uom": "..."}

I also think that where there is a logical organization of properties (eg. info about equipment or the standard used) that these be combined into objects.

Question: Does JSON allow repeated properties of the same name? (eg. cardinality > 1). This should be the case for the "other": object where there may be more than one additional property added.

See below an example for SPT that includes test proceure properties also extracted from DIGGS:


"@iot.id": 1,
"sensorType": "Ideally an entry of a controlled vocabulary to identify the type of test that is performed.",
"name": "A name given to the test that was performed. Most of the time the code / name that is used to mentionned the test",
"description": "Free text you can write to describe the test that was performed",
"metadata": "A link to a resource that propose extra information about the test",
"encodingType": "Type of encoding that is used for the metadata",
"properties": {

"testStatus" : "...",
"testInSoftRock: "...",

"TestStandard": {
	"name": "...",
	"description": "...",
	"accreditingBody": "...",
	"clause": "...",
	"part": "...",
	"referenceNumber": "...",
	"version": "...",
	"other": {"propertyName": "...","value": "...","uom": "..."}	
 },

"Hammer": {
	"type": "...",
	"model": "...",
	"serialNumber": ".,,",
	"mass": {"value": "...","uom": "...","nilreason": "..."},
	"dropHeight": {"value": "...","uom": "...","nilreason": "..."},
	"energyRatio": {"value": "...","uom": "...","nilreason": "..."},
	"other": {"propertyName": "...","value": "...","uom": "..."}
},

"Sampler": {
	"length": {"value": "...","uom": "...","nilreason": "..."},
	"internalDiameter": {"value": "...","uom": "...","nilreason": "..."},
	"linerDescription": ",,,",
	"retainerDescription": "...",
	"other": {"propertyName": "...","value": "...","uom": "..."}	
},

"Rod": (
	"type": "...",
	"externalDiameter: {"value": "...","uom": "...","nilreason": "..."},
	"sectionLength": {"value": "...","uom": "...","nilreason": "..."},
	"rodWeightPerUnitLength": {"value": "...","uom": "...","nilreason": "..."},
	"other": {"propertyName": "...","value": "...","uom": "..."}
)

"selfWeightPenetration": {"value": "...","uom": "...","nilreason": "..."},
"casingDepth": {"value": "...","uom": "...","nilreason": "..."},
"depthToWater": {"value": "...","uom": "...","nilreason": "..."},
"other": {"propertyName": "...","value": "...","uom": "..."}		

}
}

@hylkevds
Copy link
Collaborator

Question: Does JSON allow repeated properties of the same name? (eg. cardinality > 1).

No and Yes.
In an Object ({}) each key is only allowed to appear once, but the value can be an array. In this array you can then have multiple items of any type.

But in the case of this "other" property, the sub-properties in this won't have duplicate names, so the better way of modeling this is:

{
  "other": {
    "property1": {"value": "...","uom": "..."},
    "property2": {"value": "...","uom": "..."}
  }
}

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

No branches or pull requests

3 participants