61 vector to gif
Creating animated GIF from vector data
Inspired by Johannes Uhl's shapefile2gif, I created a
vector_to_gif() function in leafmap that makes it much easier to create animated GIF from vector data with only one line of code. The sample dataset used in this notebook is a subset of the dataset retrieved from the shapefile2gif repo. Credits to Johannes Uhl. For more information about the datasets, check out the references below:
- Uhl, Johannes H; Leyk, Stefan (2022), "MTBF-33: A multi-temporal building footprint dataset for 33 counties in the United States (1900–2015)", Data in Brief, 43, 108369. DOI: 10.1016/j.dib.2022.108369
- Uhl, Johannes H; Leyk, Stefan (2022), “MTBF-33: A multi-temporal building footprint dataset for 33 U.S. counties at annual resolution (1900-2015)”, Mendeley Data, V2. DOI: 10.17632/w33vbvjtdy.2
Uncomment the following line to install leafmap if needed.
# !pip install -U leafmap
# A subset of the dataset retrieved from https://github.com/johannesuhl/shapefile2gif data = 'https://open.gishub.org/data/us/boulder_buildings.zip'
m = leafmap.Map(center=[39.9898, -105.2532], zoom=14) m.add_vector(data, layer_name='Buildings') m