sp2WB

0th

Percentile

Export SpatialPolygons object as S-Plus map for WinBUGS

The function exports an sp SpatialPolygons object into a S-Plus map format to be import by WinBUGS.

Keywords
spatial
Usage
sp2WB(map, filename, Xscale = 1, Yscale = Xscale, plotorder = FALSE)
Arguments
map
a SpatialPolygons object
filename
file where output is written
Xscale, Yscale
scales to be written in the output file
plotorder
default=FALSE, if TRUE, export polygons in plotting order
encoding

latin1

References

http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/geobugs12manual.pdf

Aliases
  • sp2WB
Examples
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
plot(xx, border="blue", axes=TRUE, las=1)
sp2WB(as(xx, "SpatialPolygons"), filename="NC.map")
x <- readAsciiGrid(system.file("grids/test.ag", package="maptools")[1])
xp <- as(x, "SpatialPixelsDataFrame")
pp <- as.SpatialPolygons.SpatialPixels(xp)
sp2WB(pp, filename="test.map")
Documentation reproduced from package maptools, version 0.7-3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.