xugrid.UgridDatasetAccessor.to_geodataframe#

UgridDatasetAccessor.to_geodataframe(dim_order=None) geopandas.GeoDataFrame[source]#

Convert data and topology of one facet (node, edge, face) of the grid to a geopandas GeoDataFrame. This also determines the geometry type of the geodataframe:

  • node: point

  • edge: line

  • face: polygon

Parameters:
  • name (str) – Name to give to the array (required if unnamed).

  • dim_order

    Hierarchical dimension order for the resulting dataframe. Array content is transposed to this order and then written out as flat vectors in contiguous order, so the last dimension in this list will be contiguous in the resulting DataFrame. This has a major influence on which operations are efficient on the resulting dataframe.

    If provided, must include all dimensions of this DataArray. By default, dimensions are sorted according to the DataArray dimensions order.

Returns:

geodataframe

Return type:

gpd.GeoDataFrame