Skip to contents

Return a new polygon layer with water removed. The input object and its area_km2 field are unchanged; land_area_km2 describes the new geometry. Land area is not inhabited area. Water source/resolution affects this cartographic operation and any land-only density interpretation.

Usage

mn_erase_water(x, water = NULL, min_area_km2 = 0)

Arguments

x

An sf polygon object.

water

An sf polygon water layer, defaulting to mn_lakes().

min_area_km2

Ignore water polygons smaller than this area.

Value

An sf object with land_area_km2, preserving one row per input unit, including empty geometry for entirely water-covered units.

Examples

land <- mn_erase_water(mn_aimags())
head(land$land_area_km2)
#> [1]   4736.117 122836.781  82321.392  80742.444  73986.515   5539.957