Back to Article

###### 3-6 spatial modeling - manuscript construction

Download Notebook

- post-modeling visualization
- environmental correlations
- soil and point map generation
- gridding example plot

    In [1]:

    load_packages <- function(packages) {
      # Check for uninstalled packages
      uninstalled <- packages[!packages %in% installed.packages()[,"Package"]]

      # Install uninstalled packages
      if(length(uninstalled)) install.packages(uninstalled, dependencies = TRUE)

      # Load all packages
      for (pkg in packages) {
        if (!require(pkg, character.only = TRUE, quietly = TRUE)) {
          message(paste("Failed to load package:", pkg))
        }
      }
    }

    # List of packages to check, install, and load
    packages <- c("tidyverse", "mgcv", "stars", "terra",
                  "ggpubr", "patchwork", "janitor", "sf","tidyterra",
                  "here","ggpubr","MetBrewer","rnaturalearth",'viridis','broom')

    load_packages(packages)

    i_am('README.md')

    # Setting R options for jupyterlab
    options(repr.plot.width = 10, repr.plot.height = 10)

    Installing packages into ‘/opt/homebrew/lib/R/4.4/site-library’
    (as ‘lib’ is unspecified)

    Warning: dependency ‘starsdata’ is not available

    also installing the dependencies ‘rJava’, ‘sftime’, ‘areal’, ‘slippymath’, ‘OpenStreetMap’, ‘exactextractr’, ‘gstat’, ‘lwgeom’, ‘ncdfgeom’, ‘raster’, ‘maptiles’

    trying URL 'https://cran.rstudio.com/src/contrib/rJava_1.0-11.tar.gz'
    Content type 'application/x-gzip' length 634103 bytes (619 KB)
    ==================================================
    downloaded 619 KB

    trying URL 'https://cran.rstudio.com/src/contrib/sftime_0.3.0.tar.gz'
    Content type 'application/x-gzip' length 89093 bytes (87 KB)
    ==================================================
    downloaded 87 KB

    trying URL 'https://cran.rstudio.com/src/contrib/areal_0.1.8.tar.gz'
    Content type 'application/x-gzip' length 1408610 bytes (1.3 MB)
    ==================================================
    downloaded 1.3 MB

    trying URL 'https://cran.rstudio.com/src/contrib/slippymath_0.3.1.tar.gz'
    Content type 'application/x-gzip' length 2670727 bytes (2.5 MB)
    ==================================================
    downloaded 2.5 MB

    trying URL 'https://cran.rstudio.com/src/contrib/OpenStreetMap_0.4.0.tar.gz'
    Content type 'application/x-gzip' length 2238753 bytes (2.1 MB)
    ==================================================
    downloaded 2.1 MB

    trying URL 'https://cran.rstudio.com/src/contrib/exactextractr_0.10.0.tar.gz'
    Content type 'application/x-gzip' length 630630 bytes (615 KB)
    ==================================================
    downloaded 615 KB

    trying URL 'https://cran.rstudio.com/src/contrib/gstat_2.1-2.tar.gz'
    Content type 'application/x-gzip' length 2283118 bytes (2.2 MB)
    ==================================================
    downloaded 2.2 MB

    trying URL 'https://cran.rstudio.com/src/contrib/lwgeom_0.2-14.tar.gz'
    Content type 'application/x-gzip' length 475042 bytes (463 KB)
    ==================================================
    downloaded 463 KB

    trying URL 'https://cran.rstudio.com/src/contrib/ncdfgeom_1.1.6.tar.gz'
    Content type 'application/x-gzip' length 4205059 bytes (4.0 MB)
    ==================================================
    downloaded 4.0 MB

    trying URL 'https://cran.rstudio.com/src/contrib/raster_3.6-31.tar.gz'
    Content type 'application/x-gzip' length 575608 bytes (562 KB)
    ==================================================
    downloaded 562 KB

    trying URL 'https://cran.rstudio.com/src/contrib/maptiles_0.8.0.tar.gz'
    Content type 'application/x-gzip' length 1113004 bytes (1.1 MB)
    ==================================================
    downloaded 1.1 MB

    trying URL 'https://cran.rstudio.com/src/contrib/stars_0.6-7.tar.gz'
    Content type 'application/x-gzip' length 4033515 bytes (3.8 MB)
    ==================================================
    downloaded 3.8 MB

    trying URL 'https://cran.rstudio.com/src/contrib/tidyterra_0.6.2.tar.gz'
    Content type 'application/x-gzip' length 1964051 bytes (1.9 MB)
    ==================================================
    downloaded 1.9 MB

    * installing *source* package ‘rJava’ ...
    ** package ‘rJava’ successfully unpacked and MD5 sums checked
    ** using staged installation

    checking for gcc... clang
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether clang accepts -g... yes
    checking for clang option to accept ISO C89... none needed
    checking how to run the C preprocessor... clang -E
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files...

    rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory

    yes
    checking for sys/wait.h that is POSIX.1 compatible... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for string.h... (cached) yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking for unistd.h... (cached) yes
    checking for an ANSI C-conforming const... yes
    checking whether time.h and sys/time.h may both be included... yes
    configure: checking whether clang supports static inline...
    yes
    checking whether setjmp.h is POSIX.1 compatible... yes
    checking whether sigsetjmp is declared... yes
    checking whether siglongjmp is declared... yes
    checking Java support in R...

    configure: error: absent
    R was configured without Java support. Please run
    R CMD javareconf
    as root to add Java support to R.

    If you do not have root privileges, run
    R CMD javareconf -e
    to set all Java-related variables and then install rJava.
    ERROR: configuration failed for package ‘rJava’
    * removing ‘/opt/homebrew/lib/R/4.4/site-library/rJava’
    * installing *source* package ‘sftime’ ...
    ** package ‘sftime’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (sftime)
    * installing *source* package ‘areal’ ...
    ** package ‘areal’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (areal)
    * installing *source* package ‘lwgeom’ ...
    ** package ‘lwgeom’ successfully unpacked and MD5 sums checked
    ** using staged installation

    configure: CC: clang
    configure: CXX: clang++ -std=gnu++17
    configure: pkg-config proj exists, will use it
    configure: using proj.h.
    configure: PROJ: 9.5.1
    checking PROJ: checking whether linking against PROJ works:... yes

    ld: warning: ignoring duplicate libraries: '-lz'

    configure: POSTGIS_PROJ_VERSION: 95
    checking for geos-config... /opt/homebrew/bin/geos-config
    checking geos-config usability... yes
    configure: GEOS: 3.13.0
    checking GEOS version >= 3.5.0... yes
    checking geos: linking with -L/opt/homebrew/Cellar/geos/3.13.0/lib -lgeos_c... yes
    checking for GEOS_init_r in -lgeos_c... yes
    configure: Package CPP flags:   -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H
    configure: Package LIBS: -L/opt/homebrew/Cellar/proj/9.5.1/lib -lproj -lc++ -lm -ldl -lsqlite3 -L/opt/homebrew/opt/libtiff/lib -ltiff -L/opt/homebrew/opt/zstd/lib -lzstd -L/opt/homebrew/Cellar/xz/5.6.3/lib -llzma -pthread -lpthread -L/opt/homebrew/opt/jpeg-turbo/lib -ljpeg -lz -lcurl -lldap -lz     -L/opt/homebrew/Cellar/geos/3.13.0/lib -lgeos_c
    configure: creating ./config.status
    config.status: creating src/Makevars
    config.status: creating src/postgis_config.h

    ** libs
    using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
    using SDK: ‘MacOSX15.2.sdk’

    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c geodetic.cpp -o geodetic.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c lwgeom.cpp -o lwgeom.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c RcppExports.cpp -o RcppExports.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c proj.cpp -o proj.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c geos.cpp -o geos.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c io.cpp -o io.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c sub.cpp -o sub.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/varint.c -o liblwgeom/varint.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_twkb.c -o liblwgeom/lwout_twkb.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwpsurface.c -o liblwgeom/lwpsurface.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwtriangle.c -o liblwgeom/lwtriangle.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwmpoly.c -o liblwgeom/lwmpoly.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lookup3.c -o liblwgeom/lookup3.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwin_wkt.c -o liblwgeom/lwin_wkt.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/gserialized1.c -o liblwgeom/gserialized1.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom.c -o liblwgeom/lwgeom.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/gserialized2.c -o liblwgeom/gserialized2.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwstroke.c -o liblwgeom/lwstroke.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwtin.c -o liblwgeom/lwtin.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwin_twkb.c -o liblwgeom/lwin_twkb.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_geos_cluster.c -o liblwgeom/lwgeom_geos_cluster.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwmsurface.c -o liblwgeom/lwmsurface.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_wrapx.c -o liblwgeom/lwgeom_wrapx.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwiterator.c -o liblwgeom/lwiterator.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_geos_node.c -o liblwgeom/lwgeom_geos_node.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_geojson.c -o liblwgeom/lwout_geojson.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_debug.c -o liblwgeom/lwgeom_debug.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_median.c -o liblwgeom/lwgeom_median.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwmval.c -o liblwgeom/lwmval.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwkmeans.c -o liblwgeom/lwkmeans.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_geos.c -o liblwgeom/lwgeom_geos.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_kml.c -o liblwgeom/lwout_kml.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwutil.c -o liblwgeom/lwutil.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwprint.c -o liblwgeom/lwprint.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwrandom.c -o liblwgeom/lwrandom.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwmline.c -o liblwgeom/lwmline.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeodetic_tree.c -o liblwgeom/lwgeodetic_tree.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwline.c -o liblwgeom/lwline.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/bytebuffer.c -o liblwgeom/bytebuffer.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeodetic.c -o liblwgeom/lwgeodetic.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/measures.c -o liblwgeom/measures.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_api.c -o liblwgeom/lwgeom_api.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwmcurve.c -o liblwgeom/lwmcurve.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwcollection.c -o liblwgeom/lwcollection.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/gbox.c -o liblwgeom/gbox.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwspheroid.c -o liblwgeom/lwspheroid.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_svg.c -o liblwgeom/lwout_svg.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwin_encoded_polyline.c -o liblwgeom/lwin_encoded_polyline.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_encoded_polyline.c -o liblwgeom/lwout_encoded_polyline.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_geos_split.c -o liblwgeom/lwgeom_geos_split.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/effectivearea.c -o liblwgeom/effectivearea.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwboundingcircle.c -o liblwgeom/lwboundingcircle.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwcurvepoly.c -o liblwgeom/lwcurvepoly.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwlinearreferencing.c -o liblwgeom/lwlinearreferencing.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwunionfind.c -o liblwgeom/lwunionfind.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwchaikins.c -o liblwgeom/lwchaikins.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwalgorithm.c -o liblwgeom/lwalgorithm.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwhomogenize.c -o liblwgeom/lwhomogenize.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_geos_clean.c -o liblwgeom/lwgeom_geos_clean.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/measures3d.c -o liblwgeom/measures3d.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_x3d.c -o liblwgeom/lwout_x3d.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_transform.c -o liblwgeom/lwgeom_transform.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwin_wkt_lex.c -o liblwgeom/lwin_wkt_lex.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwmpoint.c -o liblwgeom/lwmpoint.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/stringbuffer.c -o liblwgeom/stringbuffer.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwcompound.c -o liblwgeom/lwcompound.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/gserialized.c -o liblwgeom/gserialized.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_wkt.c -o liblwgeom/lwout_wkt.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwin_wkb.c -o liblwgeom/lwin_wkb.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/ptarray.c -o liblwgeom/ptarray.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_wkb.c -o liblwgeom/lwout_wkb.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwpoly.c -o liblwgeom/lwpoly.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwpoint.c -o liblwgeom/lwpoint.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwout_gml.c -o liblwgeom/lwout_gml.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwgeom_topo.c -o liblwgeom/lwgeom_topo.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwcircstring.c -o liblwgeom/lwcircstring.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -I/opt/homebrew/Cellar/proj/9.5.1/include -I/opt/homebrew/opt/libtiff/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.6.3/include -I/opt/homebrew/opt/jpeg-turbo/include -DHAVE_PROJ_H  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include  -DPOSTGIS_PROJ_VERSION=95 -DUSE_PROJ_H -I/opt/homebrew/Cellar/geos/3.13.0/include -DPOSTGIS_GEOS_VERSION=35 -I./liblwgeom -DHAVE_LIBGEOM_INTERNAL_H -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I'/opt/homebrew/lib/R/4.4/site-library/sf/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c liblwgeom/lwin_wkt_parse.c -o liblwgeom/lwin_wkt_parse.o
    clang++ -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib -o lwgeom.so geodetic.o lwgeom.o RcppExports.o proj.o geos.o io.o sub.o liblwgeom/varint.o liblwgeom/lwout_twkb.o liblwgeom/lwpsurface.o liblwgeom/lwtriangle.o liblwgeom/lwmpoly.o liblwgeom/lookup3.o liblwgeom/lwin_wkt.o liblwgeom/gserialized1.o liblwgeom/lwgeom.o liblwgeom/gserialized2.o liblwgeom/lwstroke.o liblwgeom/lwtin.o liblwgeom/lwin_twkb.o liblwgeom/lwgeom_geos_cluster.o liblwgeom/lwmsurface.o liblwgeom/lwgeom_wrapx.o liblwgeom/lwiterator.o liblwgeom/lwgeom_geos_node.o liblwgeom/lwout_geojson.o liblwgeom/lwgeom_debug.o liblwgeom/lwgeom_median.o liblwgeom/lwmval.o liblwgeom/lwkmeans.o liblwgeom/lwgeom_geos.o liblwgeom/lwout_kml.o liblwgeom/lwutil.o liblwgeom/lwprint.o liblwgeom/lwrandom.o liblwgeom/lwmline.o liblwgeom/lwgeodetic_tree.o liblwgeom/lwline.o liblwgeom/bytebuffer.o liblwgeom/lwgeodetic.o liblwgeom/measures.o liblwgeom/lwgeom_api.o liblwgeom/lwmcurve.o liblwgeom/lwcollection.o liblwgeom/gbox.o liblwgeom/lwspheroid.o liblwgeom/lwout_svg.o liblwgeom/lwin_encoded_polyline.o liblwgeom/lwout_encoded_polyline.o liblwgeom/lwgeom_geos_split.o liblwgeom/effectivearea.o liblwgeom/lwboundingcircle.o liblwgeom/lwcurvepoly.o liblwgeom/lwlinearreferencing.o liblwgeom/lwunionfind.o liblwgeom/lwchaikins.o liblwgeom/lwalgorithm.o liblwgeom/lwhomogenize.o liblwgeom/lwgeom_geos_clean.o liblwgeom/measures3d.o liblwgeom/lwout_x3d.o liblwgeom/lwgeom_transform.o liblwgeom/lwin_wkt_lex.o liblwgeom/lwmpoint.o liblwgeom/stringbuffer.o liblwgeom/lwcompound.o liblwgeom/gserialized.o liblwgeom/lwout_wkt.o liblwgeom/lwin_wkb.o liblwgeom/ptarray.o liblwgeom/lwout_wkb.o liblwgeom/lwpoly.o liblwgeom/lwpoint.o liblwgeom/lwout_gml.o liblwgeom/lwgeom_topo.o liblwgeom/lwcircstring.o liblwgeom/lwin_wkt_parse.o -L/opt/homebrew/Cellar/proj/9.5.1/lib -lproj -lc++ -lm -ldl -lsqlite3 -L/opt/homebrew/opt/libtiff/lib -ltiff -L/opt/homebrew/opt/zstd/lib -lzstd -L/opt/homebrew/Cellar/xz/5.6.3/lib -llzma -pthread -lpthread -L/opt/homebrew/opt/jpeg-turbo/lib -ljpeg -lz -lcurl -lldap -lz -L/opt/homebrew/Cellar/geos/3.13.0/lib -lgeos_c -lgeos_c -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation

    ld: warning: ignoring duplicate libraries: '-lc++', '-lgeos_c', '-lz'
    installing to /opt/homebrew/lib/R/4.4/site-library/00LOCK-lwgeom/00new/lwgeom/libs
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    ** checking absolute paths in shared objects and dynamic libraries
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (lwgeom)
    * installing *source* package ‘raster’ ...
    ** package ‘raster’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
    using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
    using SDK: ‘MacOSX15.2.sdk’

    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c RasterModule.cpp -o RasterModule.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c RcppExports.cpp -o RcppExports.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c aggregate.cpp -o aggregate.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c bilinear.cpp -o bilinear.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c broom.cpp -o broom.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c cellRowCol.cpp -o cellRowCol.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c clamp.cpp -o clamp.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c distance.cpp -o distance.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c edge.cpp -o edge.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c focal_fun.cpp -o focal_fun.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c focal_get.cpp -o focal_get.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c focal_sum.cpp -o focal_sum.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c geodesic.c -o geodesic.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c getPolygons.cpp -o getPolygons.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c layerize.cpp -o layerize.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c memory.cpp -o memory.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c modal.cpp -o modal.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c ppmin.cpp -o ppmin.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c raster_aggregate.cpp -o raster_aggregate.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c raster_distance.cpp -o raster_distance.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c rasterize.cpp -o rasterize.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c reclass.cpp -o reclass.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c terrain.cpp -o terrain.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c util.cpp -o util.o
    clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c xyCell.cpp -o xyCell.o
    clang++ -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib -o raster.so RasterModule.o RcppExports.o aggregate.o bilinear.o broom.o cellRowCol.o clamp.o distance.o edge.o focal_fun.o focal_get.o focal_sum.o geodesic.o getPolygons.o layerize.o memory.o modal.o ppmin.o raster_aggregate.o raster_distance.o rasterize.o reclass.o terrain.o util.o xyCell.o -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation

    installing to /opt/homebrew/lib/R/4.4/site-library/00LOCK-raster/00new/raster/libs
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading

    in method for ‘initialize’ with signature ‘"BasicRaster"’: no definition for class “BasicRaster”
    in method for ‘brick’ with signature ‘x="kasc"’: no definition for class “kasc”
    in method for ‘brick’ with signature ‘x="grf"’: no definition for class “grf”
    in method for ‘coerce’ with signature ‘"STFDF","RasterBrick"’: no definition for class “STFDF”
    in method for ‘coerce’ with signature ‘"STSDF","RasterBrick"’: no definition for class “STSDF”
    in method for ‘coerce’ with signature ‘"asc","RasterLayer"’: no definition for class “asc”
    in method for ‘coerce’ with signature ‘"RasterLayer","asc"’: no definition for class “asc”
    in method for ‘coerce’ with signature ‘"kasc","RasterBrick"’: no definition for class “kasc”
    in method for ‘coerce’ with signature ‘"kasc","RasterStack"’: no definition for class “kasc”
    in method for ‘coerce’ with signature ‘"kde","RasterLayer"’: no definition for class “kde”
    in method for ‘coerce’ with signature ‘"grf","RasterBrick"’: no definition for class “grf”
    in method for ‘coerce’ with signature ‘"grf","RasterLayer"’: no definition for class “grf”
    in method for ‘extent’ with signature ‘x="bbox"’: no definition for class “bbox”
    in method for ‘extent’ with signature ‘x="sf"’: no definition for class “sf”
    in method for ‘extract’ with signature ‘x="Raster",y="sf"’: no definition for class “sf”
    in method for ‘mask’ with signature ‘x="Raster",mask="sf"’: no definition for class “sf”
    in method for ‘raster’ with signature ‘x="sf"’: no definition for class “sf”
    in method for ‘raster’ with signature ‘x="kasc"’: no definition for class “kasc”
    in method for ‘raster’ with signature ‘x="asc"’: no definition for class “asc”
    in method for ‘raster’ with signature ‘x="kde"’: no definition for class “kde”
    in method for ‘raster’ with signature ‘x="grf"’: no definition for class “grf”
    in method for ‘rasterize’ with signature ‘x="sf",y="Raster"’: no definition for class “sf”
    in method for ‘setValues’ with signature ‘x="RasterLayerSparse"’: no definition for class “RasterLayerSparse”
    in method for ‘stack’ with signature ‘x="kasc"’: no definition for class “kasc”

    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    ** checking absolute paths in shared objects and dynamic libraries
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (raster)
    * installing *source* package ‘stars’ ...
    ** package ‘stars’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** demo
    ** inst
    ** byte-compile and prepare package for lazy loading

    in method for ‘coerce’ with signature ‘"stars","Raster"’: no definition for class “Raster”
    in method for ‘coerce’ with signature ‘"stars_proxy","Raster"’: no definition for class “Raster”
    in method for ‘coerce’ with signature ‘"stars","SpatRaster"’: no definition for class “SpatRaster”
    in method for ‘coerce’ with signature ‘"stars_proxy","SpatRaster"’: no definition for class “SpatRaster”
    in method for ‘coerce’ with signature ‘"stars","STFDF"’: no definition for class “STFDF”
    in method for ‘coerce’ with signature ‘"stars","Spatial"’: no definition for class “Spatial”

    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (stars)
    * installing *source* package ‘tidyterra’ ...
    ** package ‘tidyterra’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (tidyterra)
    * installing *source* package ‘slippymath’ ...
    ** package ‘slippymath’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (slippymath)
    ERROR: dependency ‘rJava’ is not available for package ‘OpenStreetMap’
    * removing ‘/opt/homebrew/lib/R/4.4/site-library/OpenStreetMap’
    * installing *source* package ‘exactextractr’ ...
    ** package ‘exactextractr’ successfully unpacked and MD5 sums checked
    ** using staged installation

    configure: exactextractr: 0.10.0
    checking for geos-config... /opt/homebrew/bin/geos-config
    checking geos-config usability... yes
    configure: GEOS version: 3.13.0
    checking geos version at least 3.5.0... yes
    checking compiling and building against geos_c... yes
    configure: PKG_CXX: clang++ -std=gnu++17
    configure: PKG_CXXFLAGS: -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include
    configure: PKG_LIBS: -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib -L/opt/homebrew/Cellar/geos/3.13.0/lib -lgeos_c
    configure: creating ./config.status
    config.status: creating src/Makevars

    ** libs
    using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
    using C++14
    using SDK: ‘MacOSX15.2.sdk’

    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c RcppExports.cpp -o RcppExports.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exact_extract.cpp -o exact_extract.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c raster_utils.cpp -o raster_utils.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c coverage_fraction.cpp -o coverage_fraction.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c rasterize.cpp -o rasterize.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c resample.cpp -o resample.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/measures.cpp -o exactextract/src/measures.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/box.cpp -o exactextract/src/box.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/cell.cpp -o exactextract/src/cell.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/coordinate.cpp -o exactextract/src/coordinate.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/floodfill.cpp -o exactextract/src/floodfill.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/geos_utils.cpp -o exactextract/src/geos_utils.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/grid.cpp -o exactextract/src/grid.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/perimeter_distance.cpp -o exactextract/src/perimeter_distance.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/raster_cell_intersection.cpp -o exactextract/src/raster_cell_intersection.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/side.cpp -o exactextract/src/side.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/traversal.cpp -o exactextract/src/traversal.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/traversal_areas.cpp -o exactextract/src/traversal_areas.o
    clang++ -std=gnu++14 -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG  -I'/opt/homebrew/lib/R/4.4/site-library/Rcpp/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -g -O2 -I/opt/homebrew/Cellar/geos/3.13.0/include -fPIC  -g -O2   -c exactextract/src/weighted_quantiles.cpp -o exactextract/src/weighted_quantiles.o
    clang++ -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib -o exactextractr.so RcppExports.o exact_extract.o raster_utils.o coverage_fraction.o rasterize.o resample.o exactextract/src/measures.o exactextract/src/box.o exactextract/src/cell.o exactextract/src/coordinate.o exactextract/src/floodfill.o exactextract/src/geos_utils.o exactextract/src/grid.o exactextract/src/perimeter_distance.o exactextract/src/raster_cell_intersection.o exactextract/src/side.o exactextract/src/traversal.o exactextract/src/traversal_areas.o exactextract/src/weighted_quantiles.o -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib -L/opt/homebrew/Cellar/geos/3.13.0/lib -lgeos_c -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation

    installing to /opt/homebrew/lib/R/4.4/site-library/00LOCK-exactextractr/00new/exactextractr/libs
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** checking absolute paths in shared objects and dynamic libraries
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (exactextractr)
    * installing *source* package ‘gstat’ ...
    ** package ‘gstat’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
    using SDK: ‘MacOSX15.2.sdk’

    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c block.c -o block.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c data.c -o data.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c direct.c -o direct.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c fit.c -o fit.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c gcdist.c -o gcdist.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c getest.c -o getest.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c gls.c -o gls.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c glvars.c -o glvars.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c init.c -o init.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c lm.c -o lm.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c mapio.c -o mapio.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c msim.c -o msim.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c mtrx.c -o mtrx.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c nsearch.c -o nsearch.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c pqueue.c -o pqueue.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c reml.c -o reml.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c s.c -o s.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c select.c -o select.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c sem.c -o sem.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c sim.c -o sim.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c userio.c -o userio.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c utils.c -o utils.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c vario.c -o vario.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c vario_fn.c -o vario_fn.o
    clang -I"/opt/homebrew/Cellar/r/4.4.2_2/lib/R/include" -DNDEBUG -DR_NO_REMAP  -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2  -c vario_io.c -o vario_io.o
    clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/xz/lib -L/opt/homebrew/lib -o gstat.so block.o data.o direct.o fit.o gcdist.o getest.o gls.o glvars.o init.o lm.o mapio.o msim.o mtrx.o nsearch.o pqueue.o reml.o s.o select.o sem.o sim.o userio.o utils.o vario.o vario_fn.o vario_io.o -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -lRlapack -L/opt/homebrew/opt/openblas/lib -lopenblas -L/opt/homebrew/opt/gcc/lib/gcc/current/gcc/aarch64-apple-darwin24/14 -L/opt/homebrew/opt/gcc/lib/gcc/current/gcc -L/opt/homebrew/opt/gcc/lib/gcc/current -lemutls_w -lheapt_w -lgfortran -lquadmath -L/opt/homebrew/Cellar/r/4.4.2_2/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation

    installing to /opt/homebrew/lib/R/4.4/site-library/00LOCK-gstat/00new/gstat/libs
    ** R
    ** data
    ** demo
    ** inst
    ** byte-compile and prepare package for lazy loading

    in method for ‘krige’ with signature ‘"formula","sf"’: no definition for class “sf”
    in method for ‘idw’ with signature ‘"formula","sf"’: no definition for class “sf”
    in method for ‘krige.cv’ with signature ‘"formula","sf"’: no definition for class “sf”

    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** checking absolute paths in shared objects and dynamic libraries
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (gstat)
    * installing *source* package ‘ncdfgeom’ ...
    ** package ‘ncdfgeom’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (ncdfgeom)
    * installing *source* package ‘maptiles’ ...
    ** package ‘maptiles’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (maptiles)

    The downloaded source packages are in
        ‘/private/var/folders/m1/qs_n5y2557746gx_dblswt040000gn/T/RtmpfOTx3W/downloaded_packages’

    ── Attaching core tidyverse packages ────────────────────────────────────────────────────────────────────────────── tidyverse 2.0.0 ──
    ✔ dplyr     1.1.4     ✔ readr     2.1.5
    ✔ forcats   1.0.0     ✔ stringr   1.5.1
    ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
    ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
    ✔ purrr     1.0.2
    ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
    ✖ dplyr::filter() masks stats::filter()
    ✖ dplyr::lag()    masks stats::lag()
    ℹ Use the conflicted package to force all conflicts to become errors

    Attaching package: ‘nlme’

    The following object is masked from ‘package:dplyr’:

        collapse

    This is mgcv 1.9-1. For overview type 'help("mgcv-package")'.
    Linking to GEOS 3.13.0, GDAL 3.10.1, PROJ 9.5.1; sf_use_s2() is TRUE
    terra 1.8.15

    Attaching package: ‘terra’

    The following object is masked from ‘package:tidyr’:

        extract

    Attaching package: ‘ggpubr’

    The following object is masked from ‘package:terra’:

        rotate

    Attaching package: ‘patchwork’

    The following object is masked from ‘package:terra’:

        area

    Attaching package: ‘janitor’

    The following object is masked from ‘package:terra’:

        crosstab

    The following objects are masked from ‘package:stats’:

        chisq.test, fisher.test

    Attaching package: ‘tidyterra’

    The following object is masked from ‘package:stats’:

        filter

    here() starts at /Users/lawton/SideProjects/herbivore_nutrient_interactions

    Warning messages:
    1: In install.packages(uninstalled, dependencies = TRUE) :
      installation of package ‘rJava’ had non-zero exit status
    2: In install.packages(uninstalled, dependencies = TRUE) :
      installation of package ‘OpenStreetMap’ had non-zero exit status

    here() starts at /Users/lawton/SideProjects/herbivore_nutrient_interactions

# Section 1 - Post spatial modeling visualization

## Nitrogen and Phosphorus

showing the relationship between outbreak and nil observations to soil nitrogen and phosphorus

    In [2]:

    outbreak_model_results <- read_csv(here("output/spatial_modeling/outbreak_model_smooth_estimates.csv"),show_col_types = FALSE) |>
        filter(.smooth %in% c('s(nitrogen)','s(phosphorus)')) |>
        select(.smooth,.estimate,.se,nitrogen,phosphorus) |>
        mutate(model = 'outbreak')

    nil_model_results <- read_csv(here("output/spatial_modeling/nil_model_smooth_estimates.csv"),show_col_types = FALSE) |>
        filter(.smooth %in% c('s(nitrogen)','s(phosphorus)')) |>
        select(.smooth,.estimate,.se,nitrogen,phosphorus)  |>
        mutate(model = 'nil')

    combine_dat <- rbind(outbreak_model_results,nil_model_results)

    In [3]:

    combine_dat |> summary()

       .smooth            .estimate             .se             nitrogen         phosphorus         model
     Length:400         Min.   :-0.51405   Min.   :0.02356   Min.   :0.02263   Min.   :0.00963   Length:400
     Class :character   1st Qu.:-0.15765   1st Qu.:0.02478   1st Qu.:0.11762   1st Qu.:0.05739   Class :character
     Mode  :character   Median :-0.03445   Median :0.03381   Median :0.21183   Median :0.10503   Mode  :character
                        Mean   :-0.04231   Mean   :0.03667   Mean   :0.21182   Mean   :0.10536
                        3rd Qu.: 0.06018   3rd Qu.:0.04245   3rd Qu.:0.30533   3rd Qu.:0.15261
                        Max.   : 0.59066   Max.   :0.10095   Max.   :0.39963   Max.   :0.21246
                                                             NA's   :200       NA's   :200

    In [4]:

    p1 <- combine_dat |>
      filter(.smooth == "s(nitrogen)") |>
      ggplot(aes(x=nitrogen)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se,fill=model),alpha=.2) +
        geom_line(aes(y = .estimate ,color=model),size=1) +
        theme_pubr() +
        scale_color_manual(values = c('dark grey','red'))  +
        scale_fill_manual(values = c('dark grey','red')) +
        xlab("soil nitrogen (%)") +
        ylab("partial effect") +
        scale_x_continuous(limits = c(0,0.33),breaks = c(0,0.1,0.2,0.3))

    p2 <- combine_dat |>
      filter(.smooth == "s(phosphorus)") |>
      ggplot(aes(x=phosphorus)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se,fill=model),alpha=.2) +
        geom_line(aes(y = .estimate ,color=model),size=1) +
        theme_pubr() +
        scale_color_manual(values = c('dark grey','red'))  +
        scale_fill_manual(values = c('dark grey','red')) +
        xlab("soil phosphorus (%)") +
        ylab("partial effect")  +
        scale_x_continuous(limits = c(0,0.22),breaks = c(0,0.1,0.2))

    soil_outbreak_plot <- (p1) / (p2) +
        plot_annotation(tag_levels = 'a')
    soil_outbreak_plot

    Warning message:
    Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
    ℹ Please use `linewidth` instead.
    This warning is displayed once every 8 hours.
    Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
    Warning message:
    Removed 38 rows containing missing values or values outside the scale range (`geom_line()`).

    In [17]:

    ggsave(soil_outbreak_plot,
           file=here('output/publication_figures/spatial_modeling_locust_outbreak_with_soil_NTO_PTO.png'),
           width=5,height=10)

    Warning message:
    “Removed 54 rows containing missing values or values outside the scale range
    (`geom_line()`).”
    Warning message:
    “Removed 7 rows containing missing values or values outside the scale range
    (`geom_line()`).”

## Other variable visualization – outbreaks

    In [3]:

    outbreak_model_results <- read_csv(here("output/spatial_modeling/outbreak_model_smooth_estimates.csv"),show_col_types = FALSE)

    In [5]:

    outbreak_raw_data <- read_csv(here("data/processed/spatial_modeling/spatial_modeling_locust_outbreak_model_data.csv"),show_col_types = FALSE)
    outbreak_raw_data

A spec_tbl_df: 6649 × 10
polygon_id | longitude | latitude | nymph_density | nymph_density_count | nymph_density_total_count | ecoregion | bio12 | nitrogen | phosphorus
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
<dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <dbl> | <dbl> | <dbl>
162921 | 137.1195 | -33.36002 | 4 | 1 | 1 | Eyre and York mallee | 331 | 0.07035461 | 0.02197414
162960 | 137.1216 | -33.37009 | 4 | 1 | 1 | Eyre and York mallee | 339 | 0.06677070 | 0.01618503
170315 | 136.9592 | -30.26600 | 4 | 1 | 1 | Tirari-Sturt stony desert | 182 | 0.03427848 | 0.01595730
172294 | 137.0525 | -30.07720 | 4 | 1 | 1 | Tirari-Sturt stony desert | 180 | 0.03820919 | 0.01412924
172295 | 137.0578 | -30.07140 | 4 | 1 | 1 | Tirari-Sturt stony desert | 179 | 0.03533372 | 0.01694394
172377 | 137.0753 | -30.05024 | 4 | 1 | 2 | Tirari-Sturt stony desert | 180 | 0.06836170 | 0.03356544
192073 | 137.1874 | -29.89030 | 4 | 1 | 1 | Tirari-Sturt stony desert | 173 | 0.03479458 | 0.01383735
193454 | 137.5380 | -30.07380 | 4 | 1 | 1 | Tirari-Sturt stony desert | 176 | 0.03569951 | 0.02491605
206392 | 137.9696 | -32.26107 | 4 | 1 | 1 | Flinders-Lofty montane woodlands | 404 | 0.07185610 | 0.02279203
206393 | 137.9668 | -32.25617 | 4 | 2 | 2 | Flinders-Lofty montane woodlands | 413 | 0.07645808 | 0.02031513
209498 | 137.9492 | -31.61819 | 4 | 1 | 1 | Tirari-Sturt stony desert | 203 | 0.04148520 | 0.02630786
209569 | 137.9632 | -31.70650 | 4 | 1 | 1 | Tirari-Sturt stony desert | 208 | 0.04492940 | 0.03324070
211605 | 137.6774 | -29.76760 | 4 | 1 | 1 | Tirari-Sturt stony desert | 173 | 0.03870536 | 0.02983529
212597 | 137.9168 | -29.44980 | 4 | 1 | 2 | Tirari-Sturt stony desert | 168 | 0.03728484 | 0.03044395
213505 | 137.7454 | -29.17600 | 4 | 1 | 1 | Simpson desert | 152 | 0.02882154 | 0.02294426
213586 | 137.7635 | -29.16975 | 4 | 2 | 2 | Simpson desert | 152 | 0.02707394 | 0.02861177
213778 | 137.8167 | -29.25000 | 4 | 1 | 1 | Tirari-Sturt stony desert | 154 | 0.03234052 | 0.03360970
214161 | 137.9196 | -29.42070 | 4 | 1 | 1 | Tirari-Sturt stony desert | 167 | 0.03601952 | 0.03150935
214202 | 137.9258 | -29.40320 | 4 | 1 | 1 | Tirari-Sturt stony desert | 167 | 0.03613603 | 0.03251821
214209 | 137.9283 | -29.33695 | 4 | 1 | 2 | Tirari-Sturt stony desert | 160 | 0.03437736 | 0.03591342
214213 | 137.9254 | -29.30290 | 4 | 1 | 1 | Tirari-Sturt stony desert | 158 | 0.03442869 | 0.03725352
214247 | 137.9343 | -29.35770 | 4 | 1 | 2 | Tirari-Sturt stony desert | 161 | 0.07268831 | 0.07080571
232712 | 138.1425 | -32.66077 | 4 | 2 | 4 | Flinders-Lofty montane woodlands | 433 | 0.06606667 | 0.01810598
233107 | 138.2422 | -32.71106 | 4 | 1 | 2 | Flinders-Lofty montane woodlands | 395 | 0.12675576 | 0.04384988
233465 | 138.3276 | -32.72333 | 4 | 2 | 2 | Flinders-Lofty montane woodlands | 358 | 0.06185994 | 0.01846647
233479 | 138.3281 | -32.58508 | 4 | 4 | 17 | Flinders-Lofty montane woodlands | 332 | 0.11416441 | 0.02351847
233519 | 138.3361 | -32.58414 | 4 | 8 | 16 | Flinders-Lofty montane woodlands | 332 | 0.10883869 | 0.02276825
233632 | 137.9713 | -32.26198 | 4 | 2 | 2 | Flinders-Lofty montane woodlands | 393 | 0.07019464 | 0.02264591
233633 | 137.9668 | -32.25617 | 4 | 2 | 2 | Flinders-Lofty montane woodlands | 391 | 0.07304939 | 0.02136315
233673 | 137.9796 | -32.25159 | 4 | 1 | 3 | Flinders-Lofty montane woodlands | 377 | 0.13422986 | 0.06265061
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮
2018446 | 150.0115 | -30.15317 | 4 | 1 | 1 | Eastern Australian temperate forests | 724 | 0.14196477 | 0.04613744
2018499 | 150.0188 | -30.02667 | 4 | 1 | 1 | Eastern Australian temperate forests | 729 | 0.15595667 | 0.04958885
2018595 | 150.0462 | -29.86330 | 4 | 1 | 1 | Brigalow tropical savanna | 693 | 0.13914928 | 0.03738768
2018635 | 150.0515 | -29.86310 | 4 | 1 | 1 | Brigalow tropical savanna | 696 | 0.13782500 | 0.04144760
2018636 | 150.0491 | -29.85970 | 4 | 2 | 2 | Brigalow tropical savanna | 697 | 0.12978726 | 0.03489501
2029261 | 149.9146 | -27.24459 | 4 | 1 | 1 | Brigalow tropical savanna | 582 | 0.09071380 | 0.02793104
2031606 | 150.1074 | -26.99821 | 4 | 1 | 1 | Brigalow tropical savanna | 618 | 0.11173388 | 0.03380123
2031646 | 150.1138 | -27.00157 | 4 | 1 | 1 | Brigalow tropical savanna | 618 | 0.10280340 | 0.03194848
2031647 | 150.1104 | -26.99544 | 4 | 2 | 2 | Brigalow tropical savanna | 621 | 0.10349590 | 0.03461240
2031848 | 150.1609 | -26.98394 | 4 | 2 | 2 | Brigalow tropical savanna | 626 | 0.09802996 | 0.02606758
2033670 | 149.8105 | -25.97655 | 4 | 1 | 3 | Brigalow tropical savanna | 648 | 0.45162414 | 0.12971553
2033709 | 149.8178 | -25.97762 | 4 | 1 | 1 | Brigalow tropical savanna | 648 | 0.13634376 | 0.04158761
2034309 | 149.9748 | -25.98289 | 4 | 1 | 1 | Brigalow tropical savanna | 664 | 0.14011470 | 0.04105017
2035453 | 149.8586 | -25.74524 | 4 | 1 | 1 | Brigalow tropical savanna | 675 | 0.15236172 | 0.04199324
2035454 | 149.8617 | -25.74163 | 4 | 1 | 1 | Brigalow tropical savanna | 676 | 0.14873641 | 0.04344147
2035494 | 149.8776 | -25.73969 | 4 | 1 | 1 | Brigalow tropical savanna | 678 | 0.14199231 | 0.04097893
2035495 | 149.8747 | -25.72923 | 4 | 1 | 1 | Brigalow tropical savanna | 675 | 0.13976263 | 0.03960572
2035535 | 149.8777 | -25.73223 | 4 | 1 | 1 | Brigalow tropical savanna | 675 | 0.13709288 | 0.03862375
2035687 | 149.9262 | -25.80474 | 4 | 1 | 1 | Brigalow tropical savanna | 672 | 0.16049945 | 0.04424812
2035762 | 149.9411 | -25.85920 | 4 | 1 | 1 | Brigalow tropical savanna | 666 | 0.13608748 | 0.03773236
2035802 | 149.9537 | -25.85789 | 4 | 2 | 2 | Brigalow tropical savanna | 668 | 0.12680566 | 0.03663616
2047612 | 150.5000 | -30.88967 | 4 | 1 | 1 | Eastern Australian temperate forests | 648 | 0.10582088 | 0.04111735
2048088 | 150.2170 | -30.52733 | 4 | 1 | 1 | Brigalow tropical savanna | 625 | 0.09833836 | 0.03240250
2048090 | 150.2208 | -30.51100 | 4 | 1 | 2 | Brigalow tropical savanna | 626 | 0.10713665 | 0.03559885
2048131 | 150.2265 | -30.50142 | 4 | 1 | 2 | Brigalow tropical savanna | 634 | 0.08956050 | 0.03326204
2048173 | 150.2348 | -30.48550 | 4 | 1 | 1 | Brigalow tropical savanna | 652 | 0.10122099 | 0.04396403
2051273 | 150.2108 | -29.49383 | 4 | 1 | 1 | Brigalow tropical savanna | 657 | 0.17314670 | 0.07494596
2051274 | 150.2065 | -29.48567 | 4 | 2 | 2 | Brigalow tropical savanna | 656 | 0.15274771 | 0.04480011
2068269 | 150.8516 | -32.29570 | 4 | 1 | 1 | Eastern Australian temperate forests | 637 | 0.16331407 | 0.04882702
2092645 | 151.3450 | -30.55830 | 4 | 1 | 1 | Eastern Australian temperate forests | 738 | 0.12296158 | 0.02618895

    In [9]:

    p1 <- outbreak_model_results |>
      filter(.smooth == "s(nitrogen)") |>
      ggplot(aes(x=nitrogen)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se),alpha=.2) +
        geom_line(aes(y = .estimate),size=1) +
        theme_pubr() +
        xlab("soil nitrogen (%)") +
        ylab("partial effect")

    p2 <- outbreak_model_results |>
      filter(.smooth == "s(nymph_density_total_count)") |>
      ggplot(aes(x=nymph_density_total_count)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se),alpha=.2) +
        geom_line(aes(y = .estimate),size=1) +
        theme_pubr() +
        xlab("total number of observations") +
        ylab("partial effect")

    aus <- ne_states(country = 'Australia')

    map_dat <- outbreak_model_results |>
        drop_na(longitude,latitude,.estimate) |>
        st_as_sf(coords = c("longitude", "latitude"),crs= "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")

    p3 <- aus |>
        ggplot() +
            geom_sf() +
            geom_sf(data=map_dat,aes(color=.estimate)) +
            scale_color_viridis() +
            theme_void()  +
            labs(color="partial effect")

    p4 <- outbreak_model_results |>
      filter(.smooth == "s(phosphorus)") |>
      ggplot(aes(x=phosphorus)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se),alpha=.2) +
        geom_line(aes(y = .estimate),size=1) +
        theme_pubr() +
        xlab("total number of observations") +
        ylab("partial effect")

    p5 <- outbreak_model_results |>
        drop_na(ecoregion) |>
        ggplot(aes(y=.estimate, x=reorder(ecoregion,.estimate))) +
            geom_point() +
            geom_errorbar(aes(ymin = .estimate - .se, ymax = .estimate + .se),width=0) +
            theme_pubr() +
            ylab('partial effect') +
            xlab('ecoregion') +
            theme(axis.text.x=element_blank(),
                axis.ticks.x=element_blank())

    layout <- '
    AB
    CD
    EE
    '

    outbreak_all_model_variables <- p1 + p2 + p4 + p5 + p3 +
        plot_layout(design = layout) +
        plot_annotation(tag_levels = 'a')

    outbreak_all_model_variables

    In [403]:

    ggsave(outbreak_all_model_variables,
           file=here('output/publication_figures/spatial_modeling_outbreak_all_model_variables.png'),
           width=10,height=15)

## Other variable visualization – nil observations

    In [388]:

    nil_model_results <- read_csv(here("output/spatial_modeling/nil_model_smooth_estimates.csv"),show_col_types = FALSE)

    In [389]:

    p1 <- nil_model_results |>
      filter(.smooth == "s(nitrogen)") |>
      ggplot(aes(x=nitrogen)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se),alpha=.2) +
        geom_line(aes(y = .estimate),size=1) +
        theme_pubr() +
        xlab("soil nitrogen (%)") +
        ylab("partial effect")

    p2 <- nil_model_results |>
      filter(.smooth == "s(nymph_density_total_count)") |>
      ggplot(aes(x=nymph_density_total_count)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se),alpha=.2) +
        geom_line(aes(y = .estimate),size=1) +
        theme_pubr() +
        xlab("total number of observations") +
        ylab("partial effect")

    aus <- ne_states(country = 'Australia')

    map_dat <- nil_model_results |>
        drop_na(longitude,latitude,.estimate) |>
        st_as_sf(coords = c("longitude", "latitude"),crs= "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")

    p3 <- aus |>
        ggplot() +
            geom_sf() +
            geom_sf(data=map_dat,aes(color=.estimate)) +
            scale_color_viridis() +
            theme_void() +
            labs(color="partial effect")

    p4 <- nil_model_results |>
      filter(.smooth == "s(phosphorus)") |>
      ggplot(aes(x=phosphorus)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se),alpha=.2) +
        geom_line(aes(y = .estimate),size=1) +
        theme_pubr() +
        xlab("total number of observations") +
        ylab("partial effect")

    p5 <- nil_model_results |>
        drop_na(ecoregion) |>
        ggplot(aes(y=.estimate, x=reorder(ecoregion,.estimate))) +
            geom_point() +
            geom_errorbar(aes(ymin = .estimate - .se, ymax = .estimate + .se),width=0) +
            theme_pubr() +
            ylab('partial effect') +
            xlab('ecoregion') +
            theme(axis.text.x=element_blank(),
                axis.ticks.x=element_blank())

    layout <- '
    AB
    CD
    EE
    '

    nil_all_model_variables <- p1 + p2 + p4 + p5 + p3 +
        plot_layout(design = layout) +
        plot_annotation(tag_levels = 'a')

    nil_all_model_variables

    In [390]:

    ggsave(nil_all_model_variables,
           file=here('output/publication_figures/spatial_modeling_nil_all_model_variables.png'),
           width=10,height=15)

