sp2Mondrian: write map data for Mondrian

Description Usage Arguments Note Author(s) References Examples

View source: R/sp2Mondrian.R

Description

The function outputs a SpatialPolygonsDataFrame object to be used by Mondrian

Usage

1
sp2Mondrian(SP, file, new_format=TRUE)

Arguments

SP

a SpatialPolygonsDataFrame object

file

file where output is written

new_format

default TRUE, creates a text data file and a separate map file; the old format put both data sets in a single file - the map file is named by inserting "MAP\_" into the file= argument after the rightmost directory separator (if any)

Note

At this release, the function writes out a text file with both data and polygon(s) identified as belonging to each row of data.

Author(s)

Patrick Hausmann and Roger Bivand

References

http://www.theusrus.de/Mondrian/

Examples

1
2
3
4
5
6
7
8
## Not run: 
td <- tempdir()
xx <- readShapePoly(system.file("shapes/columbus.shp", package="maptools")[1])
sp2Mondrian(xx, file=file.path(td, "columbus1.txt"))
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1])
sp2Mondrian(xx, file=file.path(td, "sids1.txt"))

## End(Not run)

maptools documentation built on Sept. 7, 2021, 5:09 p.m.