68 openaerialmap
Searching and visualizing OpenAerialMap imagery interactively
OpenAerialMap (OAM) provides openly licensed satellite and unmanned aerial vehicle (UAV) imagery. Currently, it has over 12,400+ images around the globe. This notebook demonstrates how to search and visualize OAM imagery interactively. You can download images automatically with one line of code.
Uncomment the following line to install leafmap if needed.
import leafmap
Search OAM images by a bounding box and a date range. The results can be returned as a GeoDataFrame or a list of image metadata.
bbox = [-79.6344, -0.9063, -77.3383, 1.0436]
start_date = "2016-04-01"
end_date = "2016-04-30"
gdf = leafmap.oam_search(
bbox=bbox, start_date=start_date, end_date=end_date, return_gdf=True
)
print(f"Found {len(gdf)} images")
gdf.head()
The tile URLs are stored in the tms
column of the GeoDataFrame.
tiles = gdf["tms"].tolist()
tiles[:5]
The image sources (downloadable URLs) are stored in the uuid
column of the GeoDataFrame.
images = gdf["uuid"].tolist()
images[:5]
Download all images using the download_files()
function.
leafmap.download_files(images[:2])
Add the image footprints to the map.
m = leafmap.Map()
m.add_gdf(gdf, layer_name="Footprints")
m
Search OAM imagery within the current map extent or user drawn ROI.
m = leafmap.Map(center=[4.7955, -75.6899], zoom=15)
m.add_basemap("SATELLITE", show=False)
bbox = [-75.7138, 4.7826, -75.6659, 4.808332]
m.oam_search(bbox=bbox)
m
Search OAM imagery interactively using the interactive GUI.
m = leafmap.Map(center=[4.7955, -75.6899], zoom=15)
m