Skip to contents

test_date_line() checks whether a given spatial object crosses the international date line (IDL) by examining its longitude extent.

Usage

test_date_line(x)

Arguments

x

A sf, SpatVector, or SpatRaster object to be tested.

Value

A logical flag indicating if the object crosses the international date line.

Examples

# \dontrun{
   library(geodata)

   brazil_shape <- gadm(country = "BRA", level = 0)
   russia_shape <- gadm(country = "RUS", level = 0)

   test_date_line(brazil_shape)
#> [1] FALSE
   test_date_line(russia_shape)
#> [1] TRUE
# }