ExtendedGeoDataFrame
ExtendedGeoDataFrame(
self,
validation_schema,
geotype,
layer_name='',
required_columns=[],
logger=logging,
*args,
**kwargs,
)
A GeoPandas GeoDataFrame with extended properties and methods.
Methods
delete_all
ExtendedGeoDataFrame.delete_all()
Empty the dataframe
set_data
ExtendedGeoDataFrame.set_data(
gdf,
layer='',
index_col=None,
check_columns=True,
check_geotype=True,
extra_attributes={},
)
Set data to the ExtendedGeoDataFrame.
Parameters
gdf |
GeoDataFrame |
GeoDataFrame with a HyDAMO object-layer |
required |
index_col |
str |
Column to be used as index. The default is None. |
None |
check_columns |
bool |
Check if all required columns are present in the GeoDataFrame. The default is True. |
True |
check_geotype |
bool |
Check if the geometry is of the required type. The default is True. |
True |
snap_to_branch
ExtendedGeoDataFrame.snap_to_branch(branches, snap_method, maxdist=5)
Snap the geometries to the branch.
Parameters
branches |
GeoDataFrame |
GeoDataFrame with branches |
required |
snap_method |
str |
Options for snapping |
required |
maxdist |
float |
The maximal distance for snapping. The default is 5. |
5 |