momepy.
extend_lines
Extends lines from gdf to istelf or target within a set tolerance
Extends unjoined ends of LineString segments to join with other segments or target. If target is passed, extend lines to target. Otherwise extend lines to itself.
target
If barrier is passed, each extended line is checked for intersection with barrier. If they intersect, extended line is not returned. This can be useful if you don’t want to extend street network segments through buildings.
barrier
GeoDataFrame containing LineString geometry
tolerance in snapping (by how much could be each segment extended).
target geometry to which gdf gets extended. Has to be (Multi)LineString geometry.
gdf
extended line is not used if it intersects barrier
by how much to extend line beyond the snapped geometry. Useful when creating enclosures to avoid floating point imprecision.
GeoDataFrame of with extended geometry
See also
momepy.close_gaps
momepy.remove_false_nodes