polartoolkit.polygon_to_shapefile

polartoolkit.polygon_to_shapefile#

polygon_to_shapefile(polygon, hemisphere=None, epsg=None)[source]#

Convert a polygon drawn with ptk.draw_region to a geopandas GeoDataFrame

Parameters:
  • polygon (list[float]) – list of polygon vertices

  • hemisphere (str | None) – set projection based on β€œnorth” or β€œsouth” hemispheres, by default None

  • epsg (str | None) – set projection from EPSG code string (β€œ3031”), by default None

Returns:

returns a geopandas GeoDataFrame of the polygon

Return type:

GeoDataFrame