## mean annual precipitation correlations

    In [391]:

    map_outbreak <- read_csv(here("output/spatial_modeling/map_outbreak_model_smooth_estimates.csv"),show_col_types = FALSE) |>
        drop_na(bio12) |>
        mutate(model = 'outbreak')

    map_nil <- read_csv(here("output/spatial_modeling/map_nill_model_smooth_estimates.csv"),show_col_types = FALSE) |>
        drop_na(bio12) |>
        mutate(model = 'nil')

    map_mod_results <- rbind(map_outbreak,map_nil)
    map_mod_results |> head()

A tibble: 6 × 11
.smooth | .type | .by | .estimate | .se | bio12 | nymph_density_total_count | longitude | latitude | ecoregion | model
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
<chr> | <chr> | <lgl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr>
s(bio12) | TPRS | NA | 0.02558828 | 0.04400760 | 152.0000 | NA | NA | NA | NA | outbreak
s(bio12) | TPRS | NA | 0.02484161 | 0.04361090 | 159.3030 | NA | NA | NA | NA | outbreak
s(bio12) | TPRS | NA | 0.02409458 | 0.04323558 | 166.6061 | NA | NA | NA | NA | outbreak
s(bio12) | TPRS | NA | 0.02334638 | 0.04288135 | 173.9091 | NA | NA | NA | NA | outbreak
s(bio12) | TPRS | NA | 0.02259582 | 0.04254728 | 181.2121 | NA | NA | NA | NA | outbreak
s(bio12) | TPRS | NA | 0.02184140 | 0.04223185 | 188.5152 | NA | NA | NA | NA | outbreak

    In [392]:

    p1 <- map_mod_results |>
      filter(.smooth == "s(bio12)") |>
      ggplot(aes(x=bio12)) +
        geom_ribbon(aes(ymin=.estimate - .se, ymax=.estimate + .se,fill=model),alpha=.2) +
        geom_line(aes(y = .estimate ,color=model),size=1) +
        theme_pubr() +
        scale_color_manual(values = c('dark grey','red'))  +
        scale_fill_manual(values = c('dark grey','red')) +
        xlab("mean annual precipitation (mm)") +
        ylab("partial effect")

    p1

    In [393]:

    ggsave(p1,
           file=here('output/publication_figures/spatial_modeling_locust_outbreak_with_map.png'),
           width=5,height=5)

