iduedu.GraphEdits¶
- class iduedu.GraphEdits(add=None, remove=None, update=None)[source]¶
Edits of a graph given by lines in any CRS, resolved by
resolve_graph_edits().- Parameters:
add (
GeoDataFrame|None) – Lines of new edges. Columns other thangeometrybecome edge attributes, except:time_minandlength_meter(computed when absent),speed_kmh(givestime_minwhen it is absent) andoneway(bool, defaultFalse: the edge can be travelled both ways).remove (
GeoDataFrame|None) – Anchor lines; the network along each of them is removed. An optionaldirectioncolumn ("both", the default, or"along") limits a directed graph to the direction the anchor is drawn in.update (
GeoDataFrame|None) – Anchor lines with the new values of the edges along them, in any columns exceptu,vandk. A missing value keeps the old one.speed_kmhsetstime_min(andspeed_mpmwhen the graph has it) from the edge length unlesstime_minis given.directionworks as inremove.
- Raises:
TypeError – If a table is not a GeoDataFrame.
ValueError – If a table has no CRS, a duplicated index, geometries other than non-empty LineStrings, reserved columns, or an unknown
direction.