xugrid.burn_vector_geometry#
- xugrid.burn_vector_geometry(gdf: geopandas.GeoDataframe, like: 'xugrid.Ugrid2d' | 'xugrid.UgridDataArray' | 'xugrid.UgridDataset', column: str | None = None, fill: int | float = nan, all_touched: bool = False) xugrid.UgridDataArray [source]#
Burn vector geometries (points, lines, polygons) into a Ugrid2d mesh.
If no
column
argument is provided, a value of 1.0 will be burned in to the mesh.- Parameters:
gdf (geopandas.GeoDataFrame) – Polygons, points, and/or lines to be burned into the grid.
like (UgridDataArray, UgridDataset, or Ugrid2d) – Grid to burn the vector data into.
column (str, optional) – Name of the geodataframe column of which to the values to burn into grid.
fill (int, float, optional, default value
np.nan
.) – Fill value for nodata areas.all_touched (bool, optional, default value
False
.) – All mesh faces (cells) touched by polygons will be updated, not just those whose center point is within the polygon.
- Returns:
burned
- Return type: