11. Mapping Exposure - Infrastructure#
11.1. Summary#
Monitoring the infrastructure affected by a crisis is critical for resource management or estimating its impact on the economy. However, relying solely on tradicional sources like census data, may lead to outdated information, specially in constantly evolving urban areas. To ensure up-to-date data, it is worth exploring alternative data sources such as those produced with crowdsourcing or Artificial Intelligence (AI).
This class explores different ways to obtain alternative georeferenced infrastructure data. We are going to explore data provided by: OpenStreet Maps, Microsoft Building Footprints, Google and Overture.
11.2. Learning Objectives#
11.2.1. Overall goals#
The main goal of this class is to teach students how to access infrastructure data from different datasources.
11.2.2. Specific goals#
At the end of this notebook, you should have gained an understanding and appreciation of the following:
OpenStreetMap data:
How to download the data.
Understand the data limitations.
What is the HOT export tool.
Microsoft Building Footprints:
Learn how the data is produced.
Learn how to download the data.
Open Buildings from Google:
Learn how the data is produced.
Learn how to download the data.
Overture Maps Foundation:
Learn about the Overture project.
Learn how the data is produced.
Learn how to download the data.
11.3. Area of Interest#
The examples will continue working with 02/06/2023 earthquake in Türkiye. The information will be downloaded for a square of 50km around the epicenter. The following code shows how to obtain the area of interest.
import osmnx as ox
import geopandas as gpd
from shapely import Point, Polygon
import folium
Considering the epicenter as: 38.011°N 37.196°E:
Create a GeoDataFrame for the epicenter.
Project the point into a projected CRS.
Generate a buffer of 50km around the epicenter.
Generate the bounding box to extract the information.
d = {'name': ['epicenter'], 'geometry': [Point(37.196, 38.011)]}
gdf = gpd.GeoDataFrame(d, crs="EPSG:4326")
gdf = gdf.to_crs('EPSG:23036')
gdf['buffer'] = gdf.geometry.apply(lambda x: x.buffer(50000))
gdf = gdf.set_geometry('buffer')
gdf = gdf.to_crs('EPSG:4326')
bounds = gdf.bounds.loc[0]
north, south, east, west = bounds.maxy, bounds.miny, bounds.minx, bounds.maxx
gdf.loc[1, 'name'] = 'epicenter_rectangle'
gdf.loc[1, 'buffer'] = Polygon(((east,north), (west, north), (west, south), (east, south)))
east, south, west, north
(36.62768265193316, 37.561544985221865, 37.76386851796805, 38.460405921314695)
m = gdf.explore()
m