ExtendedGeoDataFrame

ExtendedGeoDataFrame(self, validation_schema, geotype, layer_name='', required_columns=[], logger=logging, *args, **kwargs)

A GeoPandas GeoDataFrame with extended properties and methods.

Methods

Name Description
delete_all Empty the dataframe
set_data Set data to the ExtendedGeoDataFrame.
snap_to_branch Snap the geometries to the branch.

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

Name Type Description Default
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

Returns

Type Description
None.

snap_to_branch

ExtendedGeoDataFrame.snap_to_branch(branches, snap_method, maxdist=5)

Snap the geometries to the branch.

Parameters

Name Type Description Default
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

Returns

Type Description
None.