[R-sig-Geo] Polygons VS MultiLineString

Antonio Rodriges antonio.rrz at gmail.com
Wed Mar 4 08:37:43 CET 2015


Hello,

I use "rasterToContour" to derive isolines for raster. After that I
save them as GeoJSON (or ESRI Shapefile). However, it saves contours
as "MultiLineString"

Is it possible to save "contours" as "Polygons"?

Code:

to_c - is a raster
contours <- rasterToContour(to_c, levels = c(18, 33))
writeOGR(contours, "file.js", layer="", driver="GeoJSON")



More information about the R-sig-Geo mailing list