Skip to contents

Split polygons into two if crossing the dateline (antimeridian)

Usage

antimeridian_wrapping(
  polygon_data,
  crs = 4326,
  unique_inst = TRUE,
  to_sp = TRUE
)

Arguments

polygon_data

SpatialPolygon or SpatialPolygonDataFrame object

crs

CRS as a proj4string or EPSG code, default EPSG:4326 (datum=WGS84)

unique_inst

Option to remove duplicate polygons (with the same coordinates), default TRUE

to_sp

Option to convert POLYGON object into SpatialPolygon*, default TRUE

Value

SpatialPolygon or SpatialPolygonDataFrame split along the antimeridian