Skip to content

Commit

Permalink
Merge pull request #946 from r-tmap/sa
Browse files Browse the repository at this point in the history
build ignore vignettes + prefix sf calls
  • Loading branch information
mtennekes authored Oct 23, 2024
2 parents 95b9aac + 4c042c1 commit 65c603d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ ubuntu_17_installation.sh
^vignettes/tmap-getstarted.Rmd$
^tests/testthat/Rplots.pdf$
^\.covrignore$
^vignettes$
4 changes: 2 additions & 2 deletions R/check_fix.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ check_fix = function(sfc, shp_name, reproj, messages) {
isLarge = (inherits(sfc, c("sfc_MULTIPOLYGON", "sfc_MULTILINESTRING", "sfc_GEOMETRYCOLLECTION")) && length(sfc) >= 5000)
if (isLarge && messages) message("Checking shape object \"", shp_name, " \". It is large, so it may take a while")

if (!all(st_is_valid(sfc))) {
if (!all(sf::st_is_valid(sfc))) {
checkAgain = FALSE
tryCatch({
if (messages) message("The shape object \"", shp_name, "\" is invalid", ifelse(reproj, " (after reprojection). ", ". "), "Trying to fix it...")
Expand All @@ -13,7 +13,7 @@ check_fix = function(sfc, shp_name, reproj, messages) {
if (messages) message("Unsuccesful attempt with sf::st_make_valid")
checkAgain = TRUE
})
if (checkAgain || !all(st_is_valid(sfc))) {
if (checkAgain || !all(sf::st_is_valid(sfc))) {
suppressMessages(sf::sf_use_s2(!s2))
.TMAP$set_s2 = s2
tryCatch({
Expand Down

0 comments on commit 65c603d

Please sign in to comment.