xugrid.Ugrid2d.from_shapely#

static Ugrid2d.from_shapely(geometry: ndarray, crs=None) Ugrid2d[source]#

Convert an array of shapely polygons to UGRID2D topology.

Parameters:
  • geometry (np.ndarray of shapely polygons)

  • crs (Any, optional) – Coordinate Reference System of the geometry objects. Can be anything accepted by pyproj.CRS.from_user_input(), such as an authority string (eg “EPSG:4326”) or a WKT string.

Returns:

topology

Return type:

Ugrid2d