Re: [R] Convert poly line to polygon in R

2017-11-16 Thread MacQueen, Don
In addition to which, the rgeos package may have something. If it's just a single polyline, it may be pretty easy to pull out the coordinates as a two column matrix, append the first row at the end, and rebuild it as a polygon. The readOGR function in the rgdal package is probably a better ch

Re: [R] Convert poly line to polygon in R

2017-11-13 Thread Jeff Newmiller
Might want to post this on R-sig-geo. Might also want to post in plain text format... see below how your message got messed up coming through the mailing list. -- Sent from my phone. Please excuse my brevity. On November 12, 2017 9:58:56 PM PST, Javad Bayat via R-help wrote: >I have a shape f

[R] Convert poly line to polygon in R

2017-11-12 Thread Javad Bayat via R-help
I have a shape file as poly line and I want to convert it to polygon.Is it possible to do that in R?lake <-readShapeLines("./lake_main_utm.shp")proj4string(lake) <- CRS("+proj=utm +zone=39 +datum=WGS84") Sincerely. [[alternative HTML version deleted]] _