In this thread it's actually not well defined, essentially if a vertex is used twice it shouldn't be in the output. (But should we normalize on edge or vertex, or full shared boundaries?). Should islands stay in the set? (I don't think so)
With silicate, simplest case is
library(silicate)
sc <- SC(polygon)
library(dplyr)
sc$object_link_edge <- sc$object_link_edge |>
group_by(edge_) |>
filter(n() > 1)
plot(sc)But, we lost the integrity of the mesh and need to chase down the relations that need to be dropped. This is something I'm long term interested in. sf polygons are awful, as is the SF standard - we can analyse them to get the topology and be explicit about it, but we're really not closer to having good tools for this.
We can use the wk/geos tools to identify topology of points, but it's not that exciting without being able to trace the actual edge elements of a shape. rgeos always mixed up precision with this too, again that needs to be separate.