map2list {GeoXp}R Documentation

Extract from a 'Map' object the middle coordinates of boundary box and the vertices of the polygons (in the case where polygons are given)

Description

The function `map2list' calculates the middle coordinates of boundary box and in the case where polygons are included into the `Map' object, it extracts the vertices of the polygons, seperating polygons from each other by 3 rows of NaN.

Usage

map2list(data)

Arguments

data A `Map' object

Details

The user can then represent the coordinates of sites of a `Map' 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 `Map' object can be directly extract using $att.data

Author(s)

Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.

References

Bivand R. (2006), `The maptools package', http://cran.r-project.org/doc/packages/maptools.pdf.

See Also

polylist2list,spdf2list

Examples

#x <- read.shape(system.file("shapes/columbus.shp", package="maptools")[1])
#colombus.contours<-map2list(x)
#colombus<-x$att.data

[Package GeoXp version 1.0 Index]