polartoolkit.region_xy_to_ll

Contents

polartoolkit.region_xy_to_ll#

region_xy_to_ll(region, hemisphere=None, epsg=None, dms=False, as_corners=False)[source]#

Convert region in format [xmin, xmax, ymin, ymax] in projected meters to lat / lon

Parameters:
  • region (tuple[Any, Any, Any, Any]) – region boundaries in format [xmin, xmax, ymin, ymax] in meters

  • 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

  • dms (bool) – if True, will return results as deg:min:sec instead of decimal degrees, by default False

  • as_corners (bool) – if True, will return the region string in the format (lower left longitude / lower left latitude / upper right longitude / upper right latitude +r)

Returns:

region boundaries in format [lon_min, lon_max, lat_min, lat_max] or as GMT region string in the format (lower left longitude / lower left latitude / upper right longitude / upper right latitude +r).

Return type:

tuple[Any, Any, Any, Any] | str