R Under development (unstable) (2024-12-15 r87442 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > require(pacu) Loading required package: pacu > require(sf) Loading required package: sf Linking to GEOS 3.12.2, GDAL 3.9.3, PROJ 9.4.1; sf_use_s2() is TRUE > > run.test <- get(".run.local.tests", envir = pacu.options) > > if(run.test){ + + pt <- data.frame(x = c(-93.02), y = c(42.09)) + pt <- sf::st_as_sf(pt, coords = c('x', 'y'), crs = 'epsg:4326') + pt <- sf::st_transform(pt, 32615) + + pts <- list() + for ( i in 1:30) { + p1 <- pt + i * 10 + pts <- append(pts, p1) + } + pts <- do.call('c', pts) + st_crs(pts) <- st_crs(pt) + + pol <- pa_make_vehicle_polygons(pts[1], + 5, + sqrt(200), + 45) + + + + pols1 <- pa_make_vehicle_polygons(pts, + rep(5, 30), + rep(sqrt(200), 30), + rep(45, 30), + cores = 1) + + pols2 <- pa_make_vehicle_polygons(pts, + rep(5, 30), + rep(sqrt(200), 30), + rep(45, 30), + cores = 2) + + + pols <- pa_make_vehicle_polygons(pts, + rep(5, 30), + rep(sqrt(200), 30), + rep(45, 30)) + cpols1 <- pa_adjust_obs_effective_area(pols, + 1:30, + cores = 1) + + cpols2 <- pa_adjust_obs_effective_area(pols, + 1:30, + cores = 2) + + + + + pols <- pa_make_vehicle_polygons(pts, + rep(5, 30), + rep(30, 30), + rep(45, 30)) + + cpols <- pa_adjust_obs_effective_area(pols, + 1:30, + cores = 1) + area.original <- mean(as.numeric(sf::st_area(pols))) + area.solved <- mean(as.numeric(sf::st_area(cpols))) + + + + + + angles <- pacu:::.pa_estimate_angle(pts) + angles<- as.numeric(angles) + + + + } > > proc.time() user system elapsed 3.62 0.18 7.42