API reference#

The API reference provides an overview of all public functions in neatnet.

Network Simplification Routines#

The top-level function that performs complete adaptive simplification of street networks is the primary API of neatnet.

simplify_network(roads, *[, ...])

Top-level workflow for simplifying networks.

Simplification Components#

Some of the individual components are also exposed as independent functions (note that all are consumed by simplify_network()).

Either as combined routines:

consolidate_nodes(gdf[, tolerance, ...])

Return geometry with consolidated nodes.

fix_topology(roads[, eps])

Fix road network topology.

Or as their atomic components:

remove_false_nodes(gdf[, aggfunc])

Reimplementation of momepy.remove_false_nodes() that preserves attributes.

induce_nodes(roads[, eps])

Adding potentially missing nodes on intersections of individual LineString endpoints with the remaining network.

FaceArtifacts(gdf[, index, height_mins, ...])

Identify face artifacts in street networks.

Additional functions#

Some of the functions for specific pre-processing tasks that are not part of the simplification routine:

close_gaps(gdf, tolerance)

Close gaps in LineString geometry where it should be contiguous.

extend_lines(gdf, tolerance[, target, ...])

Extends lines from gdf to itself or target within a set tolerance

Internal components#

For debugging purposes, users may use some parts of the internal API.

get_artifacts(roads[, threshold, ...])

Extract face artifacts and return the FAI threshold.

simplify_loop(roads, artifacts[, ...])

Perform an iteration of the simplification procedure which includes:

simplify_singletons(artifacts, roads[, ...])

Simplification of singleton face artifacts – the first simplification step in the procedure detailed in simplify.simplify_loop().

simplify_pairs(artifacts, roads[, ...])

Simplification of pairs of face artifacts – the second simplification step in the procedure detailed in simplify.simplify_loop().

simplify_clusters(artifacts, roads[, ...])

Simplification of clusters of face artifacts – the third simplification step in the procedure detailed in simplify.simplify_loop().

None of the other functions is intended for public use and their API can change without a warning.