This is a list of common data sources that you might want to integrate with the model
Download from HDX. (This example is for Kenya, but many countries are available by searching on HDX.
You can use this command to decrease the file size (if needed).
gdal_translate -co COMPRESS=LZW hrsl.tif hrsl_comp.tif
From CIESEN.
Convert to GeoPackage
in QGIS before saving to data/
.
To get a list of larger towns, the following procedure was used:
- Use QGIS Zonal Stats to get HRSL population data into GRID3
bua
settlements. - Filter for
pop_sum > 10000
. - Export to
data/
.
Download the appropriate country-level .osm.pbf
from Geofabrik.
Convert to o5m
to make it easier to work with.
osmconvert kenya.osm.pbf -o=kenya.o5m
First edit /usr/share/gdal/osmconf.ini
(this could be a different location on your installation) and add things of interest:
[lines]
...
attributes=...,power,voltage
Then set the environment variable path to this file:
export GDAL_CONFIG_FILE=/usr/share/gdal/osmconf.ini
This is a list of possible OSM extractions you could run.
If any don't work, you might need to add -oo CONFIG_FILE=$GDAL_CONFIG_FILE
after ogr2ogr
.
osmfilter kenya.o5m --keep="power=line" | \
ogr2ogr -select power,voltage grid.gpkg /vsistdin/ lines
osmfilter kenya.o5m --keep="highway=motorway =trunk =primary =secondary =tertiary" | \
ogr2ogr -select highway roads.gpkg /vsistdin/ lines
osmfilter kenya.o5m --keep="water=lake =river =oxbow =lagoon =reservoir" | \
ogr2ogr -select water lakes.gpkg /vsistdin/ multipolygons
osmfilter kenya.o5m --keep="water=lake =river =oxbow =lagoon =reservoir" | \
ogr2ogr -select water rivers.gpkg /vsistdin/ lines
osmfilter kenya.o5m --keep="natural=wood landuse=forest" | \
ogr2ogr -select natural,landuse forest.gpkg /vsistdin/ multipolygons
Using WorldClim data for precipitation at 30s spatial resolution.
Merge the monthly rasters with GDAL to get an annual total:
gdal_calc.py -A *.tif --calc="numpy.sum(A, axis=0)" --outfile=precip_annual.tif