Skip to contents

Removes Brazilian islands that are approximately more than 20 km from the mainland coast. This is useful when analyses or data visualization should focus on the continental territory of Brazil and exclude distant oceanic islands.

Usage

remove_islands(x)

Arguments

x

An 'sf' object with CRS EPSG:4674. Usually an object returned from other geobr functions, such as read_country(), read_states(), read_municipality(), or similar functions.

Value

An sf data frame with the same attributes as x, but with distant islands removed from the geometry.

Examples

library(geobr)
library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE

br <- read_country(year = 1991)
#>  Using year/date 1991

br_no_islands <- remove_islands(br)

plot(br)