97 overture data
In [1]:
Copied!
# %pip install -U leafmap overturemaps
# %pip install -U leafmap overturemaps
In [2]:
Copied!
from leafmap import leafmap
from leafmap import leafmap
Create an interactive map.
In [3]:
Copied!
m = leafmap.Map(center=[36.120725, -115.203795], zoom=17)
m.add_basemap("SATELLITE")
m
m = leafmap.Map(center=[36.120725, -115.203795], zoom=17)
m.add_basemap("SATELLITE")
m
Draw a rectangle on the map to download the data within the rectangle.
In [4]:
Copied!
if m.user_roi is not None:
bbox = m.user_roi_coords()
else:
bbox = [-115.2081, 36.119, -115.1994, 36.1226]
if m.user_roi is not None:
bbox = m.user_roi_coords()
else:
bbox = [-115.2081, 36.119, -115.1994, 36.1226]
Download Overature Maps building data.
In [5]:
Copied!
columns = ["id", "height", "geometry"]
output = "buildings.geojson"
buildings_gdf = leafmap.get_overture_data(
"building", bbox=bbox, columns=columns, output=output
)
columns = ["id", "height", "geometry"]
output = "buildings.geojson"
buildings_gdf = leafmap.get_overture_data(
"building", bbox=bbox, columns=columns, output=output
)
In [6]:
Copied!
m.add_gdf(buildings_gdf, layer_name="Buildings")
m.add_gdf(buildings_gdf, layer_name="Buildings")
Download Overature Maps transportation data.
In [7]:
Copied!
output = "roads.geojson"
columns = ["id", "subtype", "class", "geometry"]
roads_gdf = leafmap.get_overture_data(
"segment", bbox=bbox, columns=columns, output=output
)
output = "roads.geojson"
columns = ["id", "subtype", "class", "geometry"]
roads_gdf = leafmap.get_overture_data(
"segment", bbox=bbox, columns=columns, output=output
)
In [8]:
Copied!
m.add_gdf(roads_gdf, layer_name="Roads", style={"color": "red", "weight": 2})
m.add_gdf(roads_gdf, layer_name="Roads", style={"color": "red", "weight": 2})
The overture maps data type can be one of the following:
address|building|building_part|division|division_area|division_boundary|place|segment|connector|infrastructure|land|land_cover|land_use|water