# Section 2 - environmental correlations

This is just a randomly sampled 100k points between the soil and bioclim variables on google earth engine. This extraction code can be found here: `04_environmental_correlations_map_nitrogen_phosphorus_woody_cover.ipynb`

Specifically these correlations:

- soil nitrogen x soil phosphorus
- soil nitrogen x woody veg
- soil nitrogen x MAP
- soil phosphorus x woody veg
- MAP x woody veg

    In [35]:

    # I min-max normalize to get all variables into the same scale for plotting.

    minmax <- function(x, na.rm = TRUE) {
        return((x- min(x)) /(max(x)-min(x)))
    }

    env_dat <- read_csv(here('data/processed/spatial_modeling/environmental_correlation_data.csv'),show_col_types = FALSE) |>
        drop_na() |>
        mutate(mean_nto = minmax((NTO_000_005_EV + NTO_005_015_EV) / 2),
               mean_pto = minmax((PTO_000_005_EV + PTO_005_015_EV) / 2),
               annual_precip = minmax(bio12),
               tree_cover = minmax(tree_canopy_cover)) |>
        select(mean_pto,mean_nto,annual_precip,tree_cover)

    env_dat |> head()

A tibble: 6 × 4
mean_pto | mean_nto | annual_precip | tree_cover
--- | --- | --- | ---
<dbl> | <dbl> | <dbl> | <dbl>
0.04273219 | 0.02194335 | 0.025369979 | 0.00000000
0.04985051 | 0.01683786 | 0.009513742 | 0.00000000
0.06395502 | 0.05476617 | 0.243921776 | 0.13455657
0.09088356 | 0.15876259 | 0.191067653 | 0.06116208
0.07643368 | 0.03755396 | 0.042811839 | 0.03363914
0.10154868 | 0.08073041 | 0.100422833 | 0.05504587

    In [30]:

    nto_pto_graph <- env_dat |>
        #slice_sample(n=10000) |>
        ggplot(aes(x=mean_nto,y=mean_pto)) +
            geom_abline(slope=1,linetype=3,linewidth=1.4) +
            geom_point(pch=21,alpha=0.3) +
            geom_smooth(method='gam',se=FALSE,linewidth=1.4) +
            xlim(0,1) +
            ylim(0,1) +
            theme_pubr() +
            xlab('soil nitrogen') +
            ylab('soil phosphorus')

    nto_woody_graph <- env_dat |>
        #slice_sample(n=10000) |>
        ggplot(aes(x=mean_nto,y=tree_cover)) +
            geom_abline(slope=1,linetype=3,linewidth=1.4) +
            geom_point(pch=21,alpha=0.3) +
            geom_smooth(method='gam',se=FALSE,linewidth=1.4) +
            xlim(0,1) +
            ylim(0,1) +
            theme_pubr() +
            xlab('soil nitrogen') +
            ylab('woody tree cover')

    nto_map_graph <- env_dat |>
        #slice_sample(n=10000) |>
        ggplot(aes(x=mean_nto,y=annual_precip)) +
            geom_abline(slope=1,linetype=3,linewidth=1.4) +
            geom_point(pch=21,alpha=0.3) +
            geom_smooth(method='gam',se=FALSE,linewidth=1.4) +
            xlim(0,1) +
            ylim(0,1) +
            theme_pubr() +
            xlab('soil nitrogen') +
            ylab('annual precipitation')

    pto_woody_graph <- env_dat |>
        #lice_sample(n=10000) |>
        ggplot(aes(x=mean_pto,y=tree_cover)) +
            geom_abline(slope=1,linetype=3,linewidth=1.4) +
            geom_point(pch=21,alpha=0.3) +
            geom_smooth(method='gam',se=FALSE,linewidth=1.4) +
            xlim(0,1) +
            ylim(0,1) +
            theme_pubr() +
            xlab('soil phosphorus') +
            ylab('woody tree cover')

    pto_map_graph <- env_dat |>
        #slice_sample(n=10000) |>
        ggplot(aes(x=mean_pto,y=annual_precip)) +
            geom_abline(slope=1,linetype=3,linewidth=1.4) +
            geom_point(pch=21,alpha=0.3) +
            geom_smooth(method='gam',se=FALSE,linewidth=1.4) +
            xlim(0,1) +
            ylim(0,1) +
            theme_pubr() +
            xlab('soil phosphorus') +
            ylab('annual precipitation')

    In [137]:

    layout <- "
    AB
    CD
    E#
    "
    env_correlation_graph <- nto_pto_graph + nto_woody_graph + nto_map_graph + pto_woody_graph + pto_map_graph +
      plot_layout(design = layout) + plot_annotation(tag_levels = 'a')

    In [138]:

    ggsave(env_correlation_graph,file=here('output/publication_figures/spatial_modeling_environment_correlation_figure.png'),width=10,height=15)

    `geom_smooth()` using formula = 'y ~ s(x, bs = "cs")'
    `geom_smooth()` using formula = 'y ~ s(x, bs = "cs")'
    Warning message:
    “Removed 18 rows containing missing values or values outside the scale range
    (`geom_smooth()`).”
    `geom_smooth()` using formula = 'y ~ s(x, bs = "cs")'
    `geom_smooth()` using formula = 'y ~ s(x, bs = "cs")'
    Warning message:
    “Removed 10 rows containing missing values or values outside the scale range
    (`geom_smooth()`).”
    `geom_smooth()` using formula = 'y ~ s(x, bs = "cs")'

