File: geometry-methods.Rd

package info (click to toggle)
r-cran-sp 1%3A2.2-0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,856 kB
  • sloc: ansic: 1,091; sh: 14; makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\name{geometry-methods}
\docType{methods}
\alias{geometry}
\alias{geometry-methods}
\alias{geometry,Spatial-method}
\alias{geometry,SpatialPointsDataFrame-method}
\alias{geometry,SpatialMultiPointsDataFrame-method}
\alias{geometry,SpatialGridDataFrame-method}
\alias{geometry,SpatialPixelsDataFrame-method}
\alias{geometry,SpatialLinesDataFrame-method}
\alias{geometry,SpatialPolygonsDataFrame-method}
\alias{geometry<-}
\alias{geometry<-,data.frame,Spatial-method}
\title{ Methods for retrieving the geometry from a composite (geometry + attributes) object }
\usage{ 
geometry(obj) 
geometry(obj) <- value 
}
\arguments{
\item{obj}{in case of assignment, a data.frame, else an object of class Spatial}
\item{value}{object of class Spatial}
}
\description{
geometry retrieves the SpatialXxx object from a SpatialXxxDataFrame object,
with Xxx Lines, Points, Polygons, Grid, or Pixels. geometry<- converts a
data.frame into a Spatial object.
}
\section{Methods}{
\describe{
\item{obj = "Spatial"}{ }
\item{obj = "SpatialPointsDataFrame"}{ }
\item{obj = "SpatialMultiPointsDataFrame"}{ }
\item{obj = "SpatialPolygonsDataFrame"}{ }
\item{obj = "SpatialPixelsDataFrame"}{ }
\item{obj = "SpatialGridDataFrame"}{ }
\item{obj = "SpatialLinesDataFrame"}{ }
}
}
\author{Edzer Pebesma, \email{edzer.pebesma@uni-muenster.de}}
\examples{
data(meuse)
m = meuse
coordinates(m) = meuse[, c("x", "y")]
pts = geometry(m)
class(pts)
geometry(meuse) = pts
class(meuse)
identical(m, meuse) # TRUE
}
\keyword{methods}