Geodatatool add file
Add file to a map in shapefile or geoJSON format¶
In [1]:
import geodatatool
import os
In [2]:
m = geodatatool.Map()
m
In [3]:
green_style = {
"stroke": True,
"color": "#00ff00",
"weight": 4,
"opacity": 1,
"fill": False,
"fillColor": "#000000",
"fillOpacity": 0.2,
}
In [4]:
in_shp = "./data/countries.shp"
In [5]:
m.add_shapefile(in_shp, style=green_style, layer_name="Shapefile")
In [6]:
in_geojson = "./data/us_states.geojson"
In [7]:
m.add_geojson(in_geojson, layer_name="GeoJSON")
Last update: 2021-05-07