"""Default Earth boundary source configuration.""" from __future__ import annotations from typing import Any EARTH_BOUNDARY_SOURCE_MAPPING: dict[str, Any] = { "source": {"items_path": "$.features[*]"}, "fields": { "source_id": {"path": "$.properties.id", "type": "string"}, "name": {"path": "$.properties.name", "type": "string"}, "geometry": {"path": "$.geometry", "type": "object"}, "properties": {"path": "$.properties", "type": "object"}, }, } EARTH_BOUNDARY_DEFAULT_SOURCES: dict[str, dict[str, Any]] = { "earth_admin0_boundaries": { "endpoint": "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_admin_0_countries.geojson", "source_kind": "admin0-boundaries", "license": "Natural Earth public domain", }, "earth_coastline": { "endpoint": "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_coastline.geojson", "source_kind": "coastline", "license": "Natural Earth public domain", }, "earth_claim_lines": { "endpoint": "https://www.arcgis.com/sharing/rest/content/items/faaa1908c3ab43f0823c6fde9f18389c/data", "source_kind": "claim-lines", "license": "CC BY 4.0; source item owner mapmakersami", }, } def default_earth_boundary_config(name: str) -> dict[str, Any]: source = EARTH_BOUNDARY_DEFAULT_SOURCES.get(name) if not source: return {} return { "method": "GET", "timeout": 120, "retry": 3, "target_schema": "earth_boundary_source", "license": source["license"], "mapping_json": EARTH_BOUNDARY_SOURCE_MAPPING, }