momepy.
get_node_id
Snap each building to closest street network node on the closest network edge.
Adds node ID to objects (preferably buildings). Gets ID of edge (momepy.get_network_id() or get_network_ratio()) , and determines which of its end points is closer to building centroid.
momepy.get_network_id()
get_network_ratio()
Pass either edge_id with a single value or edge_keys and edge_values with ratios.
edge_id
edge_keys
edge_values
GeoDataFrame containing objects to snap
GeoDataFrame containing street nodes with unique node ID. If there is none, it could be generated by momepy.unique_id().
momepy.unique_id()
GeoDataFrame containing street edges with unique edge ID and IDs of start and end points of each segment. Start and endpoints are default outcome of momepy.nx_to_gdf().
momepy.nx_to_gdf()
the name of the nodes dataframe column, np.array, or pd.Series with unique id
np.array
pd.Series
the name of the objects dataframe column with unique edge id (like an outcome of momepy.get_network_id())
name the name of the objects dataframe column with edgeID_keys (like an outcome of momepy.get_network_ratio())
momepy.get_network_ratio()
name the name of the objects dataframe column with edgeID_values (like an outcome of momepy.get_network_ratio())
if True, shows progress bars in loops and indication of steps
Series containing node ID for objects