spdf2list: Extract from a SpatialPolygonsDataFrame object the middle...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

The function spdf2list() calculates the middle coordinates of boundary box and in the case where polygons are included into a SpatialPolygonsDataFrame object, it extracts the vertices of the polygons, seperating polygons from each other by 3 rows of NaN.

Usage

1

Arguments

data

A SpatialPolygonsDataFrame object

Details

The user can then represent the coordinates of sites of a SpatialPolygonsDataFrame object as background map, using the option ‘carte’ included in all interactive functions.

Value

It returns two vectors of middle coordinates for x-axis and y-axis cooresponding to middle of each boundary box. It returns a matrix of numeric values with 2 columns (x and y coordinates of the vertices of the polygons) where polygons are seperated from each other by 3 rows of NaN.

Note

The data of a SpatialPolygonsDataFrame object can be directly extract using @data

Author(s)

Thibault Laurent

References

Thibault Laurent, Anne Ruiz-Gazen, Christine Thomas-Agnan (2012), GeoXp: An R Package for Exploratory Spatial Data Analysis. Journal of Statistical Software, 47(2), 1-23.

Roger S.Bivand, Edzer J.Pebesma, Virgilio Gomez-Rubio (2009), Applied Spatial Data Analysis with R, Springer.

See Also

polylist2list

Examples

1
2
3
require("maptools")
africa <- readShapePoly(system.file("shapes/Africa.shp", package = "GeoXp")[1])
africa.contour<-spdf2list(africa)$poly

GeoXp documentation built on May 29, 2017, 11:25 a.m.