Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings by compose_tile_grid when sf is loaded #15

Open
16EAGLE opened this issue Mar 25, 2020 · 0 comments
Open

Warnings by compose_tile_grid when sf is loaded #15

16EAGLE opened this issue Mar 25, 2020 · 0 comments

Comments

@16EAGLE
Copy link

16EAGLE commented Mar 25, 2020

Hi,

just an observation: while fixing broken moveVis code after the recent PROJ developments start to come into effect in spatial R packages on CRAN, I found that compose_tile_grid now throws the below warnings when it is loaded together with sf:

library(sf)
library(slippymath)
library(curl)

# get tile grid
bbox <- c(xmin = 8.897270, ymin = 47.721871, xmax = 8.999912, ymax = 47.773906)
tg <- bbox_to_tile_grid(bbox, max_tiles = 4)

# get image
url <- paste0("https://tile.openstreetmap.org/", tg$zoom, "/", tg$tiles[,1], "/", tg$tiles[,2], ".png")
files <- sapply(url, function(x){
  y <- tempfile(fileext = ".png")
  curl::curl_download(url = url, destfile = y)
  return(y)
})

# composing tile grid
r <- compose_tile_grid(tg, files)

# Warnings:
# 1: In `$.crs`(attr(bbox, "crs"), "proj4string") :
#   CRS uses proj4string, which is deprecated.
# 2: In `$.crs`(attr(bbox, "crs"), "proj4string") :
#   CRS uses proj4string, which is deprecated.
# 3: In `$.crs`(attr(bbox, "crs"), "proj4string") :
#   CRS uses proj4string, which is deprecated.
# 4: In `$.crs`(attr(bbox, "crs"), "proj4string") :
#   CRS uses proj4string, which is deprecated.
Session info
> version
#                _                           
# platform       x86_64-pc-linux-gnu         
# arch           x86_64                      
# os             linux-gnu                   
# system         x86_64, linux-gnu           
# status                                     
# major          3                           
# minor          6.3                         
# year           2020                        
# month          02                          
# day            29                          
# svn rev        77875                       
# language       R                           
# version.string R version 3.6.3 (2020-02-29)
# nickname       Holding the Windsock  

> packageVersion("slippymath")
# [1] ‘0.3.1’

No warnings when sf is not loaded. Thanks again for the great package!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant