imod.formats.gen.write#

imod.formats.gen.write(path: Union[str, Path], geodataframe: geopandas.GeoDataFrame, feature_type: Optional[str] = None) None[source]#

Write a GeoDataFrame to a binary GEN file.

Note that the binary GEN file has two geometry types, circles and rectangles, which cannot be mapped directly from a shapely type. Points, lines, and polygons can be converted automatically.

In shapely, circles and rectangles will also be represented by polygons. To specifically write circles and rectangles to a binary GEN file, an additional column of strings is required which specifies the geometry type.

Parameters
  • path (Union[str, Path]) –

  • geodataframe (gpd.GeoDataFrame) –

  • feature_type (Optional[str]) – Which column to interpret as geometry type, one of: point, line, polygon, circle, rectangle. Default value is None.

Returns

Writes file.

Return type

None