Learn R Programming

sp (version 2.2-3)

Classes and Methods for Spatial Data

Description

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. From this version, 'rgdal', 'maptools', and 'rgeos' are no longer used at all, see for details.

Copy Link

Version

Install

install.packages('sp')

Monthly Downloads

237,160

Version

2.2-3

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Edzer Pebesma

Last Published

July 19th, 2026

Functions in sp (2.2-3)

SpatialPixels-class

Class "SpatialPixels"
as.SpatialPolygons.GridTopology

Make SpatialPolygons object from GridTopology object
char2dms

Convert character vector to DMS-class object
coordinates

set spatial coordinates to create a Spatial object, or retrieve spatial coordinates from a Spatial object
SpatialMultiPoints

create objects of class SpatialMultiPoints or SpatialMultiPointsDataFrame
Spatial-class

Class "Spatial"
compassRose

Display a compass rose.
SpatialMultiPointsDataFrame-class

Class "SpatialMultiPointsDataFrame"
coordinates-methods

retrieve (or set) spatial coordinates
addAttrToGeom-methods

constructs SpatialXxxDataFrame from geometry and attributes
aggregate

aggregation of spatial objects
SpatialPoints

create objects of class SpatialPoints or SpatialPointsDataFrame
SpatialPoints-class

Class "SpatialPoints"
SpatialPixelsDataFrame-class

Class "SpatialPixelsDataFrame"
loadMeuse

deprecated function to load the Meuse data set
flip

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

Methods for Function elide in Package `maptools'
read.asciigrid

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

Calculate aspect ratio for plotting geographic maps; create nice degree axis labels
as.SpatialPolygons.PolygonsList

Making SpatialPolygons objects
SpatialPolygonsDataFrame-class

Class "SpatialPolygonsDataFrame"
bbox-methods

retrieve bbox from spatial data
point.in.polygon

do point(s) fall in a given polygon?
recenter-methods

Methods for Function recenter in Package `sp'
meuse.grid_ll

Prediction Grid for Meuse Data Set, geographical coordinates
SpatialPointsDataFrame-class

Class "SpatialPointsDataFrame"
panel.spplot

panel and panel utility functions for spplot
SpatialPolygons

create objects of class SpatialPolygons or SpatialPolygonsDataFrame
meuse.grid

Prediction Grid for Meuse Data Set
degAxis

axis with degrees
dimensions-methods

retrieve spatial dimensions from spatial data
coordnames-methods

retrieve or assign coordinate names for classes in sp
disaggregate-methods

disaggregate SpatialLines, SpatialLinesDataFrame, SpatialPolygons, or SpatialPolygonsDataFrame objects
merge

Merge a Spatial* object having attributes with a data.frame
polygons-methods

Retrieve polygons from SpatialPolygonsDataFrame object
gridIndex2nb

create neighbourhood (nb) object from grid geometry
gridlines

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

Create a bubble plot of spatial data
bpy.colors

blue-pink-yellow color scheme, which also prints well on black/white printers
geometry-methods

Methods for retrieving the geometry from a composite (geometry + attributes) object
select.spatial

select points spatially
SpatialPolygons-class

Class "SpatialPolygons"
spDistsN1

Euclidean or Great Circle distance between points
polygons

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

find point pairs with equal spatial coordinates
surfaceArea

Compute surface area of a digital elevation model.
spChFIDs-methods

change feature IDs in spatial objects
sp-deprecated

Deprecated functions in sp
meuse

Meuse river data set
gridded-methods

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

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

Image or contour method for gridded spatial data; convert to and from image data structure
sp2Mondrian

write map data for Mondrian
spsample

sample point locations in (or on) a spatial object
meuse.riv

River Meuse outline
is.projected

Sets or retrieves projection attributes on classes extending SpatialData
over-methods

consistent spatial overlay for points, grids and polygons
spplot

Plot methods for spatial data with attributes
spTransform

spTransform for map projection and datum transformation
sp

A package providing classes and methods for spatial data: points, lines, polygons and grids
Polygon-class

Class "Polygon"
SpatialGrid-class

Class "SpatialGrid"
Line

create objects of class Line or Lines
Rlogo

Rlogo jpeg image
SpatialMultiPoints-class

Class "SpatialMultiPoints"
SpatialLines

create objects of class SpatialLines or SpatialLinesDataFrame
GridsDatums

Grids and Datums PE&RS listing
Polygons-class

Class "Polygons"
SpatialLinesDataFrame-class

a class for spatial lines with attributes
SpatialGridDataFrame-class

Class "SpatialGridDataFrame"
SpatialLines-class

a class for spatial lines
SpatialPixelsDataFrame

define spatial grid with attribute data
CRS-class

Class "CRS" of coordinate reference system arguments
GridTopology-class

Class "GridTopology"
Lines-class

Class "Lines"
SpatialPixels

define spatial grid
Line-class

Class "Line"
DMS-class

Class "DMS" for degree, minute, decimal second values