This major release introduces a full overhaul of the codebase and test suite. Requests now use httr2, and cached files are reorganized into topic-based subfolders for easier management.
Because of internal changes, existing caches are not compatible with this release and must be rebuilt.
We have transitioned from rappdirs::user_config_dir() to
tools::R_user_dir() for managing your persistent cache
directory. If you are a heavy mapSpain user and already
have a cache directory in place, you’ll receive a one-time friendly
message informing you about this migration. Consider it a warm welcome
to mapSpain 1.0.0 😉.
The package now requires R ≥ 4.1, and dependency
updates improve both performance and maintainability. All functions
return tidy objects (tibbles or sf objects with tibble
data).
Several new functions and arguments have been added, some functions renamed, and some others deprecated. All bundled datasets have been updated to their latest versions.
providerEspTileOptions() has been removed; use
leaflet::providerTileOptions() instead.?esp_munic.sf.?leaflet.providersESP.df (superseded in
mapSpain v0.8.0).?pobmun19; it has been replaced by
?pobmun25.esp_get_grid_EEA() is deprecated and defunct, as the
source file is no longer available.esp_getTiles() has been renamed to
esp_get_tiles() (old name still works).esp_get_country() has been renamed to
esp_get_spain() (old name still works).esp_get_rivers():
resolution and spatialtype are
deprecated.esp_get_wetlands() function.esp_get_stations(), replacing
esp_get_railway(..., spatialtype = "point").esp_siane_bulk_download() to download all SIANE
datasets to a specified cache_dir in a single step.esp_get_countries_siane() to retrieve all
countries available in SIANE at a given date.esp_get_spain_siane(), analogous to
esp_get_spain(), using SIANE data.esp_get_attributions() to retrieve the
attributions of a tile provider.?esp_nuts_2024, replacing
?esp_nuts.sf.esp_get_rivers() gains a new moveCAN
argument.esp_get_tiles() can be used with providers that needs
an API key.esp_get_prov_siane() when selecting
columns #115.type in esp_get_comarca().
Now it is possible to extract different types of comarcas: Official
(IGN), statistical (INE), agrarian or livestock comarcas (MAPA).esp_dict_region_code() and
esp_dict_translate().sf
objects in Canary Islands: esp_move_can().esp_move_can() is used internally on all
functions.esp_detect_cache_dir().mapSpain::layer_spatraster() removed (was deprecated in
mapSpain 0.6.2).esp_tiles_providers to https://dieghernan.github.io/leaflet-providersESP/
v1.3.3. New providers included:
IDErioja.BaseIDErioja.RelieveIDErioja.ClaroIDErioja.Oscuroesp_getTiles() now supports non-OGC compliant WMTS
providers, such as Stamen or OpenStreetMaps (see examples).leaflet.providersESP.df to https://dieghernan.github.io/leaflet-providersESP/
v1.3.2.leaflet.providersESP.df is superseded in favor of
esp_tiles_providers.type argument in
esp_getTiles() (#88).esp_make_provider() that helps to
create custom providers.moveCAN is a explicit argument in the relevant
functions.layer_spatraster(). Use
tidyterra::geom_spatraster_rgb() instead.esp_get_hex_prov() and
esp_get_hex_ccaa().esp_get_comarca().esp_get_simpl_prov().esp_get_simpl_ccaa().esp_getTiles() when
mask = TRUE.leaflet.providersESP.df to https://dieghernan.github.io/leaflet-providersESP/
v1.3.0. New providers:
Catastro.BuildingPartCatastro.AdministrativeBoundaryCatastro.AdministrativeUnitoptions to
esp_getTiles().esp_get_grid_MTN()esp_get_grid_BDN()esp_get_grid_EEA()esp_get_grid_ESDAC()layer_spatraster().mapSpain::esp_clear_cache()@family tag.esp_set_cache_dir()
based on rappdirs::user_cache_dir(). Now the cache_dir path
is stored and it is not necessary to set it up again on a new
session.zoommin on
esp_getTiles().esp_dict_translate() (#36).sysdata.rda.addProviderEspTiles().cache directory is created recursively.esp_dict_region_code() works with mixed casings (e.g:
esp_dict_region_code("aLbacEte", destination = "cpro")).cache_dir should be set as
options(mapSpain_cache_dir = "path/to/dir").mapSpain::esp_get_munic_siane()mapSpain::esp_get_prov_siane()mapSpain::esp_get_ccaa_siane()mapSpain::esp_get_hypsobath()mapSpain::esp_get_rivers()mapSpain::esp_get_hydrobasin()mapSpain::esp_get_capimun()mapSpain::esp_get_roads()mapSpain::esp_get_railway()poly option on
mapSpain::esp_get_can_box().geogrid::calculate_grid().mapSpain::esp_get_munic().mapSpain::esp_get_grid_prov() and
mapSpain::esp_get_grid_ccaa().