esp_get_grid_ESDAC: Get 'sf' polygons of the national geographic grids provided...

View source: R/esp_get_grid_ESDAC.R

esp_get_grid_ESDACR Documentation

Get sf polygons of the national geographic grids provided by ESDAC

Description

Loads a sf polygon with the geographic grids of Spain as provided by the European Soil Data Centre (ESDAC).

Usage

esp_get_grid_ESDAC(
  resolution = 10,
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE
)

Arguments

resolution

Resolution of the grid in kms. Could be 1 or 10.

update_cache

A logical whether to update cache. Default is FALSE. When set to TRUE it would force a fresh download of the source file.

cache_dir

A path to a cache directory. See About caching.

verbose

Logical, displays information. Useful for debugging, default is FALSE.

Value

A sf polygon

About caching

You can set your cache_dir with esp_set_cache_dir().

Sometimes cached files may be corrupt. On that case, try re-downloading the data setting update_cache = TRUE.

If you experience any problem on download, try to download the corresponding .geojson file by any other method and save it on your cache_dir. Use the option verbose = TRUE for debugging the API query.

Source

EEA reference grid.

References

  • Panagos P., Van Liedekerke M., Jones A., Montanarella L., "European Soil Data Centre: Response to European policy support and public data requirements"; (2012) Land Use Policy, 29 (2), pp. 329-338. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.landusepol.2011.07.003")}

  • European Soil Data Centre (ESDAC), esdac.jrc.ec.europa.eu, European Commission, Joint Research Centre.

See Also

Other grids: esp_get_grid_BDN(), esp_get_grid_EEA(), esp_get_grid_MTN()

Examples


## Not run: 
grid <- esp_get_grid_ESDAC()
esp <- esp_get_country(moveCAN = FALSE)

library(ggplot2)

ggplot(grid) +
  geom_sf() +
  geom_sf(data = esp, color = "grey50", fill = NA) +
  theme_light() +
  labs(title = "ESDAC Grid for Spain")

## End(Not run)


mapSpain documentation built on July 26, 2023, 5:29 p.m.