Hi Jonathan, You can do this as follows:
x <- yourSpatialPolygons xl <- as(x, "SpatialLines") e.g. library(maptools) library(rgdal) nc <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], proj4string=CRS("+proj=longlat +datum=NAD27")) quartz() plot(nc[1, ], col = "blue") nc1l <- as(nc[1, ], "SpatialLines") plot(nc1l, col = "blue") Cheers, Lyndon On Tue, Aug 9, 2011 at 6:51 PM, Jonathan Greenberg <greenb...@ucdavis.edu> wrote: > R-sig-geo'ers: > > Is there a quick way to create a line object from a polygon object > (representing the boundary)? > > --j > > -- > Jonathan A. Greenberg, PhD > Assistant Project Scientist > Center for Spatial Technologies and Remote Sensing (CSTARS) > Department of Land, Air and Water Resources > University of California, Davis > One Shields Avenue > Davis, CA 95616 > Phone: 415-763-5476 > AIM: jgrn307, MSN: jgrn...@hotmail.com, Gchat: jgrn307 > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo