Is there an R function to create a centerline of a polygon? Similar to these methods in ArcGIS and Python?
Here's code to generate a dummy polygon -- where for this simple example we'd basically just want a line down the middle.
library(rgeos)
sdf <- data.frame(id=1:10, lat = 1:10, lon=1)
coordinates(sdf) <- ~lon+lat
sdf <- gBuffer(sdf, width=2, byid=F)
sf::st_voronoi