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?
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file overture2hdx-0.0.5.tar.gz.
File metadata
- Download URL: overture2hdx-0.0.5.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c28b9e0ab7a7421e04cc03d836e9276b1cbaca214ecce9b2863c1185b36a63d8
|
|
| MD5 |
585518b9a7e5276284afb2d661d8f3ef
|
|
| BLAKE2b-256 |
6d557eae77995417452cd4934662b32787f57a5bd1aa4c9a3d6f7980b6501746
|
File details
Details for the file overture2hdx-0.0.5-py3-none-any.whl.
File metadata
- Download URL: overture2hdx-0.0.5-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21060351698f6b2338ca34eaf3b357f14d4f6f0dbe6a3d6ed5650066e516c487
|
|
| MD5 |
1ca30b431a08a870acc99d13ea42e9b5
|
|
| BLAKE2b-256 |
2533e0fa8c89323612f18fdc8531bb243513d66ccec1f9edf1f02feeab8bd887
|