sp
into a simple list that can be used by map().
SpatialPolygons2map(database, namefield=NULL)
SpatialLines2map(database, namefield=NULL)
SpatialPolygons
or SpatialLines
object.database
to be used for naming the polygons (or lines). If it is a vector of names, these are all used and separated by a colon ':'. Not case sensitive. So if the database contains columns that only differ by case, you get a warning and namefield is not used at all.x, y, names, range
, similar to the return value of map()
. This data can be used as a database for map()
. The lines and polygons are separated by NA.The option namefield
is only taken into account if database
is class Spatial[]DataFrame
. namefield
may be a vector of column names, e.g. to get polygons named as 'country:state'.
map
,SpatialPolygons
(in the sp
library),
readShapePoly
(in the maptools
library)