16EAGLE / basemaps

A lightweight package for accessing basemaps from open sources in R 🗺️
https://jakob.schwalb-willmann.de/basemaps
GNU General Public License v3.0
57 stars 15 forks source link

R crashes on loading basemap #26

Closed BlaiseKelly closed 6 months ago

BlaiseKelly commented 7 months ago

Creating a domain over Europe. basemap_raster requests and downloads successfully but then R crashes.

Am using R 4.3.2 and have tried with the stable and development version of basemaps.

library(basemaps)
library(sf)

##create simple domain of europe
d <- st_bbox(c(xmin = -25, xmax = 30, ymax = 72, ymin = 30), crs = 4326)

## get map
bg <- basemaps::basemap_raster(ext=d, map_service = "carto", map_type = "light")

## R crashes
xiaofanliang commented 7 months ago

Following, I am using basemaps in my class and a few students also encountered this issue with the development version, even though the code works with others.

bblonder commented 6 months ago

I also get this issue using the mapbox satellite maps.

sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS 13.6.4

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ggpubr_0.6.0 ggspatial_1.1.8 RStoolbox_0.3.0 sf_1.0-15 basemaps_0.0.5 [6] ggplot2_3.4.2 terra_1.7-65 dplyr_1.1.2

loaded via a namespace (and not attached): [1] httr_1.4.7 tidyr_1.3.0 splines_4.2.0 foreach_1.5.2
[5] carData_3.0-5 prodlim_2023.03.31 sp_2.1-2 stats4_4.2.0
[9] globals_0.16.2 ipred_0.9-14 backports_1.4.1 pillar_1.9.0
[13] lattice_0.21-8 glue_1.6.2 exactextractr_0.8.1 pROC_1.18.2
[17] digest_0.6.33 ggsignif_0.6.4 hardhat_1.3.0 colorspace_2.1-0
[21] recipes_1.0.6 Matrix_1.5-4.1 plyr_1.8.8 slippymath_0.3.1
[25] timeDate_4022.108 XML_3.99-0.14 pkgconfig_2.0.3 broom_1.0.4
[29] raster_3.6-26 listenv_0.9.0 magick_2.8.2 caret_6.0-94
[33] purrr_1.0.2 scales_1.2.1 gower_1.0.1 lava_1.7.2.1
[37] timechange_0.2.0 tibble_3.2.1 proxy_0.4-27 car_3.1-2
[41] generics_0.1.3 withr_2.5.0 pbapply_1.7-2 nnet_7.3-19
[45] cli_3.6.2 survival_3.5-5 magrittr_2.0.3 future_1.32.0
[49] fansi_1.0.4 parallelly_1.36.0 doParallel_1.0.17 nlme_3.1-162
[53] MASS_7.3-60 rstatix_0.7.2 class_7.3-22 tools_4.2.0
[57] data.table_1.14.8 lifecycle_1.0.4 stringr_1.5.0 munsell_0.5.0
[61] compiler_4.2.0 e1071_1.7-14 rlang_1.1.2 classInt_0.4-10
[65] units_0.8-5 grid_4.2.0 iterators_1.0.14 rstudioapi_0.14
[69] gtable_0.3.3 ModelMetrics_1.2.2.2 codetools_0.2-19 abind_1.4-5
[73] DBI_1.2.2 curl_5.2.0 reshape2_1.4.4 R6_2.5.1
[77] lubridate_1.9.2 future.apply_1.11.0 utf8_1.2.3 KernSmooth_2.23-21
[81] stringi_1.7.12 parallel_4.2.0 Rcpp_1.0.11 vctrs_0.6.5
[85] rpart_4.1.19 tidyselect_1.2.0

16EAGLE commented 6 months ago

Thanks for reporting this issue. Could you please check if R still crashes running @BlaiseKelly's example with the most recent version of basemaps on GitHub (install with remotes::install_github("16eagle/basemaps")? Thanks!

bblonder commented 6 months ago

I do not get a crash after updating the package and running that example.

BlaiseKelly commented 6 months ago

I can also confirm no crash, using R 4.3.3 and the remotes::install_github("16eagle/basemaps") installation. Many thanks @16EAGLE

16EAGLE commented 6 months ago

Thanks for testing. basemaps is back on CRAN and should be stable, closing this. Please reopen if you experience this bug again.