to_wkt: To WKT

View source: R/to_wkt.R

to_wktR Documentation

To WKT

Description

To WKT

Usage

to_wkt(x, recursive = FALSE)

Arguments

x

An object of class axewkt or SpatialPolygons

recursive

(logical) Whether to recursively drill down and split all polygons that would result in MULTIPOLYGON into single POLYGON objects

Examples

library("rgeos")
wkt <- "POLYGON((-180 -20, -140 55, 10 0, -140 -60, -180 -20))"
poly <- readWKT(wkt)
polys <- chop(x = poly)
to_wkt(polys)
to_wkt(polys)[[2]]

to_wkt(polys, recursive = FALSE)
to_wkt(polys, recursive = TRUE)

ropenscilabs/geoaxe documentation built on May 18, 2022, 7:38 p.m.