Skip to content

Commit 1bfda78

Browse files
committed
Fix 6 failing examples: remove null stub properties and fix material encoding
Three classes of bug were present: 1. stContactDescription / stFoldDescription set to null (contact.json, fold.json, contacts_complex_scenario.json): the schema defines these stub properties as type:object (ContactAbstractDescription / FoldAbstractDescription), so null fails validation. The properties are optional in GeoSciML Basic — removed them entirely. 2. material objects encoded as flat { "properties": {...}, "lithology": "..." } (geologic_unit.json, geologic_units_isle_of_wight.json, geologic_units_british_columbia.json): CompoundMaterial extends EarthMaterial which extends the JSON-FG Feature schema, so each material must be a full Feature object with type/featureType/id/geometry/properties. Converted to { "type": "Feature", "featureType": "RockMaterial", "id": "...", "geometry": null, "properties": { "lithology": "..." } }. 3. role / proportion set to null in geologic_units_british_columbia.json: CompositionPartRoleTerm is type:string and proportion refs QuantityRange (type:object); neither accepts null. Both fields are optional — removed the null entries.
1 parent 29714e0 commit 1bfda78

6 files changed

Lines changed: 253 additions & 123 deletions

File tree

examples/json/4.1/basic/contact.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"rel": "olderHost"
6363
}
6464
],
65-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/nonconformity",
66-
"stContactDescription": null
65+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/nonconformity"
6766
}
6867
}

examples/json/4.1/basic/fold.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"name": "is test fold",
1212
"description": "Test fold properties — an antiform. Hinge line plunges 33° toward azimuth 330°; axial surface dips 78° toward 310° (Plane_Dip_Dip_Direction convention); fold amplitude 10 m. (Structured orientation and amplitude values are carried in GeoSciML Extension's FoldDescription, not in this Basic encoding.)",
1313
"purpose": "instance",
14-
"profileType": "http://resource.geosciml.org/classifier/cgi/foldprofiletype/antiform",
15-
"stFoldDescription": null
14+
"profileType": "http://resource.geosciml.org/classifier/cgi/foldprofiletype/antiform"
1615
}
1716
}

examples/json/4.1/basic/geologic_unit.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,13 @@
7070
{
7171
"role": "http://resource.geosciml.org/classifier/cgi/compoundmaterialconstituentpartrole/unspecifiedPartRole",
7272
"material": {
73+
"type": "Feature",
74+
"featureType": "RockMaterial",
75+
"id": "hervey-group-mudstone",
76+
"geometry": null,
7377
"properties": {
74-
"purpose": "instance"
75-
},
76-
"lithology": "http://resource.geosciml.org/classifier/cgi/simplelithology/mudstone"
78+
"lithology": "http://resource.geosciml.org/classifier/cgi/simplelithology/mudstone"
79+
}
7780
},
7881
"proportion": {
7982
"type": "QuantityRange",
@@ -86,10 +89,13 @@
8689
{
8790
"role": "http://resource.geosciml.org/classifier/cgi/compoundmaterialconstituentpartrole/unspecifiedPartRole",
8891
"material": {
92+
"type": "Feature",
93+
"featureType": "RockMaterial",
94+
"id": "hervey-group-sandstone",
95+
"geometry": null,
8996
"properties": {
90-
"purpose": "instance"
91-
},
92-
"lithology": "http://resource.geosciml.org/classifier/cgi/simplelithology/sandstone"
97+
"lithology": "http://resource.geosciml.org/classifier/cgi/simplelithology/sandstone"
98+
}
9399
},
94100
"proportion": {
95101
"type": "QuantityRange",

examples/json/4.1/featurecollections/basic/contacts_complex_scenario.json

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
{ "href": "https://example.org/loop3d/JsFormation", "title": "Js Formation (Jurassic) — younger host", "rel": "youngerHost" },
4848
{ "href": "https://example.org/loop3d/OsFormation", "title": "Os Formation (Ordovician) — older host", "rel": "olderHost" }
4949
],
50-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/angular_unconformity",
51-
"stContactDescription": null
50+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/angular_unconformity"
5251
}
5352
},
5453
{
@@ -78,8 +77,7 @@
7877
{ "href": "https://example.org/loop3d/JsFormation", "title": "Js Formation (Jurassic) — younger host", "rel": "youngerHost" },
7978
{ "href": "https://example.org/loop3d/SsFormation", "title": "Ss Formation (Silurian) — older host", "rel": "olderHost" }
8079
],
81-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/angular_unconformity",
82-
"stContactDescription": null
80+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/angular_unconformity"
8381
}
8482
},
8583
{
@@ -109,8 +107,7 @@
109107
{ "href": "https://example.org/loop3d/JsFormation", "title": "Js Formation (Jurassic) — younger host", "rel": "youngerHost" },
110108
{ "href": "https://example.org/loop3d/XmRockBody", "title": "Xm Rock Body (Early Proterozoic gneiss) — older host", "rel": "olderHost" }
111109
],
112-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/nonconformity",
113-
"stContactDescription": null
110+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/nonconformity"
114111
}
115112
},
116113
{
@@ -142,8 +139,7 @@
142139
{ "href": "https://example.org/loop3d/KdDike", "title": "Kd Mafic Dike (Cretaceous) — younger host (intrusive)", "rel": "youngerHost" },
143140
{ "href": "https://example.org/loop3d/JsFormation", "title": "Js Formation (Jurassic) — older host (country rock)", "rel": "olderHost" }
144141
],
145-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/igneous_intrusive_contact",
146-
"stContactDescription": null
142+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/igneous_intrusive_contact"
147143
}
148144
},
149145
{
@@ -175,8 +171,7 @@
175171
{ "href": "https://example.org/loop3d/KgGranite", "title": "Kg Granite (Cretaceous) — younger host (intrusive)", "rel": "youngerHost" },
176172
{ "href": "https://example.org/loop3d/JsFormation", "title": "Js Formation (Jurassic) — older host (country rock)", "rel": "olderHost" }
177173
],
178-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/igneous_intrusive_contact",
179-
"stContactDescription": null
174+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/igneous_intrusive_contact"
180175
}
181176
},
182177
{
@@ -220,8 +215,7 @@
220215
{ "href": "https://example.org/loop3d/MsFormation", "title": "Ms Formation (Late Miocene) — younger host", "rel": "youngerHost" },
221216
{ "href": "https://example.org/loop3d/JsFormation", "title": "Js Formation (Jurassic) — older host", "rel": "olderHost" }
222217
],
223-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/disconformity",
224-
"stContactDescription": null
218+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/disconformity"
225219
}
226220
},
227221
{
@@ -265,8 +259,7 @@
265259
{ "href": "https://example.org/loop3d/MsFormation", "title": "Ms Formation (Late Miocene) — younger host", "rel": "youngerHost" },
266260
{ "href": "https://example.org/loop3d/KgGranite", "title": "Kg Granite (Cretaceous) — older host", "rel": "olderHost" }
267261
],
268-
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/nonconformity",
269-
"stContactDescription": null
262+
"contactType": "http://resource.geosciml.org/classifier/cgi/contacttype/nonconformity"
270263
}
271264
}
272265
]

0 commit comments

Comments
 (0)