gdf_to_file
cellseg_gsontools.gdf_to_file(gdf, out_fn, format='.feather')
¶
Write a geojson/feather/parquet file from a gdf.
This is wrapper around geopandas.GeoDataFrame
I/O methods
that adds some extra functionality.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gdf |
GeoDataFrame
|
The input gdf. |
required |
out_fn |
Union[str, Path]
|
The output filename. |
required |
format |
str
|
The output format. One of ".feather", ".parquet", ".geojson". |
'.feather'
|
Raises:
Type | Description |
---|---|
ValueError
|
If |
ValueError
|
If the input gdf does not have a "class_name" column. |
Examples:
Write a geojson file.