All Projects → r-spatial → Sf

r-spatial / Sf

Licence: other
Simple Features for R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Sf

GeoArrays.jl
Simple geographical raster interaction built on top of ArchGDAL, GDAL and CoordinateTransformations
Stars: ✭ 42 (-94.92%)
Mutual labels:  spatial, gdal
Tmap
R package for thematic maps
Stars: ✭ 505 (-38.86%)
Mutual labels:  spatial
gdal-js
This is an Emscripten port of GDAL, an open source X/MIT licensed translator library for raster and vector geospatial data formats.
Stars: ✭ 81 (-90.19%)
Mutual labels:  gdal
Pyrosar
framework for large-scale SAR satellite data processing
Stars: ✭ 274 (-66.83%)
Mutual labels:  gdal
openfluid
OpenFLUID framework and applications
Stars: ✭ 19 (-97.7%)
Mutual labels:  gdal
Stplanr
Sustainable transport planning with R
Stars: ✭ 352 (-57.38%)
Mutual labels:  spatial
GIBS-Downloader
GIBS Downloader is a command-line tool which facilitates the downloading of NASA satellite imagery and offers different functionalities in order to prepare the images for training in a machine learning pipeline.
Stars: ✭ 26 (-96.85%)
Mutual labels:  gdal
Mapserver
Source code of the MapServer project. Please submit pull requests to the 'main' branch.
Stars: ✭ 693 (-16.1%)
Mutual labels:  gdal
Koop
🔮 Transform, query, and download geospatial data on the web.
Stars: ✭ 505 (-38.86%)
Mutual labels:  spatial
XArrayAndRasterio
Experimental code for loading/saving XArray DataArrays to Geographic Rasters using rasterio
Stars: ✭ 21 (-97.46%)
Mutual labels:  gdal
pyMeteo
用Python处理我遇到的气象数据
Stars: ✭ 94 (-88.62%)
Mutual labels:  gdal
natural-earth-geojson
Natural Earth data in GeoJSON
Stars: ✭ 44 (-94.67%)
Mutual labels:  gdal
Stars
Spatiotemporal Arrays, Raster and Vector Data Cubes
Stars: ✭ 363 (-56.05%)
Mutual labels:  spatial
recmap
Draw your own Rectangular Statistical Cartogram - CRAN package
Stars: ✭ 18 (-97.82%)
Mutual labels:  spatial
Laravel Mysql Spatial
MySQL Spatial Data Extension integration with Laravel.
Stars: ✭ 578 (-30.02%)
Mutual labels:  spatial
st-hadoop
ST-Hadoop is an open-source MapReduce extension of Hadoop designed specially to analyze your spatio-temporal data efficiently
Stars: ✭ 17 (-97.94%)
Mutual labels:  spatial
spDataLarge
R package with large datasets for spatial analysis
Stars: ✭ 19 (-97.7%)
Mutual labels:  spatial
Datacube Core
Open Data Cube analyses continental scale Earth Observation data through time
Stars: ✭ 285 (-65.5%)
Mutual labels:  gdal
Fiona
Fiona reads and writes geographic data files
Stars: ✭ 787 (-4.72%)
Mutual labels:  gdal
Leaflet
R Interface to Leaflet Maps
Stars: ✭ 667 (-19.25%)
Mutual labels:  spatial

tic tic-db Coverage Status License CRAN cran checks Downloads status

Simple Features for R

A package that provides simple features access for R. Package sf:

  • represents simple features as records in a data.frame or tibble with a geometry list-column
  • represents natively in R all 17 simple feature types for all dimensions (XY, XYZ, XYM, XYZM)
  • interfaces to GEOS to support geometrical operations including the DE9-IM
  • interfaces to GDAL, supporting all driver options, Date and POSIXct and list-columns
  • interfaces to PRØJ for coordinate reference system conversions and transformations
  • uses well-known-binary serialisations written in C++/Rcpp for fast I/O with GDAL and GEOS
  • reads from and writes to spatial databases such as PostGIS using DBI
  • is extended by pkg lwgeom for further liblwgeom/PostGIS functions, including some spherical geometry functions

(Illustration (c) by Allison Horst)

Blogs, presentations, vignettes, sp-sf wiki

Cheatsheet

CC 4.0 BY Ryan Garnett

Installing

Install either from CRAN with:

install.packages("sf")

this will install binary packages on Windows and MacOS, unless you configured R such that it tries to install source packages; in that case, see below.

Install development versions from github with

library(devtools)
install_github("r-spatial/sf")

Windows

Installing sf from source works under windows when Rtools is installed. This downloads the system requirements from rwinlib.

MacOS

The easiest way to install gdal is using Homebrew. Recent versions of homebrew include a full-featured up-to-date gdal formula, which installs proj and gdal at the same time:

brew install pkg-config
brew install gdal

Once gdal is installed, you will be able to install sf package from source in R. With the current version of proj (7.0.0) on homebrew, installation requires additional configuration:

install.packages("sf", configure.args = "--with-proj-lib=/usr/local/lib/")

Or the development version:

library(devtools)
install_github("r-spatial/sf", configure.args = "--with-proj-lib=/usr/local/lib/")

If you are using sf and rgdal together it is necessary to install rgdal from source using this configuration:

install.packages("rgdal", configure.args = c("--with-proj-lib=/usr/local/lib/", "--with-proj-include=/usr/local/include/"))

Alternatively these instructions explain how to install gdal using kyngchaos frameworks.

For Mac OS 11 Big Sur source install instruction see here

Linux

For Unix-alikes, GDAL (>= 2.0.1), GEOS (>= 3.4.0) and Proj.4 (>= 4.8.0) are required.

Ubuntu

Dependencies for recent versions of Ubuntu (18.04 and later) are available in the official repositories; you can install them with:

apt-get -y update && apt-get install -y  libudunits2-dev libgdal-dev libgeos-dev libproj-dev

However, to get more up-to-date versions of dependencies such as GDAL, we recommend adding the ubuntugis-unstable PPA to the package repositories and installing them as follows:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev 

Adding this PPA is required for installing sf on older versions of Ubuntu (e.g. Xenial).

Another option, for advanced users, is to install dependencies from source; see e.g. an older travis config file for hints.

Fedora

The following command installs all required dependencies:

sudo dnf install gdal-devel proj-devel proj-epsg proj-nad geos-devel sqlite-devel udunits2-devel

Arch

Get gdal, proj and geos from the main repos and udunits from the AUR:

pacman -S gdal proj geos
yay/pacaur/yaourt/whatever -S udunits

Other

To install on Debian, the rocker geospatial Dockerfiles may be helpful. Ubuntu Dockerfiles are found here.

Multiple GDAL, GEOS and/or PROJ versions on your system

In case you use dynamic linking (installation from source) and have multiple versions of these libraries installed (e.g. one from ubuntugis-unstable, another installed from source in /usr/local/lib) then this will in general not work, even when setting LD_LIBRARY_PATH manually. See here for the reason why.

lwgeom

Functions and methods that require liblwgeom, including st_make_valid and all spherical or ellipsoidal metrics (area, distances), have since sf 0.5-5 been moved to their own package, lwgeom, which is also on CRAN.

Contributing

  • Contributions of all sorts are most welcome, issues and pull requests are the preferred ways of sharing them.
  • When contributing pull requests, please adhere to the package style (in package code use = rather than <-; don't change indentation; tab stops of 4 spaces are preferred)
  • This project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Acknowledgment

This project gratefully acknowledges financial support from the

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].