# Section 3 - soil and point map generation

This figure will combine a few figures: - raw point distribution through australia - soil nitrogen map clipped to the locust distribution - soil phosphorus map clipped to the locust distribution

    In [11]:

    aus <- ne_states(country='Australia') |>
        select(name,geometry)

    point_dat <- read_csv(here('data/raw/survey_data/CT.csv'),show_col_types = FALSE) |>
        select(!`...1`) |>
        select(Latitude,Longitude,Species) |>
        st_as_sf(coords = c("Longitude", "Latitude"),
                 crs= "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")

    nto_rast <- rast(here("data/raw/survey_data/apl_nitrogen_raster.tif"))
    pto_rast <- rast(here("data/raw/survey_data/apl_phosphorus_raster.tif"))

    New names:
    • `` -> `...1`

    Warning message:
    /Users/lawton/SideProjects/herbivore_nutrient_interactions/data/raw/survey_data/apl_nitrogen_raster.tif: No such file or directory (GDAL error 4)

    Error:

    ! [rast] file does not exist: /Users/lawton/SideProjects/herbivore_nutrient_interactions/data/raw/survey_data/apl_nitrogen_raster.tif

        ▆

     1. ├─terra::rast(here("data/raw/survey_data/apl_nitrogen_raster.tif"))

     2. └─terra::rast(here("data/raw/survey_data/apl_nitrogen_raster.tif"))

     3.   └─terra (local) .local(x, ...)

     4.     └─terra:::messages(r, "rast")

     5.       └─terra:::error(f, x@pntr$getError())

    In [58]:

    nto_rast

    class       : SpatRaster
    dimensions  : 1139, 2062, 1  (nrow, ncol, nlyr)
    resolution  : 0.01796631, 0.01796631  (x, y)
    extent      : 114.6789, 151.7255, -37.76517, -17.30155  (xmin, xmax, ymin, ymax)
    coord. ref. : lon/lat WGS 84 (EPSG:4326)
    source      : apl_nitrogen_raster.tif
    name        : apl_nitrogen_raster

    In [191]:

    point_map <- ggplot(aus) +
        geom_sf() +
        geom_sf(data=point_dat,size = 0.25) +
        theme_void() # + theme(legend.position="none")

    nto_map <- ggplot(aus) +
        geom_sf(color=NA) +
        geom_spatraster(data = nto_rast, aes(fill = apl_nitrogen_raster))  +
        scale_fill_stepsn(n.breaks = 10,
                          colours = rev(terrain.colors(5)),
                          na.value = "transparent",
                          trans='log',
                          name="soil nitrogen \n(log-scaled)") +
        geom_sf(data = aus,fill=NA) +
        theme_void()  #+ theme(legend.position="none")

    pto_map <-ggplot(aus) +
        geom_sf(color=NA) +
        geom_spatraster(data = pto_rast, aes(fill = apl_phosphorus_raster))  +
        scale_fill_stepsn(breaks= c(0.14,0.10,0.05,0.04,0.02,0.01),
                          colours = viridis::viridis(9),
                          na.value = "transparent",
                          trans='log',
                          name="soil phosphorus \n(log-scaled)") +
        geom_sf(data = aus,fill=NA) +
        theme_void()  #+ theme(legend.position="none")

    <SpatRaster> resampled to 500752 cells.
    <SpatRaster> resampled to 500752 cells.

    In [271]:

    layout2 <- "
    AAAA
    AAAA
    AAAA
    AAAA
    BBCC
    BBCC
    BBCC
    BBCC
    "
    layout <- "
    A#
    BC
    "

    locust_env_maps <- point_map + nto_map + pto_map +
        plot_annotation(tag_levels = 'a') +
        plot_layout(design = layout)

    locust_env_maps

    In [272]:

    asp_ratio <- tmaptools::get_asp_ratio(aus)

    ggsave(locust_env_maps,
           file=here('output/publication_figures/spatial_modeling_locust_env_map.png'),
           width=10*asp_ratio,height=10)

