OpenHVRA
| OpenHVRA | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Author: | Gomal Amin | |||||||||||||||||||
| License: | GNU AGPL v3 | |||||||||||||||||||
| Platform: | Web | |||||||||||||||||||
| Status: | beta | |||||||||||||||||||
| Version: | 0.12.3 (2026-11-07) | |||||||||||||||||||
| Language: | english
| |||||||||||||||||||
| Source code: | https://github.com/gomalhunzai/openhvra | |||||||||||||||||||
|
Free, browser-based tool for rapid, screening-level hazard, vulnerability and risk assessment built on OpenStreetMap data | ||||||||||||||||||||
| ||||||||||||||||||||
OpenHVRA (Open Hazard, Vulnerability & Risk Assessment) is a free screening level, open-source web application for disaster risk practitioners. It runs rapid, screening-level hazard, vulnerability and risk assessments for any place in the world using OpenStreetMap data and the Copernicus 30 m global elevation model.
It shows how many people, buildings and critical facilities lie near rivers, streams and roads, estimates what floods could cost and how to finance them, scores social vulnerability, and screens buildings for seven hazards. Everything runs in the browser. Nothing needs to be installed, and uploaded files are processed locally and never sent to a server.
Why it matters for OSM mappers
Every result in OpenHVRA is built from OSM features, so better mapping gives better risk estimates.
- Missing buildings mean missing people and undercounted losses.
- Missing clinics, shelters or roads make communities look more vulnerable than they really are.
- Missing
building:levels=*orbuilding:material=*means default values are used instead of real ones.
This makes OpenHVRA a natural follow-up to humanitarian mapathons and Tasking Manager projects: map an area, then analyse it, and use the results to show local authorities what the mapping is worth.
OSM data used
Data is downloaded on demand from the public Overpass API servers for the area the user selects. Two requests run in parallel: one for buildings and one for roads, waterways and facilities.
Buildings
- All
building=*ways and relations. building:levels=*– number of storeys, used for floor area, population and the 3D view (3 m per storey). A default number of storeys is used where it is missing.building:material=*(orbuilding:structure=*/building:walls=*) – construction type, used to adjust replacement costs and earthquake vulnerability.- The value of
building=*is used to sort buildings into five classes:- Residential – house, residential, apartments, detached, terrace, hut, bungalow, farm, cabin, static_caravan, etc.
- Commercial – commercial, retail, office, shop, hotel, kiosk, supermarket.
- Industrial – industrial, warehouse, factory, manufacture, hangar.
- Public – school, hospital, university, government, place-of-worship buildings, train_station, fire_station, etc.
- Ancillary – shed, garage, roof, greenhouse, barn, carport, container, tent, etc.
- Buildings tagged only
building=yesare classed by their other tags (amenity=*,shop=*,office=*,craft=*, etc.) where possible. Otherwise they count as homes by default, an option the user can switch off. Tagging a specificbuilding=*value therefore makes the population estimate more accurate.
Waterways
waterway=river, waterway=canal, waterway=tidal_channel, waterway=stream, waterway=brook, waterway=drain and waterway=ditch. Waterway direction matters: glacial-lake outflows are traced downstream along mapped streams in the direction they are drawn.
Roads and paths
highway=* from motorway down to residential, living_street, service, track and road (and their links). Footpaths (footway, path, pedestrian, cycleway, steps, bridleway) are optional.
Critical facilities
Facilities are collected from many tag families, not just amenity=*, and grouped into nine categories:
| Group | Examples of tags used |
|---|---|
| Health | amenity=hospital, amenity=clinic, amenity=doctors, amenity=pharmacy, healthcare=*
|
| Education | amenity=school, amenity=kindergarten, amenity=college, amenity=university
|
| Emergency services & shelter | amenity=fire_station, amenity=police, amenity=shelter, emergency=assembly_point, emergency=ambulance_station
|
| Government, community & heritage | amenity=townhall, amenity=community_centre, amenity=place_of_worship, office=government, historic=*, heritage=*
|
| Water, power & telecom | man_made=water_works, man_made=wastewater_plant, power=substation, power=plant, telecom=*
|
| Transport hubs & bridges | amenity=bus_station, railway=station, aeroway=*, road bridges
|
| Markets, shops & finance | amenity=marketplace, amenity=bank, shop=*
|
| Hazardous sites | amenity=fuel, man_made=storage_tank, man_made=works, man_made=petroleum_well
|
| Other | remaining amenities, hotels, parks, stadiums |
Download modes and caching
- Light (default) – downloads building bounding boxes instead of full outlines (about 3× smaller) and estimates each building's area from its box. Facilities come as centre points. Up to 60 km² per run.
- Footprints – full building outlines for exact floor areas. Up to 25 km² per run.
Each request starts on the Overpass server that has worked best recently, asks the next server too if there is no answer within 30 seconds, and uses whichever answers first. When a server says it is busy, the app waits for the next free slot. Downloads are cached in the browser (IndexedDB) for 3 days, so reloading the same area does not hit Overpass again.
Other data sources
| Data | Source | Used for |
|---|---|---|
| Map features | OpenStreetMap via Overpass API (© OpenStreetMap contributors, ODbL) | Everything |
| Elevation (default) | Copernicus DEM GLO-30 (TanDEM-X, 2011–2015), read from Microsoft Planetary Computer | Flood depth, steep banks, landslide, flash flood, avalanche and GLOF scores |
| Elevation (alternative) | AWS Terrain Tiles (Mapzen; SRTM in most of the world, national LiDAR in some countries) | Comparison, and the 3D view |
| Earthquakes | USGS earthquake catalogue (M5+ since 1973) | Earthquake hazard |
| Building replacement costs | GEM Global Exposure Model 2026 (215 countries, 3,557 regions), or the JRC formula with World Bank GDP per capita | Flood losses |
| Demographics | World Bank indicators; WHO global disability estimate (16%) | Vulnerable-group counts |
| Population totals | National census, WorldPop Global2, GHSL GHS-POP (entered by the user) | Calibrating the population model |
| Place search and country lookup | Nominatim | Search box, choosing national figures |
Only the parts of the Copernicus files that cover the area are downloaded (usually 3–10 MB). Copernicus is a surface model, so rooftops and tree canopy are included in the heights. If it cannot be downloaded, the app falls back to the Terrain Tiles and says so in the status line and in the exports.
Methods and algorithms
1. Area of interest
Draw a rectangle, circle or polygon, use the current map view, or upload a boundary. Supported formats: Shapefile (.zip or .shp + .dbf + .prj), GeoJSON, TopoJSON, KML/KMZ, GPX, GeoPackage and WKT. Files in Web Mercator or UTM are converted to longitude/latitude automatically. Multi-part areas and holes are supported, very detailed boundaries are simplified, and if a file has several areas (for example all wards of a district) you can pick one or use them all.
2. Population model
Residents per building = residential floor area ÷ floor area per person, where floor area = footprint × storeys. The default is 20 m² per person. Only residential buildings get residents. If you enter a known total (census, WorldPop or GHSL) with its source and year, all building populations are scaled to match it.
3. Cursor probe
A circle (25–1000 m) follows the mouse and shows live counts of residents, buildings and facilities, the length of roads and waterways inside it, and the distance to the nearest waterway and major road.
4. Exposure by distance
Counts and maps everything within a chosen distance of rivers, streams or roads, and lists the critical facilities at risk. For waterways, elevation is also used (on by default): a building only counts as flood-exposed if it is also within a set height of the channel (default 5 m). Buildings that are close but high are split into:
- Steep bank – the slope down to the water is 25° or more, so the building is at risk of erosion or undercutting;
- Higher ground – not exposed.
This stops hillside homes in mountain valleys from being counted as flood-exposed.
5. Flood risk and risk finance
- Hazard
- Flood depth at each building = scenario water level − the building's height above the nearest waterway (HAND-style approach). The user enters a water level for each return period (for example 5, 10, 25, 50, 100 and 500 years). The default levels are placeholders and should be replaced with local hydrology.
- Vulnerability
- Depth-damage curves for residential, commercial and industrial buildings, based on the JRC global curves for Asia (Huizinga et al. 2017). Only flooded floors are damaged (3 m per storey).
- Building costs
- Replacement cost per m² plus contents, from one of three sources:
- GEM Global Exposure Model 2026 (default; Yepes-Estrada et al. 2023) – costs for the country and, where available, the province or state, by use type. Homes with a mapped
building:material=*are adjusted by GEM's national cost for that construction type (earth/adobe/stone, brick or block, reinforced masonry, concrete, steel, wood). - JRC formula – cost = a × GDP per capitab (Huizinga et al. 2017), using the latest World Bank GDP per capita, brought to current US dollars. Contents are 50% (homes), 100% (commercial) and 150% (industrial) of the building.
- Your own values, in any currency.
- GEM Global Exposure Model 2026 (default; Yepes-Estrada et al. 2023) – costs for the country and, where available, the province or state, by use type. Homes with a mapped
- Sheds and garages are costed at 40% of a home; public buildings like commercial ones.
- Risk metrics
- For each scenario: loss, people affected and critical facilities flooded. Also a loss-exceedance curve, the average annual loss (AAL) by trapezoidal integration over the scenarios, the expected number of people affected per year, and a slope-based landslide screen.
- Risk finance
- The loss curve is split into layers by return period: retain (reserve fund), borrow (contingent credit), transfer (parametric insurance or catastrophe bond) and residual. Each layer shows its expected annual loss and an indicative annual cost.
6. Social vulnerability
Each home gets a Social Vulnerability Index (SVI) from 0 (least) to 1 (most vulnerable): the average of these indicators, each scaled from 0 to 1:
| Indicator | Scaling |
|---|---|
| Distance to the nearest health facility | 0 at ≤ 500 m, 1 at ≥ 5 km |
| Distance to emergency services or a shelter | 0 at ≤ 500 m, 1 at ≥ 5 km |
| Distance to a road | 0 at ≤ 50 m, 1 at ≥ 500 m |
| Housing fragility | huts, sheds, tents, containers, small single-storey homes |
| Crowding (residents per hectare within 100 m) | 0 at ≤ 50, 1 at ≥ 400 |
| Census indicator (optional, uploaded) | scaled from lowest to highest unit |
Users can upload ward or district polygons with a numeric field (for example a poverty rate), which is joined to every home inside them. Homes are mapped in five classes, either relative (fifths) or absolute (0.2 steps).
Counts of vulnerable groups – children (0–14), elderly people (65+), people with disabilities and people in extreme poverty – are estimated from World Bank national shares (or entered by hand). When combined with the flood analysis, the tool reports residents flooded in each vulnerability class and the number of highly vulnerable residents flooded.
7. Multi-hazard risk
Every building gets a score from 0 to 1 for each hazard:
| Hazard | How it is scored |
|---|---|
| River flood | Depth at the 100-year water level from step 5 |
| Flash / rain flood | Terrain hollows, flat ground, and nearby streams or drains |
| Landslide | Steepest slope nearby, local relief, and undercutting by streams or road cuts |
| Earthquake | Regional seismicity from the USGS catalogue (M5+ frequency since 1973, largest event within 100 km) × building vulnerability (material, storeys, fragile types, steep or soft riverside ground) |
| Coastal flood | Ground below a chosen sea level plus surge, within 10 km of the coast |
| Glacial lake outburst flood (GLOF) | Each glacial lake's outflow is traced downstream along OSM streams (bridging gaps up to 60 m), by steepest descent on the terrain where no stream is mapped, or along a path the user draws. Only lakes whose path reaches the area count. Homes within 600 m of the path are scored by their height above it against a flood height that falls downstream (default 20 m at the lake to 5 m at 30 km). |
| Snow avalanche | Steep (28–55°) slopes above a chosen snow line, using the alpha-angle runout rule |
The scores are combined into a multi-hazard index:
- MHI = 1 − Π(1 − wi × si)
so one severe hazard stays severe and several moderate ones add up. With social vulnerability this gives a combined risk score:
- Risk = √(MHI × SVI)
as in the INFORM risk index.
A likelihood × impact risk matrix is also produced, with its full calculation shown: the 90th-percentile hazard score sets the likelihood; the share of residents at high hazard sets the impact (+1 if a critical facility is exposed); L × I gives the rating. Hazards that do not apply (no coast, no glaciers, no terrain above the snow line) are reported and left out.
Glacial lakes come from OSM (lakes near glaciers), uploaded inventories, or lakes and glaciers marked on the map by the user. Glaciers, lakes and traced paths are shown on the map so they can be checked and edited.
Outputs
One click downloads a ZIP package containing:
README.txt– a readable summary of every setting and result, including the risk-matrix working;steps/– a detailed table for each step that was run;parameters.csv– every setting, including the elevation source, cost source and population source;buildings.csvandfacilities.csv– one row per feature with all its values (population, distance and height above water, flood depth and loss per scenario, AAL, SVI and its indicators, every hazard score, the multi-hazard index and combined risk);tables/– population, exposure, flood scenarios, finance layers, vulnerability classes, vulnerable groups, hazard summary, risk matrix and earthquakes;layers/– area, buildings, facilities, roads, waterways and glacial lakes as GeoJSON for QGIS or ArcGIS;charts/– every chart as SVG and 300 DPI PNG;maps/– A4 landscape map layouts at 300 DPI for each step and each hazard, with title, legend, key figures, scale bar, north arrow, data credits and the OpenHVRA version.
Each step also has its own quick CSV, GeoJSON and map downloads.
Validation: Hebden Bridge, UK
The flood and exposure methods were tested in Hebden Bridge (Calder Valley, West Yorkshire, England), a narrow, wooded valley town with a long history of river flooding. It is a demanding test case: the valley is steep and narrow, the slopes are wooded, and the AWS Terrain Tiles there are built on national bare-ground LiDAR rather than SRTM.
OpenHVRA's results were compared with official flood maps and recorded flood outlines, using each elevation source in turn:
| Elevation source | Share of buildings in the official 1-in-100-year flood zone found (default 3 m water level) |
|---|---|
| AWS Terrain Tiles (national LiDAR here) | 90% |
| Copernicus DEM GLO-30 | 71% |
Copernicus sat about 3 m higher on average along the channel. This is expected for a surface model compared with bare-ground LiDAR, because trees and buildings in a narrow valley raise the apparent ground level. Where the Terrain Tiles fall back to SRTM, which covers most of the world's mountain regions, Copernicus is expected to be the better of the two, and it remains the default.
Lessons for users:
- In narrow, wooded valleys, Copernicus can underestimate flood exposure at the default water levels. Raise the water levels or compare with the Terrain Tiles.
- Where national LiDAR is available, the Terrain Tiles option may give better results.
- Always replace the default water levels with values from local hydrology or a flood study.
The Hebden Bridge test export also uncovered a browser bug in exported maps, fixed in version 0.12.2. Full details of the comparison are in GitHub issue #9.
Software quality and versions
- Automated tests check the core calculations (damage curves, losses, AAL, risk-finance layers, multi-hazard index, risk matrix, social vulnerability classes and geometry) against hand-worked values. They run on every push with GitHub Actions.
- Versions follow semantic versioning: 0.x → 0.(x+1) means a method changed and results may differ; 0.x.y → 0.x.(y+1) means fixes only, with identical results. Version 1.0.0 will mark validated methods and the end of the beta.
- Every past version is available on the Releases page and can be run locally with
node serve.mjs. - To cite OpenHVRA, use the Cite this repository button on GitHub (from
CITATION.cff) and include the version used.
Limitations
These are screening estimates for prioritisation, not engineering design.
- OSM coverage varies. Missing buildings mean missing people and losses. Check against the satellite basemap and map what is missing.
- Population is a floor-area model. Calibrate it with a census or gridded total; these can differ by 20% or more in small areas.
- The flood hazard is a proxy. Height above the nearest waterway ignores flood defences, channel capacity, backwater effects and rainfall flooding. Canals count as rivers by default, although their water level is controlled. The ~30 m elevation data has several metres of vertical error.
- Multi-hazard scores are terrain and map proxies. There is no flow routing for flash floods, no soil or rock data for landslides and earthquakes, and no snow climate for avalanches. GLOF paths traced on the terrain can go wrong in narrow gorges or flat valley floors.
- The SVI uses proxies. Where OSM is missing clinics, shelters or roads, areas look more vulnerable than they are. Vulnerable-group counts apply national shares evenly.
- Building costs are modelled averages. Costs in poor and informal areas can be far lower, so a low monetary loss does not mean a low impact: look at people affected too.
- Damage curves are global averages. Earthen and informal homes are often destroyed by about 1 m of water, sooner than the curves assume.
- AAL comes from a handful of scenarios, and risk-finance costs are indicative only.
Good practice
- Start small – a single village or ward – before scaling up.
- Check OSM coverage first. If buildings, facilities,
building:levels=*orbuilding:material=*are missing, map them and reload. - Replace the default water levels, population shares and building costs with local data wherever possible.
- Verify hotspots in the field and against official hazard maps before using results for decisions.
- Respect the usage policies of Overpass, the OSM tile servers and Nominatim. For heavy use, self-host.
Licence and attribution
The OpenHVRA code is released under the GNU Affero General Public License v3.0 (AGPL-3.0-only); versions up to 0.12.0 were MIT. OSM data is © OpenStreetMap contributors under the ODbL, which also applies to outputs derived from it (exported tables, layers and maps): credit OpenStreetMap when you share them. The GEM building cost table is CC BY-NC-SA 4.0, so commercial users should choose the JRC option or their own costs.
Feedback and contributing
Bug reports, "results look wrong" reports (which help validate the methods), ideas and code contributions are welcome:
- Source code: https://github.com/gomalhunzai/openhvra
- Issues and feedback: https://github.com/gomalhunzai/openhvra/issues
See also
- Humanitarian OSM Team
- Overpass API
- Key:building
- Key:building:levels
- Key:building:material
- Key:waterway
- Key:healthcare
References
- Huizinga, J., de Moel, H., Szewczyk, W. (2017). Global flood depth-damage functions: methodology and the database with guidelines. JRC Technical Report, European Commission.
- Yepes-Estrada, C. et al. (2023). Global Building Exposure Model for Earthquake Risk Assessment. Earthquake Spectra, 39(4). doi:10.1177/87552930231194048