This function simplifies a Konigsbergr graph by reducing the graph to a simpler representation where intersections are directly connected by straight edges.

simplify_konigsbergr(graph, preserve_bridges = TRUE)

## Arguments

graph A Konigsbergr graph created from konigsberg_graph(). Boolean. Preserve full bridge geometry?

## Value

A simple, undirected igraph object.

## Details

This reduces to a simple, undirected graph, so note that the distinction between two-way and one-way roads will be discarded. The sum of the total distances of the removed edges are maintained, however. The real-world road distance in meters along an edge will be saved in the distance edge attribute of the new graph.

if (FALSE) {
plot(boston_sf$edges["geometry"]) simple_boston <- simplify_konigsbergr(boston_konigsbergr) simple_boston_sf <- graph_to_sf(simple_boston) plot(simple_boston_sf$edges["geometry"])
}