Learn R Programming

frheritage (version 0.1.0)

geo_too_large: Check if an sf object exceeds size or extent thresholds

Description

This internal helper evaluates whether a spatial object is too large based on area (for polygons) and bounding box dimensions.

Usage

geo_too_large(
  x,
  area_threshold = 1e+09,
  extent_threshold = 150000,
  verbose = TRUE
)

Value

Invisibly returns FALSE if within limits. Throws an error if thresholds are exceeded.

Arguments

x

An sf object to check.

area_threshold

Numeric. Maximum allowed area in m2 (for polygon geometries). Default is 1e9.

extent_threshold

Numeric. Maximum allowed bounding box width or height in meters. Default is 1.5e5.

verbose

Logical. If TRUE, prints a message when the object is within limits.