This function fixes any invalid geometries in the zones data and renames the "ID" column to "id".
spod_clean_zones_v1(zones_path, zones)
A spatial object containing the cleaned zones data.
The path to the zones spatial data file.
The zones for which to download the data. Can be "districts"
(or "dist"
, "distr"
, or the original Spanish "distritos"
) or "municipalities"
(or "muni"
, "municip"
, or the original Spanish "municipios"
) for both data versions. Additionaly, these can be "large_urban_areas"
(or "lua"
, or the original Spanish "grandes_areas_urbanas"
, or "gau"
) for v2 data (2022 onwards).