Skip to content

Commit

Permalink
Merge pull request #79 from rOpenSpain/wmts
Browse files Browse the repository at this point in the history
Update providers
  • Loading branch information
dieghernan authored Oct 27, 2022
2 parents dae4cb7 + bd06d74 commit 60a7dfa
Show file tree
Hide file tree
Showing 35 changed files with 554 additions and 1,118 deletions.
27 changes: 10 additions & 17 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.2.2
# CITATION file created with {cffr} R package, v0.3.0
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------

Expand All @@ -8,7 +8,7 @@ message: 'To cite package "mapSpain" in publications use:'
type: software
license: GPL-3.0-only
title: 'mapSpain: Administrative Boundaries of Spain'
version: 0.6.2
version: 0.6.2.9000
doi: 10.5281/zenodo.5366622
abstract: Administrative Boundaries of Spain at several levels (Autonomous Communities,
Provinces, Municipalities) based on the 'GISCO' 'Eurostat' database <https://ec.europa.eu/eurostat/web/gisco>
Expand All @@ -31,7 +31,7 @@ preferred-citation:
orcid: https://orcid.org/0000-0001-8457-4658
affiliation: rOpenSpain
year: '2022'
version: 0.6.2
version: 0.6.2.9000
doi: 10.5281/zenodo.5366622
url: https://ropenspain.github.io/mapSpain/
abstract: Administrative Boundaries of Spain at several levels (Autonomous Communities,
Expand Down Expand Up @@ -92,7 +92,7 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0003-2042-7063
year: '2022'
url: https://CRAN.R-project.org/package=countrycode
url: https://vincentarelbundock.github.io/countrycode/
version: '>= 1.2.0'
- type: software
title: giscoR
Expand All @@ -105,7 +105,6 @@ references:
orcid: https://orcid.org/0000-0001-8457-4658
affiliation: rOpenGov
year: '2022'
url: https://CRAN.R-project.org/package=giscoR
version: '>= 0.2.4'
- type: software
title: rappdirs
Expand All @@ -120,7 +119,6 @@ references:
- family-names: Davis
given-names: Trevor
year: '2022'
url: https://CRAN.R-project.org/package=rappdirs
version: '>= 0.3.0'
- type: software
title: sf
Expand All @@ -132,7 +130,6 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0001-8049-7069
year: '2022'
url: https://CRAN.R-project.org/package=sf
version: '>= 0.9.0'
- type: software
title: utils
Expand Down Expand Up @@ -179,7 +176,6 @@ references:
given-names: Dewey
orcid: https://orcid.org/0000-0002-9415-4582
year: '2022'
url: https://CRAN.R-project.org/package=ggplot2
version: '>= 3.0.0'
- type: software
title: knitr
Expand All @@ -191,7 +187,7 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0003-0645-5666
year: '2022'
url: https://CRAN.R-project.org/package=knitr
url: https://yihui.org/knitr/
- type: software
title: leaflet
abstract: 'leaflet: Create Interactive Web Maps with the JavaScript ''Leaflet''
Expand All @@ -206,7 +202,7 @@ references:
- family-names: Xie
given-names: Yihui
year: '2022'
url: https://CRAN.R-project.org/package=leaflet
url: https://rstudio.github.io/leaflet/
version: '>= 2.0.0'
- type: software
title: png
Expand All @@ -217,7 +213,7 @@ references:
given-names: Simon
email: [email protected]
year: '2022'
url: https://CRAN.R-project.org/package=png
url: http://www.rforge.net/png/
version: '>= 0.1-5'
- type: software
title: rmarkdown
Expand Down Expand Up @@ -257,7 +253,6 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0003-3925-190X
year: '2022'
url: https://CRAN.R-project.org/package=rmarkdown
- type: software
title: slippymath
abstract: 'slippymath: Slippy Map Tile Tools'
Expand All @@ -271,7 +266,7 @@ references:
given-names: Michael
email: [email protected]
year: '2022'
url: https://CRAN.R-project.org/package=slippymath
url: https://www.github.com/milesmcbain/slippymath
version: '>= 0.3.1'
- type: software
title: terra
Expand All @@ -283,7 +278,7 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0001-5872-2872
year: '2022'
url: https://CRAN.R-project.org/package=terra
url: https://rspatial.org/terra/
version: '>= 1.1-4'
- type: software
title: testthat
Expand All @@ -294,11 +289,10 @@ references:
given-names: Hadley
email: [email protected]
year: '2022'
url: https://CRAN.R-project.org/package=testthat
version: '>= 3.0.0'
- type: software
title: tidyterra
abstract: 'tidyterra: ''tidyverse'' Methods and ''ggplot2'' Utils for ''terra''
abstract: 'tidyterra: ''tidyverse'' Methods and ''ggplot2'' Helpers for ''terra''
Objects'
notes: Suggests
authors:
Expand All @@ -307,4 +301,3 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0001-8457-4658
year: '2022'
url: https://CRAN.R-project.org/package=tidyterra
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: mapSpain
Title: Administrative Boundaries of Spain
Version: 0.6.2
Version: 0.6.2.9000
Authors@R:
person("Diego", "Hernangómez", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658", affiliation = "rOpenSpain"))
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# mapSpain (development version)

- Upgrade `leaflet.providersESP.df` to
<https://dieghernan.github.io/leaflet-providersESP/> v1.3.1. Fix
`"MDT"/"MDT.Relieve"` provider.

# mapSpain 0.6.2

- Now `moveCAN` is a explicit parameter in the relevant functions.
Expand Down
2 changes: 1 addition & 1 deletion R/addProviderEspTiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#'
#' @source
#' <https://dieghernan.github.io/leaflet-providersESP/> leaflet plugin,
#' **v1.3.0**.
#' **v1.3.1**.
#'
#' @return A map object generated with [leaflet::leaflet()].
#'
Expand Down
4 changes: 2 additions & 2 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ NULL
#'
#' This function is a implementation of the javascript plugin
#' [leaflet-providersESP](https://dieghernan.github.io/leaflet-providersESP/)
#' **v1.3.0**.
#' **v1.3.1**.
#'
#' @docType data
#'
#' @source
#' <https://dieghernan.github.io/leaflet-providersESP/> leaflet plugin,
#' **v1.3.0**.
#' **v1.3.1**.
#'
#' @encoding UTF-8
#'
Expand Down
3 changes: 0 additions & 3 deletions R/esp_cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ esp_set_cache_dir <- function(cache_dir,
overwrite = FALSE,
install = FALSE,
verbose = TRUE) {


# Default if not provided
if (missing(cache_dir) || cache_dir == "") {
if (verbose) {
Expand Down Expand Up @@ -147,7 +145,6 @@ esp_clear_cache <- function(config = TRUE,
#'
#' @noRd
esp_hlp_detect_cache_dir <- function() {

# Try from getenv
getvar <- Sys.getenv("MAPSPAIN_CACHE_DIR")

Expand Down
5 changes: 2 additions & 3 deletions R/esp_getTiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#'
#' This function is a implementation of the javascript plugin
#' [leaflet-providersESP](https://dieghernan.github.io/leaflet-providersESP/)
#' **v1.3.0**.
#' **v1.3.1**.
#'
#' @family imagery utilities
#' @seealso [terra::rast()].
Expand All @@ -17,7 +17,7 @@
#' .
#' @source
#' <https://dieghernan.github.io/leaflet-providersESP/> leaflet plugin,
#' **v1.3.0**.
#' **v1.3.1**.
#'
#' @export
#'
Expand Down Expand Up @@ -232,7 +232,6 @@ esp_getTiles <- function(x,

# reproject rout if needed
if (!sf::st_crs(x) == sf::st_crs(rout)) {

# Sometimes it gets an error

rout_end <- try(terra::project(
Expand Down
3 changes: 0 additions & 3 deletions R/esp_get_grid_BDN.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ esp_get_grid_BDN <- function(resolution = 10,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE) {

# Check grid
res <- as.numeric(resolution)

Expand Down Expand Up @@ -101,8 +100,6 @@ esp_get_grid_BDN_ccaa <- function(ccaa,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE) {


# Get region id

ccaa <- ccaa[!is.na(ccaa)]
Expand Down
2 changes: 0 additions & 2 deletions R/esp_get_grid_EEA.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ esp_get_grid_EEA <- function(resolution = 100,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE) {


# Check grid
res <- as.numeric(resolution)

Expand Down
1 change: 0 additions & 1 deletion R/esp_get_grid_ESDAC.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ esp_get_grid_ESDAC <- function(resolution = 10,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE) {

# Check grid
res <- as.numeric(resolution)

Expand Down
2 changes: 0 additions & 2 deletions R/utils_tiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ getwms <- function(x,
res,
transparent,
options) {

# Get squared bbox
bbox <- as.double(sf::st_bbox(x))
dimx <- (bbox[3] - bbox[1])
Expand Down Expand Up @@ -229,7 +228,6 @@ getwmts <- function(x,
#' @name compose_tile_grid
#' @noRd
compose_tile_grid <- function(tile_grid, ext, images, transparent) {

# Based on https://github.com/riatelab/maptiles/blob/main/R/get_tiles.R

bricks <- vector("list", nrow(tile_grid$tiles))
Expand Down
3 changes: 1 addition & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ shape_pop <- merge(shape,
tile <-
esp_getTiles(shape_pop,
type = "IGNBase.Todo",
zoom = 10,
bbox_expand = .1
zoommin = 1
)
# Plot
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/rOpenSpain/mapSpain",
"issueTracker": "https://github.com/rOpenSpain/mapSpain/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.6.2",
"version": "0.6.2.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -233,7 +233,7 @@
"applicationCategory": "cartography",
"isPartOf": "https://ropenspain.es/",
"keywords": ["rOpenSpain", "tiles", "r", "maps", "spatial", "rstats", "r-package", "municipalities", "Spain", "gisco", "provinces", "ign", "administrative-boundaries", "ccaa", "static-tiles", "spain", "cran", "ropenspain", "ggplot2", "gis"],
"fileSize": "2849.304KB",
"fileSize": "2622.307KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
Loading

0 comments on commit 60a7dfa

Please sign in to comment.