[R-sig-Geo] Polygons VS MultiLineString

Michael Sumner mdsumner at gmail.com
Wed Mar 4 09:10:56 CET 2015


Try gPolygonize from rgeos, but it *really* depends on whether your lines
close cleanly.

On Wed, 4 Mar 2015 18:38 Antonio Rodriges <antonio.rrz at gmail.com> wrote:

> 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")
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list