ExtendedGeoDataFrame
ExtendedGeoDataFrame(
validation_schema=None,
geotype=None,
layer_name='',
required_columns=None,
logger=logging,
*args,
**kwargs,
)
A GeoPandas GeoDataFrame with extended properties and methods.
Methods
| copy |
Make a copy of this ExtendedGeoDataFrame object’s indices and data. |
| delete_all |
Empty the dataframe |
| set_data |
Set data to the ExtendedGeoDataFrame. |
| snap_to_branch |
Snap the geometries to the branch. |
copy
ExtendedGeoDataFrame.copy(deep=True)
Make a copy of this ExtendedGeoDataFrame object’s indices and data.
This method overrides the default copy method to properly handle the custom constructor parameters required by ExtendedGeoDataFrame.
Parameters
| deep |
bool |
Make a deep copy, including a copy of the data and the indices. With deep=False neither the indices nor the data are copied. |
True |
Returns
|
ExtendedGeoDataFrame |
Copy of ExtendedGeoDataFrame. |
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 |