From 3dd3566db26449350eabfc2945d0b2a4fd619df1 Mon Sep 17 00:00:00 2001 From: Francisco Rodriguez-Sanchez Date: Mon, 25 Mar 2024 14:24:26 +0100 Subject: [PATCH] use terra::ext to get lidar extent --- DESCRIPTION | 2 +- man/CityShadeMapper-package.Rd | 1 + tests/testthat/test-read_lidar.R | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0b130eb..3d0e058 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ License: AGPL (>= 3) Encoding: UTF-8 Roxygen: list(markdown = TRUE) LazyData: true -RoxygenNote: 7.2.1 +RoxygenNote: 7.3.1 Imports: class, gdistance, diff --git a/man/CityShadeMapper-package.Rd b/man/CityShadeMapper-package.Rd index ca40925..b34beb1 100644 --- a/man/CityShadeMapper-package.Rd +++ b/man/CityShadeMapper-package.Rd @@ -12,6 +12,7 @@ CityShadeMapper can generate high resolution shade maps (e.g. for every square m Useful links: \itemize{ \item \url{https://pakillo.github.io/CityShadeMapper/} + \item Report bugs at \url{https://github.com/Pakillo/CityShadeMapper/issues} } } diff --git a/tests/testthat/test-read_lidar.R b/tests/testthat/test-read_lidar.R index 91a2138..84c9ba7 100644 --- a/tests/testthat/test-read_lidar.R +++ b/tests/testthat/test-read_lidar.R @@ -2,13 +2,13 @@ test_that("read_lidar works", { lidar <- read_lidar(system.file("extdata", "PlazaNueva.laz", package = "CityShadeMapper", mustWork = TRUE)) - lidar.ext <- lidR::extent(lidar) + lidar.ext <- terra::ext(lidar) expect_true(inherits(lidar, "LAScatalog")) - expect_equal(lidar.ext@xmin, 234700) - expect_equal(round(lidar.ext@xmax), 234880) - expect_equal(lidar.ext@ymin, 4142100) - expect_equal(lidar.ext@ymax, 4142250) + expect_equal(terra::xmin(lidar.ext), 234700) + expect_equal(round(terra::xmax(lidar.ext)), 234880) + expect_equal(terra::ymin(lidar.ext), 4142100) + expect_equal(terra::ymax(lidar.ext), 4142250) expect_equal(lidR::st_crs(lidar)$input, "EPSG:3042") })