Skip to content

Commit

Permalink
add logic to skip if overwrite == FALSE and file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderDevisscher committed Jan 7, 2025
1 parent 6e2c37c commit 5bd63ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/shape_to_geojson.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ shape_to_geojson <- function(input,
q_overwrite <- overwrite
}

if(q_overwrite == FALSE & file.exists(here::here(output, output_fn))){
cat(paste0(f, " already exists >> skipping"))
next()
}

shape <- sf::st_read(here::here(input, paste0(f, ".shp")))

## Check if the shape has a crs ####
Expand Down

0 comments on commit 5bd63ac

Please sign in to comment.