Skip to content

Commit daba271

Browse files
authored
Merge pull request #58 from OvertureMaps/jjcfrancisco/fix-stac-license-validation
[BUG] Fix license field validation failures
2 parents d946f6c + 850b400 commit daba271

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,3 @@ jobs:
139139
- uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3
140140
with:
141141
jobs: ${{ toJSON(needs) }}
142-
allowed-to-fail: "stac-validate" #TODO: Remove after issues #48, 49, 50, 51 are resolved and this passes

src/overture_stac/overture_stac.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212

1313
TYPE_LICENSE_MAP: dict[str, str] = {
1414
"bathymetry": "CC0-1.0",
15-
"land_cover": " CC-BY-4.0",
15+
"land_cover": "CC-BY-4.0",
1616
"infrastructure": "ODbL-1.0",
1717
"land": "ODbL-1.0",
1818
"land_use": "ODbL-1.0",
1919
"water": "ODbL-1.0",
2020
"building": "ODbL-1.0",
21+
"building_part": "ODbL-1.0",
2122
"division": "ODbL-1.0",
2223
"division_area": "ODbL-1.0",
2324
"division_boundary": "ODbL-1.0",
2425
"segment": "ODbL-1.0",
2526
"connector": "ODbL-1.0",
26-
"place": "CDLA-Permissive-2.0, Apache 2.0, CC0 1.0.",
27-
"address": "Multiple Open Licenses",
27+
"place": "other",
28+
"address": "other",
2829
}
2930

3031

@@ -220,6 +221,16 @@ def process_theme_worker(
220221
license=TYPE_LICENSE_MAP.get(type_name),
221222
)
222223

224+
# Licenses with multiple SPDXs must be marked as "other" and include a link to the license details
225+
if TYPE_LICENSE_MAP.get(type_name) == "other":
226+
type_collection.add_link(
227+
pystac.Link(
228+
rel="license",
229+
target="https://docs.overturemaps.org/attribution/",
230+
title="Overture Maps Attribution and Licensing",
231+
)
232+
)
233+
223234
type_collection.add_items(local_type_collections[type_name])
224235

225236
type_collection.stac_extensions = [

0 commit comments

Comments
 (0)