polartoolkit.polygon_to_region

polartoolkit.polygon_to_region#

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

convert the output of ptk.draw_region to bounding region in the supplied projected units.

Parameters:
  • polyon (list) – list of polygon vertices

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

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

  • polygon (list[float])

Returns:

region in format in format [xmin, xmax, ymin, ymax]

Return type:

tuple[float, float, float, float]