Skip to main content

Lib to convert Overture data in GIS formats and upload it to HDX

Project description

Overture Map Data 2 HDX

This project is designed to export geographic data from Overture Maps and upload it to the Humanitarian Data Exchange (HDX). The data is processed using DuckDB and can be exported in various formats such as GeoJSON, GPKG, and ESRI Shapefile.

Features

  • Export geographic data from Overture Maps.
  • Upload data to HDX.
  • Support for multiple output formats.
  • Configurable via YAML and environment variables.
  • Logging setup using environment variables or parameters.

Installation

pip install overture2hdx

Configuration

The application is configured using a YAML file and environment variables.

YAML Configuration

Example config.yaml:

iso3: npl
geom: '{"type": "FeatureCollection", "features": [{"type": "Feature", "properties": {}, "geometry": {"coordinates": [[]], "type": "Polygon"}}]}'
key: osgeonepal_pkr
subnational: true
frequency: yearly
categories:
- Roads:
    select:
        - id
        - names.primary as name
        - class as class
        - subclass as subclass
        - UNNEST(JSON_EXTRACT(road_surface, '$[*].value')) as road_surface
        - UNNEST(JSON_EXTRACT(sources, '$[*].dataset')) AS source
    hdx:
        title: Roads of Pokhara
        notes: Overturemaps Export for Pokhara. Data might have errors but has gone through validation checks.
        tags:
        - geodata
        - transportation
        - roads
    theme:
        - transportation
    feature_type:
        - segment
    formats:
        - gpkg
        - shp

Code Overview

Config: Class to handle configuration. OvertureMapExporter: Class to handle the export process. setup_logging: Function to set up logging.

Default export config

Following is the default yaml used

Category Description License Overture Theme Docs Attributes File Formats
Hospitals Health POIs like hospitals and clinics, from Meta and Microsoft open data CDLA Permissive 2.0 Places id, names.primary, names.common.en, categories.primary gpkg, shp
Schools Education POIs like schools, colleges, universities from Meta and Microsoft CDLA Permissive 2.0 Places id, names.primary, names.common.en, categories.primary gpkg, shp
Rivers Water bodies (rivers, lakes, etc.) from OpenStreetMap via the Base theme ODbL 1.0 Base id, names.primary, names.common.en, subtype, class gpkg, shp
Land Use Land use polygons (farmland, forest, etc.) based on OSM landuse tags ODbL 1.0 Base id, names.primary, names.common.en, subtype, class gpkg, shp
Transportation Hubs Airports, stations, terminals from Meta & Microsoft CDLA Permissive 2.0 Places id, names.primary, names.common.en, categories.primary gpkg, shp
Settlements Populated places like cities, towns, and villages from OSM, geoBoundaries, and Esri ODbL 1.0 Divisions id, names.primary, names.common.en, population, country gpkg, shp
Roads Road network (highways, local roads, etc.) from OSM and TomTom ODbL 1.0 Transportation id, names.primary, names.common.en, class, subclass, road_surface, source gpkg, shp
Buildings Building footprints from OSM, Microsoft, Google, and Esri ODbL 1.0 Buildings id, names.primary, names.common.en, class, subtype, height, level, num_floors, source gpkg, shp

Default python example

For default yaml example python implementation , follow here

How it works?

overture2hdx

Author and License

Kshitij Raj Sharma , License : GNU GENERAL PUBLIC LICENSE V3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

overture2hdx-0.0.6.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

overture2hdx-0.0.6-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file overture2hdx-0.0.6.tar.gz.

File metadata

  • Download URL: overture2hdx-0.0.6.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for overture2hdx-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8caf6d812d3d4c83074ee90d24961a60b66a4310e1de4cfa840e5a1e7513942c
MD5 83323ee0a892afe2eab2baa3a2ce3740
BLAKE2b-256 4860a67f77b525c38201305057bf1be8c3dbb003b86b6258b67ab1598258e40c

See more details on using hashes here.

File details

Details for the file overture2hdx-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: overture2hdx-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for overture2hdx-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 051a5f0614f05fb5a0bda3793110ac84c18dfdd3d6ca6c965c3d4acd3c448efe
MD5 96e35e74bcea4a299f77eabb01513385
BLAKE2b-256 61e11acf1dc455b92a36259f6fa92fc5092d08e13e2c05187ace39641da260b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page