Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

R package for spatial data handlinghttps://rspatial.github.io/terra/reference/terra-package.html

License

NotificationsYou must be signed in to change notification settings

rspatial/terra

Repository files navigation

logo by Zane Dax

rcmdcheckCRAN statusCRAN RStudio mirror downloadsStackOverflow

terra is anR package for spatial data analysis. There are tutorials atrspatial.org.

Stack Overflow is a good place to ask questions if you get stuck. Make sure to include asimple reproducible example. But if you think you have found a bug, or if you want to request a new feature, please file anissue.

terra replaces theraster package. The interfaces ofterra andraster are similar, butterra is simpler, faster and can do more.

Installation

terra is available from CRAN, so you can useinstall.packages("terra") to get the currentreleased version.

The easiest way to use thedevelopment version on Windows or MacOS, is to install it from theR-universe, like this:

install.packages('terra', repos='https://rspatial.r-universe.dev')

From source-code

To install from source-code, first install theRcpp package that terra depends on:

install.packages("Rcpp")

And then continue based on the OS you are using.

Windows

On Windows, you need to first installRtools to get, among other things, a C++ compiler thatR can use. You need the current versions ofR andRTools.

Then, inR, install terra with:

remotes::install_github("rspatial/terra")

macOS

On macOS, you can useMacPorts orHomebrew.

With MacPorts you can do

sudo port install R-terra

With Homebrew, you need to first install GDAL and PROJ:

brew install pkg-configbrew install gdal proj

Followed by (note the additional configuration argument needed for Homebrew)

remotes::install_github("rspatial/terra", configure.args = "--with-proj-lib=$(brew --prefix)/lib/")

To install the CRAN version from source you would do

install.packages("terra", type = "source", configure.args = "--with-proj-lib=$(brew --prefix)/lib/")

Linux

Theeasy way to install terra on Ubuntu is withr2u.

The harder way:

Install the system requirements GDAL (>= 2.2.3), GEOS (>= 3.4.0), PROJ (>= 4.9.3), netcdf (>=4.1.3), sqlite3, tbb

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstablesudo apt-get updatesudo apt-get install libgdal-dev libgeos-dev libproj-dev libtbb-dev libnetcdf-dev

And now, in R, install the package

remotes::install_github("rspatial/terra")

See thesfinstructions for installation on other linux systems --- and for possible updates/improvements on the above instructions.

Packages

No packages published

Contributors47

Languages


[8]ページ先頭

©2009-2025 Movatter.jp