Create satellite foot-print

Create a polygon that should represent a foot-print from Sentinel-1 A/B.

Used for testing the satskred import routine.


In [1]:
import geopandas as gpd
from shapely.geometry import Polygon


C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\parentpoller.py:116: UserWarning: Parent poll failed.  If the frontend dies,
                the kernel may be left running.  Please let us know
                about your system (bitness, Python, etc.) at
                ipython-dev@scipy.org
  ipython-dev@scipy.org""")
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-43c024939da4> in <module>()
      1 
----> 2 import geopandas as gpd
      3 from shapely.geometry import Polygon

ModuleNotFoundError: No module named 'geopandas'

In [ ]:
lat_point_list = [70.815, 67.202, 67.695, 70.995]
lon_point_list = [16.835, 19.450, 23.185, 18.945]
 
polygon_geom = Polygon(zip(lon_point_list, lat_point_list))
crs = {'init': 'epsg:4326'}
polygon = gpd.GeoDataFrame(index=[0], crs=crs, geometry=[polygon_geom])       
print(polygon.geometry)

In [ ]:
# polygon.to_file(filename='polygon.geojson', driver='GeoJSON')
polygon.to_file(filename='polygon.shp', driver="ESRI Shapefile")

Plot the polygon with folium.


In [ ]:
import folium

In [ ]:
m = folium.Map([50.854457, 4.377184], zoom_start=5, tiles='cartodbpositron')
folium.GeoJson(polygon).add_to(m)
folium.LatLngPopup().add_to(m)
m