79392296

Date: 2025-01-27 22:15:55
Score: 2.5
Natty:
Report link

@Robert Hijmans' answer fully addresses my question about using sf_use_s2() while cropping data. I'm adding an additional answer because I discovered that the whole problem can be avoided when using rnaturalearth with terra by importing the map object as a SpatVector rather than as an sf, and cropping using terra.

world <- ne_countries(scale = "small", returnclass = "sv")

europe <- terra::crop(world, ext(-20, 45, 30, 73))

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Robert
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: Jaken