Skip to content

Commit 3020ac0

Browse files
fix: address PR #40 review comments
- Tighten non_related_link and typed_related_link to require href via shared base_link definition - Convert USGS related-link table fragments into bullet list (no orphan rows) - Fix global_identifier.md link typo in USGS docs - Update README Link Attributes table: roles type as escaped array, refresh column widths
1 parent 5b0edd6 commit 3020ac0

3 files changed

Lines changed: 59 additions & 30 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ For cross-item relationships represented by `rel="related"` links, the link `rol
7171

7272
### Link Attributes
7373

74-
| Field Name | Type | Description |
75-
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
76-
| roles | [string] | Semantic classification for the linked entity. For `rel="related"` links between Monty items, use `event`, `hazard` or `impact` |
77-
| occ_type | string | The type of the occurrence. It can be one of the following values: `known`, `potential` |
78-
| occ_prob | string | It is a qualitative assessment of the likelihood of the linked hazard occurring with the main hazard (e.g. `high`) |
79-
| occ_probdef | uri | It is a link to the definition of the probability for the hazard relationship |
74+
| Field Name | Type | Description |
75+
| ----------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
76+
| roles | \[string] | Semantic classification for the linked entity as an array of strings. For `rel="related"` links between Monty items, use `event`, `hazard` or `impact` |
77+
| occ_type | string | The type of the occurrence. It can be one of the following values: `known`, `potential` |
78+
| occ_prob | string | It is a qualitative assessment of the likelihood of the linked hazard occurring with the main hazard (e.g. `high`) |
79+
| occ_probdef | uri | It is a link to the definition of the probability for the hazard relationship |
8080

8181
#### Additional Field Information
8282

docs/model/sources/USGS/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Here is a table with the fields that are mapped from the USGS event to the STAC
9696
| [`via` link](https://github.com/radiantearth/stac-spec/blob/master/commons/assets.md) | properties.url | Link to the USGS event details page |
9797
| `related` link in [links] | Reference event item | Link to reference event item with `roles: ["event"]` |
9898
| [monty:corr_id](https://ifrcgo.org/monty-stac-extension/v1.1.1/schema.json#monty:corr_id) | Generated | Generated following the [event correlation](../../correlation_identifier.md) convention |
99-
| [monty:guid](https://ifrcgo.org/monty-stac-extension/v1.1.1/schema.json#monty:guid) | Generated | Generated following the [guid string](../../global_identififer.md) convention |
99+
| [monty:guid](https://ifrcgo.org/monty-stac-extension/v1.1.1/schema.json#monty:guid) | Generated | Generated following the [guid string](../../global_identifier.md) convention |
100100

101101
#### Hazard Type Mapping
102102

@@ -110,8 +110,11 @@ USGS (United States Geological Survey) exclusively tracks seismic events. The **
110110
> All three classification codes (GLIDE, EM-DAT, UNDRR-ISC 2025) should be included in the `monty:hazard_codes` array for maximum interoperability. The 2025 update consolidated multiple earthquake-related HIPs (including tsunami, ground shaking, liquefaction, etc.) into a single Earthquake HIP (GH0101). While USGS data may include tsunami-related events through the `properties.tsunami` field, the primary hazard code remains GH0101 for all earthquake events.
111111
112112
This mapping ensures standardized hazard categorization for seismic events from the USGS Earthquake Catalog.
113-
| [`related` link](https://github.com/radiantearth/stac-spec/blob/master/commons/assets.md) | properties.url + "/map" | Link to the USGS interactive map for this event (external resource, not a STAC item relationship) |
114-
| [`related` link](https://github.com/radiantearth/stac-spec/blob/master/commons/assets.md) | properties.url + "/region" | Link to the USGS regional information for this event (external resource, not a STAC item relationship) |
113+
114+
Additional external links produced for USGS events (not STAC item relationships):
115+
116+
- [`related` link](https://github.com/radiantearth/stac-spec/blob/master/commons/assets.md) with `properties.url + "/map"`: Link to the USGS interactive map for this event (external resource, not a STAC item relationship)
117+
- [`related` link](https://github.com/radiantearth/stac-spec/blob/master/commons/assets.md) with `properties.url + "/region"`: Link to the USGS regional information for this event (external resource, not a STAC item relationship)
115118

116119
### Hazard Item (from ShakeMap)
117120

json-schema/schema.json

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,29 @@
271271
"modelled"
272272
]
273273
},
274+
"base_link": {
275+
"$comment": "Minimal STAC Link Object requirements shared by all link variants in this extension.",
276+
"type": "object",
277+
"required": [
278+
"rel",
279+
"href"
280+
],
281+
"properties": {
282+
"rel": {
283+
"type": "string"
284+
},
285+
"href": {
286+
"type": "string"
287+
},
288+
"type": {
289+
"type": "string"
290+
}
291+
}
292+
},
274293
"non_related_link": {
275294
"allOf": [
276295
{
277-
"type": "object"
296+
"$ref": "#/definitions/base_link"
278297
},
279298
{
280299
"not": {
@@ -292,29 +311,36 @@
292311
]
293312
},
294313
"typed_related_link": {
295-
"type": "object",
296-
"required": [
297-
"rel",
298-
"roles"
299-
],
300-
"properties": {
301-
"rel": {
302-
"const": "related"
314+
"allOf": [
315+
{
316+
"$ref": "#/definitions/base_link"
303317
},
304-
"roles": {
305-
"type": "array",
306-
"minItems": 1,
307-
"maxItems": 1,
308-
"items": {
309-
"type": "string",
310-
"enum": [
311-
"event",
312-
"hazard",
313-
"impact"
314-
]
318+
{
319+
"type": "object",
320+
"required": [
321+
"rel",
322+
"roles"
323+
],
324+
"properties": {
325+
"rel": {
326+
"const": "related"
327+
},
328+
"roles": {
329+
"type": "array",
330+
"minItems": 1,
331+
"maxItems": 1,
332+
"items": {
333+
"type": "string",
334+
"enum": [
335+
"event",
336+
"hazard",
337+
"impact"
338+
]
339+
}
340+
}
315341
}
316342
}
317-
}
343+
]
318344
},
319345
"roles": {
320346
"$comment": "Roles field",

0 commit comments

Comments
 (0)