[R-sig-Geo] spplot -> sp.layout -> sp.text - only one "text" at the same time?

Ingo Holz Ingo.Holz at uni-hohenheim.de
Sun Nov 11 10:50:33 CET 2007


Hi,

 I am using spplot() and want to label points in the produced map by using 
sp.layout.

 SPolyDF = a SpatialPolygonsDataFrame
 SPointsDF = a SpatialPointsDataFrame

 Something like this:

 l1 <- list("sp.text", coordinates(SPointsDF[,1]), SPointsDF[["Name"]][1])
 spplot(SPolyDF[, "Name"], sp.layout = list(l1))

 This works fine for one point. It seems it is only possible to label one point 
at the same time, but not to do something like this:

 l1 <- list("sp.text", coordinates(SPointsDF), SPointsDF[["Name"]])
 spplot(SPolyDF[, "Name"], sp.layout = list(l1))

 Is there a way to label all points of the SpatialPointsDataFrame at the same 
time? Is it possible with sp.points?

Thanks, Ingo




More information about the R-sig-Geo mailing list