neatnet.remove_false_nodes

neatnet.remove_false_nodes#

neatnet.remove_false_nodes(gdf, aggfunc='first', **kwargs)[source]#

Reimplementation of momepy.remove_false_nodes() that preserves attributes.

Parameters:
gdfgeopandas.GeoSeries | geopandas.GeoDataFrame

Input edgelines process. If any edges are MultiLineString they will be exploded into constituent LineString components.

aggfuncstr | dict = ‘first’

Aggregate function for processing non-spatial component.

**kwargs

Keyword arguments for aggfunc.

Returns:
geopandas.GeoSeries | geopandas.GeoDataFrame

The original input gdf if only 1 edgeline, otherwise the processed edgeline without interstitial nodes.

Notes

Any 3D geometries are (potentially) downcast in loops.