Learn R Programming

⚠️There's a newer version (2.2-0) of this package.Take me there.

sp (version 0.9-9)

classes and methods for spatial data

Description

A package that provides classes and methods for spatial data. The classes document where the spatial location information resides, for 2D or 3D data. Utility functions are provided, e.g. for plotting data as maps, spatial selection, as well as methods for retrieving coordinates, for subsetting, print, summary, etc.

Copy Link

Version

Install

install.packages('sp')

Monthly Downloads

187,279

Version

0.9-9

License

GPL version 2 or later

Maintainer

Edzer Pebesma

Last Published

February 1st, 2025

Functions in sp (0.9-9)

SpatialGrid-class

Class "SpatialGrid" ~~~
SpatialLinesDataFrame-class

a class for spatial lines with attributes
Spatial-class

Class "Spatial"
sp

A package providing classes and methods for spatial data: points, lines, polygons and grids
as.SpatialPolygons.GridTopology

Make SpatialPolygons object from GridTopology object
SpatialGridDataFrame-class

Class "SpatialGridDataFrame"
gridlines

Create N-S and E-W grid lines over a geographic region
SpatialPoints

create objects of class SpatialPoints or SpatialPointsDataFrame
polygons-methods

Retrieve polygons from SpatialPolygonsDataFrame object
overlay-methods

Methods for spatially overlay-ing points (grids) and polygons layers
GridTopology-class

Class "GridTopology" ~~~
Line-class

Class "Line"
spsample

sample point locations in (or on) a spatial object
gridded-methods

specify spatial data as being gridded, or find out whether they are
SpatialLines

create objects of class SpatialLines or SpatialLinesDataFrame
DMS-class

Class "DMS" for degree, minute, decimal second values
Lines-class

Class "Lines"
coordnames-methods

retrieve or assign coordinate names for classes in sp
select.spatial

select points spatially
addAttrToGeom-methods

constructs SpatialXxxDataFrame from geometry and attributes
bbox-methods

retrieve bbox from spatial data
as.SpatialPolygons.PolygonsList

Making SpatialPolygons objects
SpatialPolygons

create objects of class SpatialPolygons or SpatialPolygonsDataFrame
meuse

Meuse river data set
SpatialPixels

define spatial grid
coordinates-methods

retrieve (or set) spatial coordinates
SpatialPixelsDataFrame-class

Class "SpatialPixelsDataFrame" ~~~
Polygon-class

Class "Polygon"
read.asciigrid

read/write to/from (ESRI) asciigrid format
zerodist

find point pairs with equal spatial coordinates
overlay

spatial overlay for points, grids and polygons
CRS-class

Class "CRS" of coordinate reference system arguments
spplot

Plot methods for spatial data with attributes
bpy.colors

blue-pink-yellow color scheme that prints well on black/white printers
SpatialPolygons-class

Class "SpatialPolygons"
dimensions-methods

retrieve spatial dimensions from spatial data
char2dms

Convert character vector to DMS-class object
panel.spplot

panel and panel utility functions for spplot
meuse.grid

Prediction Grid for Meuse Data Set
Rlogo

Rlogo jpeg image
polygons

sets spatial coordinates to create spatial data, or retrieves spatial coordinates
SpatialPixels-class

Class "SpatialPixels" ~~~
SpatialPixelsDataFrame

define spatial grid with attribute data
stack

rearrange data in SpatialPointsDataFrame or SpatialGridDataFrame for plotting with spplot (levelplot/xyplot wrapper)
mapasp

Calculate aspect ratio for plotting geographic maps
degAxis

axis with degrees
meuse.grid_ll

Prediction Grid for Meuse Data Set, geographical coordinates
Line

create objects of class Line or Lines
SpatialPoints-class

Class "SpatialPoints" ~~~
Polygons-class

Class "Polygons"
SpatialPointsDataFrame-class

Class "SpatialPointsDataFrame"
geometry-methods

Methods for retrieving the geometry from a composite (geometry + attributes) object
SpatialPolygonsDataFrame-class

Class "SpatialPolygonsDataFrame"
point.in.polygon

do point(s) fall in a given polygon?
bubble

Create a bubble plot of spatial data
spDistsN1

Euclidean or Great Circle distance between points
compassRose

Display a compass rose.
coordinates

sets spatial coordinates to create spatial data, or retrieves spatial coordinates
nowrapSpatialLines

Split SpatialLines components at offset
meuse.riv

River Meuse outline
spChFIDs-methods

change feature IDs in spatial objects
is.projected

Sets or retrieves projection attributes on classes extending SpatialData
SpatialLines-class

a class for spatial lines
surfaceArea

Compute surface area of a digital elevation model.
loadMeuse

load the Meuse data set
over-methods

consistent spatial overlay for points, grids and polygons
flip

rearrange data in SpatialPointsDataFrame or SpatialGridDataFrame for plotting with spplot (levelplot/xyplot wrapper)
image.SpatialGridDataFrame

image gridded spatial data, or convert to format for image
recenter-methods

Methods for Function recenter in Package `sp'
gridIndex2nb

create neighbourhood (nb) object from grid geometry