# Section 4 - griding example

I want to show an example gridding of the apl points

    In [8]:

    apl_distribution = st_read(here("data/raw/survey_data/australian_plague_locut_distribution/Australia_Locust_Distribution.shp"))
    apl_distribution

    Error:

    ! Cannot open "/Users/lawton/SideProjects/herbivore_nutrient_interactions/data/raw/survey_data/australian_plague_locut_distribution/Australia_Locust_Distribution.shp"; The file doesn't seem to exist.

        ▆

     1. ├─sf::st_read(here("data/raw/survey_data/australian_plague_locut_distribution/Australia_Locust_Distribution.shp"))

     2. └─sf:::st_read.character(here("data/raw/survey_data/australian_plague_locut_distribution/Australia_Locust_Distribution.shp"))

     3.   └─sf:::CPL_read_ogr(...)

    In [27]:

    # Creating a grid with cells 4000m x 4000m
    grid = st_make_grid(point_dat, cellsize = 1,
                                what ="polygons", square = T)

    overall_grid_map <- ggplot(aus) +
        geom_sf() +
        geom_sf(data=point_dat,size=0.5,alpha=0.6,pch=21) +
        geom_sf(data=grid,fill=NA,color='red') +
        theme_void()  +
      theme(
        plot.background = element_rect(fill = "white", color = NA)  # Set white background
      )

    In [13]:

    grid

    Geometry set for 440 features
    Geometry type: POLYGON
    Dimension:     XY
    Bounding box:  xmin: 131.6556 ymin: -37.71413 xmax: 151.6556 ymax: -15.71413
    Geodetic CRS:  +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
    First 5 geometries:
    POLYGON ((131.6556 -37.71413, 132.6556 -37.7141...
    POLYGON ((132.6556 -37.71413, 133.6556 -37.7141...
    POLYGON ((133.6556 -37.71413, 134.6556 -37.7141...
    POLYGON ((134.6556 -37.71413, 135.6556 -37.7141...
    POLYGON ((135.6556 -37.71413, 136.6556 -37.7141...

    In [14]:

    nsw <- aus |> filter(name == 'New South Wales')

    In [15]:

    zoomed_plot <- ggplot(aus) +
        geom_sf() +
        geom_sf(data=point_dat) +
        geom_sf(data=grid,fill=NA,color='red',linewidth=2) +
        coord_sf(ylim = c(-30, -35), xlim = c(140, 146)) +
        theme_void()

    zoomed_plot

    In [28]:

    overall_grid_map <- overall_grid_map  +
      geom_rect(aes(xmin = 140, xmax = 146, ymin = -35, ymax = -30), color = "white", fill = NA)

    In [29]:

    grid_examples <- zoomed_plot + overall_grid_map
    grid_examples

    Warning message:
    In geom_rect(aes(xmin = 140, xmax = 146, ymin = -35, ymax = -30),  :
      All aesthetics have length 1, but the data has 11 rows.
    ℹ Please consider using `annotate()` or provide this layer with data containing a single row.

    In [30]:

    asp_ratio <- tmaptools::get_asp_ratio(aus)

    ggsave(grid_examples,
           file=here('output/publication_figures/spatial_modeling_grid_example_map.png'),
           width=10*asp_ratio,height=5)

    Warning message:
    In geom_rect(aes(xmin = 140, xmax = 146, ymin = -35, ymax = -30),  :
      All aesthetics have length 1, but the data has 11 rows.
    ℹ Please consider using `annotate()` or provide this layer with data containing a single row.

# Section 5 - table construction

    In [380]:

    outbreak_mod <- readRDS(here("output/spatial_modeling/model_objects/locust_outbreak_model.rds")) |>
        tidy() |>
        mutate(model = 'outbreak')

    nil_mod <- readRDS(here("output/spatial_modeling/model_objects/locust_nil_model.rds")) |>
        tidy()  |>
        mutate(model = 'nil')

    map_outbreak_mod <- readRDS(here("output/spatial_modeling/model_objects/locust_outbreak_map_model.rds"))|>
        tidy()  |>
        mutate(model = 'outbreak')

    map_nil_outbreak_mod <- readRDS(here("output/spatial_modeling/model_objects/locust_nil_map_model.rds"))|>
        tidy()  |>
        mutate(model = 'nil')

    overall_mods <-outbreak_mod |> rbind(nil_mod)

    map_mods <-map_outbreak_mod |> rbind(map_nil_outbreak_mod)

    In [381]:

    write.csv(overall_mods, here("output/spatial_modeling/map_outbreak_model_results.csv"),row.names=FALSE)