File size: 1,723 Bytes
4851501 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
#!/usr/bin/env python3
"""
Register global datasets in catalog
"""
import json
from pathlib import Path
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
DATA_DIR = Path(__file__).parent.parent / "data"
CATALOG_PATH = DATA_DIR / "catalog.json"
def register_airports():
"""Register Panama airports dataset"""
with open(CATALOG_PATH, 'r') as f:
catalog = json.load(f)
catalog["panama_airports"] = {
"path": "global/airports/panama_airports.geojson",
"description": "Panama airports from OurAirports global database (91 airports)",
"semantic_description": "Comprehensive dataset of all airports in Panama including international, domestic, regional, and small airfields. Contains location, elevation, type (large/medium/small/heliport), runway information, and identifiers (ICAO, IATA codes). Updated daily from OurAirports open database. Use for aviation infrastructure analysis, accessibility studies, and transportation planning.",
"tags": [
"infrastructure",
"transportation",
"airports",
"aviation",
"panama",
"ourairports"
],
"data_type": "static",
"category": "infrastructure",
"format": "geojson",
"source": "OurAirports (davidmegginson/ourairports-data)",
"license": "Public Domain"
}
with open(CATALOG_PATH, 'w') as f:
json.dump(catalog, f, indent=2)
logger.info("Registered panama_airports in catalog")
def main():
logger.info("Registering datasets in catalog...")
register_airports()
logger.info("Complete!")
if __name__ == "__main__":
main()
|