From 93a681e26b240f786d629ad01831c01dd2807823 Mon Sep 17 00:00:00 2001 From: gilbertocamara Date: Thu, 21 Nov 2024 08:27:55 -0300 Subject: [PATCH] fix problems with sits_view --- R/api_view.R | 2 +- src/.gitignore | 3 +++ src/Makevars | 3 +++ src/Makevars.win | 2 +- tests/testthat/test-segmentation.R | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 src/.gitignore create mode 100644 src/Makevars diff --git a/R/api_view.R b/R/api_view.R index 3e0ca3788..4e2649dd4 100644 --- a/R/api_view.R +++ b/R/api_view.R @@ -554,7 +554,7 @@ x = st_obj_new, opacity = opacity, colors = colors, - method = "near", + method = "auto", group = "classification", project = FALSE, maxBytes = max_bytes diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 000000000..22034c461 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,3 @@ +*.o +*.so +*.dll diff --git a/src/Makevars b/src/Makevars new file mode 100644 index 000000000..6660c7f93 --- /dev/null +++ b/src/Makevars @@ -0,0 +1,3 @@ +CXX_STD = CXX14 +PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) +PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/Makevars.win b/src/Makevars.win index cd1fe3a6e..6660c7f93 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,3 +1,3 @@ -# CXX_STD = CXX11 +CXX_STD = CXX14 PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/tests/testthat/test-segmentation.R b/tests/testthat/test-segmentation.R index 18948b3c6..09791b886 100644 --- a/tests/testthat/test-segmentation.R +++ b/tests/testthat/test-segmentation.R @@ -136,7 +136,7 @@ test_that("Segmentation", { "class" %in% colnames(vector_class) ) p_class_segs <- plot(class_segs) - <- p_class_segs[[1]]$shp + sf_segs <- p_class_segs[[1]]$shp bbox <- sf::st_bbox(sf_segs) expect_true(bbox[["xmin"]] < bbox[["xmax"]]) expect_true(bbox[["ymin"]] < bbox[["ymax"]])