quickpaver.RectilinearGrid.to_shapely#

RectilinearGrid.to_shapely(mask: ndarray[tuple[Any, ...], dtype[bool]] | None = None) MultiPolygon[source]#

Return a 2d regular grid to 2d shapely polygons.

Parameters:
  • grid (quickpaver.RectilinearGrid) – The input 2d regular grid.

  • mask (Optional[NDArrayBool], optional) – Boolean mask selecting cells to include. Cells equal to True are converted to polygons. If None, all cells are converted.

Returns:

  • Square panels as a MultiPolygon

Return type:

shapely.MultiPolygon