Build a local square grid around a point (km-based) and clip by radius (robust CRS handling)
Source:R/int_make_grid.R
smn_int_make_grid.RdBuild a local square grid around a point (km-based) and clip by radius (robust CRS handling)
Arguments
- lat
Numeric latitude of center (WGS84).
- lon
Numeric longitude of center (WGS84).
- cell_km
Numeric cell size in kilometers (default 1).
- radius_km
Numeric radius (km) for square/round extent.
- clip
Logical; clip by country polygon (if available).
- crs_out
Output CRS EPSG code (default 4326).
- return
Character: "sf" or "data.frame".