Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/overture_stac/overture_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@

TYPE_LICENSE_MAP = {
"bathymetry": "CC0-1.0",
"land_cover": " CC-BY-4.0",
"land_cover": "CC-BY-4.0",
"infrastructure": "ODbL-1.0",
"land": "ODbL-1.0",
"land_use": "ODbL-1.0",
"water": "ODbL-1.0",
"building": "ODbL-1.0",
"division": "ODbL-1.0",
"division_area": "ODbL-1.0",
"division_bopundary": "ODbL-1.0",
"division_boundary": "ODbL-1.0",
"segment": "ODbL-1.0",
"connector": "ODbL-1.0",
"place": "CDLA-Permissive-2.0",
"place": ["CDLA-Permissive-2.0", "Apache-2.0"],
"address": "Multiple Open Licenses",
}

Expand Down Expand Up @@ -159,6 +159,11 @@ def process_theme_worker(theme_path, release_path, s3_region, debug, release_dat
local_type_collections[type_name].append(stac_item)

# Create type collection
license_value = TYPE_LICENSE_MAP.get(type_name)
primary_license = (
license_value[0] if isinstance(license_value, list) else license_value
)

type_collection = pystac.Collection(
id=type_name,
description=f"Overture's {type_name} collection",
Expand All @@ -168,9 +173,12 @@ def process_theme_worker(theme_path, release_path, s3_region, debug, release_dat
),
temporal=pystac.TemporalExtent(intervals=[None, None]),
),
license=TYPE_LICENSE_MAP.get(type_name),
license=primary_license,
)

if isinstance(license_value, list):
type_collection.extra_fields["licenses"] = license_value

type_collection.add_items(local_type_collections[type_name])

type_collection.summaries = pystac.Summaries(
Expand Down
Loading