Closed ocefpaf closed 2 years ago
import folium
import folium.plugins
import geopandas
attr = "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
tiles = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
m = folium.Map(zoom_start=15,
location=[-27.5822, -48.5161],
tiles=tiles,
attr=attr,
)
# Descomente o código abaixo se você tiver a arquivo georeferenciado do mangue.
# folium.GeoJson(gdf).add_to(m)
# gdf = geopandas.read_file("./Manguezal_Itacorubi/itacorubi.geojson")
# meters = gdf.to_crs(epsg=3395) # WGS 84 / World Mercator
# m.fit_bounds(m.get_bounds())
folium.plugins.Fullscreen(force_separate_button=True).add_to(m)
for k, row in df.iterrows():
lat, lon = row["Lat"], row["Long"]
folium.Marker(location=[lat, lon]).add_to(m)
Note to self: fazer um app pyscript mais genérico para poder arrumar as planilhas antes do arquivamento.