I am not sure if this is possible with folium. I want to take the polygons value of the city of Toronto and map it over an area of Glimakra, Sweden. This is for an article I am writing about living in the countryside is not much different than living in a big city.
I want to take this polygon border of Toronto
and place it over the Glimakra, Sweden area.
I wrote this code and because my geojson data file for Toronto placed Toronto where it should be from a GEO perspective.
import folium
m = folium.Map(
location=[56.30507180,14.13632150],
zoom_start=11
)
folium.GeoJson("toronto_geojson.geojson", name="geojson").add_to(m)
folium.LayerControl().add_to(m)
m.save("index.html")
m
My question is, how can I turn my toronto_geojson.geojson into a file with the polygon shape without the geojson stuff so that I can place the shape over any map area. Similar to how I can use the folium plugin HeatMap to place a heatmap over a map area.
Does anyone know the best practice to do this?
from folium.plugins import HeatMap
import os
m = folium.Map([56.30507180,14.13632150], tiles='Stamen Toner', zoom_start=6)
HeatMap(data).add_to(m)
m.save(os.path.join('heatmap.html'))
m


