This function crops an OpenStreetMap (OSM) object that has been preprocessed. It supports different types of geometric boundaries such as rectangles, circles, and hexagons, or a custom boundary provided as an 'sf' object.
Details
If the OSM object has not been preprocessed, the function will call preprocess_map()
to preprocess the data before applying the cropping. The type of preprocessing applied
is stored in the OSM object's metadata.
Examples
# \donttest{
data("osm")
# Apply a circular crop
osm_circle_cropped <- osm |> crop(boundary = "circle")
# }