hydromt_sfincs.components.geometries.SfincsCrossSections#
- class hydromt_sfincs.components.geometries.SfincsCrossSections(model: SfincsModel)[source]#
SFINCS Cross-Sections Component.
This component handles the reading, writing, and creation of cross-section lines, which are used to “measure” discharges in the SFINCS model.
The data is stored as a GeoDataFrame containing LineString geometries, and written to an ascii SFINCS cross-sections (.crs) file.
- __init__(model: SfincsModel)[source]#
Methods
__init__(model)clear()Clean GeoDataFrame with cross sections.
close()Clean up all open datasets.
create(locations[, merge])Create model cross-sections (old name: setup_observation_lines)
delete(index)Remove one or more cross-sections.
delete_line(index)Remove one cross-section based on index or name.
finish_write()Finish the write functionality after cleanup was called for all components in the model.
list_names()Give list of names of cross sections.
read([filename])Read ascii SFINCS cross-sections (.crs) file.
set(gdf[, merge])Set SFINCS cross-sections.
snap_to_grid()Returns GeoDataFrame with cross-sections snapped to model grid.
test_equal(other)Test if two components are equal.
write([filename])Write ascii SFINCS cross-sections (.crs) file, and set crsfile in config (if it was not already set).
Attributes
Cross-section lines data, returned as a GeoDataFrame.
data_catalogReturn the data catalog of the model this component is associated with.
modelReturn the model object this component is associated with.
name_in_modelFind the name of the component in the parent model components.
rootReturn the root of the model this component is associated with.