[R-sig-Geo] coerce SpatialPolygonsDataFrame to SpatialLinesDataFrame for plotKML
Anthony Fischbach
afischbach at usgs.gov
Thu Sep 20 17:53:00 CEST 2012
Thank you Ross,
To complete the conversion from SpatialPolygonsDataFrame to
SpatialLinesDataFrame
I add the following lines to my toy example.
#########################################################
## Extract lines from SpatialPolygonsDataFrame
sl<-as(ver, "SpatialLines")
## convert SpatialLines to SpatialLinesDataFrame,
## appending the original data.frame from the
SpatialPolygonsDataFrame
spLdf<-SpatialLinesDataFrame(sl, data=ver at data, match.ID = TRUE)
#########################################################
-----
Tony Fischbach, Wildlife Biologist
Walrus Research Program
Alaska Science Center
U.S. Geological Survey
4210 University Drive
Anchorage, AK 99508-4650
AFischbach at usgs.gov
http://alaska.usgs.gov/science/biology/walrus
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/coerce-SpatialPolygonsDataFrame-to-SpatialLinesDataFrame-for-plotKML-tp7580986p7580998.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list