Reproject polygons with wrapping
Reprojects a SpatialPolygons object to a projection with longitude wrapping other than 180 degreess
wrapPoly(x,crs, buffer.width = 100*1000) llCropBox(crs, buffer.width=50*1000, densify.interval = 25*1000, crop.distance = 2.1e7, crop.poles = FALSE, crop.leftright=FALSE, remove.holes=TRUE, cycles = 2, ellipse=NULL)
x
: A Spatial objectcrs
: Caracther string representing a crs
.buffer.width
: buffer to add to points on border when cropping poloygons, defaults to 100kmdensify.interval
: interval when densifyingcrop.distance
: crop coordinates larger than this valuecrop.poles
: remove areas near the polescrop.leftright
: remove points near 180 longitute lineremove.holes
: fill holes in the crop regioncycles
: iterations adding denser pointsellipse
: boundary of the world in crs coordinatesA reprojected Spatial object.
project
, examples in tpeqd
Useful links