hypergas.landmask module

Create 2D landmask for hyperspectral satellite data.

hypergas.landmask.Land_mask(lons, lats, source='OSM')[source]

Create the segmentation for land and ocean/lake types.

Parameters:
  • lons (numpy.ndarray) – 2D longitude of pixels.

  • lats (numpy.ndarray) – 2D latitude of pixels.

  • source (str) – The data source of land mask (“OSM”, “GSHHS” or “Natural Earth”), Default: “OSM”.

Returns:

Land_mask (DataArray) – 2D array, 0: ocean/lake, 1: land

hypergas.landmask.find_tiles(lat_min, lat_max, lon_min, lon_max)[source]

Generate the list of OSM filenames for the tiles that cover the given bounding box.

Parameters:
  • lat_min (float) – minimum latitude of the bounding box.

  • lat_max (float) – maximum latitude of the bounding box.

  • lon_min (float) – minimum longitude of the bounding box.

  • lon_max (float) – maximum longitude of the bounding box.

Returns:

tiles (list) – The list of tif filenames.