Code Monkey home page Code Monkey logo

sf's Introduction

Simple Features for R

Build Status AppVeyor Build Status Coverage Status License CRAN Downloads

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

  • represents natively in R all 17 simple feature types for all dimensions (XY, XYZ, XYM, XYZM)
  • uses S3 classes: simple features are data.frame objects (or tibbles) that have a geometry list-column
  • interfaces to GEOS to support the DE9-IM
  • interfaces to GDAL with driver dependent dataset or layer creation options, Date and DateTime (POSIXct) columns, and coordinate reference system transformations through PROJ.4
  • provides fast I/O with GDAL and GEOS using well-known-binary written in C++/Rcpp
  • directly reads from and writes to spatial databases such as PostGIS using DBI

Blogs, presentations, vignettes

See also:

Installling

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. (This does not include liblwgeom; it will need to be installed separately for functions that require it, such as st_make_valid, to work.)

MacOS

One way to install the dependencies is using sudo; the other is using homebrew. For the latter, see e.g. here. Homebrew commands might be:

brew unlink gdal
brew tap osgeo/osgeo4mac && brew tap --repair
brew install proj
brew install geos
brew install udunits
brew install gdal2 --with-armadillo --with-complete --with-libkml --with-unsupported
brew link --force gdal2

after that, you should be able to install sf as a source package.

According to r-spatial#349, brew install postgis installs a working liblwgeom. In case of problems, search the issues for brew before opening a new one.

For MacOS Sierra, see these instruction, using kyngchaos frameworks.

Linux

For Unix-alikes, GDAL (>= 2.0.0), GEOS (>= 3.3.0) and Proj.4 (>= 4.8.0) are required; liblwgeom is optional.

Ubuntu

To install the dependencies on Ubuntu, either add ubuntugis-unstable to the package repositories:

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

or 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 udunits2-devel

Other

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

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 has been realized with financial support from the

sf's People

Contributors

edzer avatar robinlovelace avatar etiennebr avatar mpadge avatar mdsumner avatar ateucher avatar nowosad avatar karldw avatar jeroen avatar hadley avatar rsbivand avatar yutannihilation avatar bhaskarvk avatar lbusett avatar gergness avatar andycraig avatar noerw avatar loicdtx avatar joshobrien avatar joethorley avatar dpprdan avatar demorenoc avatar rundel avatar cpsievert avatar bbest avatar barryrowlingson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.