clip_area: Clip an area to a portion of the whole area

View source: R/clip_area.R

clip_areaR Documentation

Clip an area to a portion of the whole area

Description

[Deprecated]

This function is deprecated because the functionality has been incorporated into the improved sfext::st_clip() function which uses a similar set of parameters.

Clip based on the corner of the bounding box. Used for the street name location option within layer_area_streets

Usage

clip_area(
  area,
  clip = c("top", "right", "bottom", "left", "topright", "bottomright", "bottomleft",
    "topleft"),
  flip = FALSE,
  edge = TRUE,
  edge_dist = 5
)

Arguments

area

sf object to clip

clip

Character string describing the part of the area to clip or remove. Options include c("top", "right", "bottom", "left", "topright", "bottomright", "bottomleft", "topleft"). If NULL, the area is not clipped and a full edge can be returned.

flip

Logical. Default FALSE. If TRUE, the reverse of the select area is removed, e.g. if clip is "topright" the "bottomleft" area is removed instead.

edge

Logical. Default TRUE. If TRUE, only the edge of the clipped area is returned. If TRUE with a negative edge_dist, only the edges are kept (center is removed). If TRUE with a positive edge_dist, the full area is removed and a buffer kept. If FALSE, the full clipped area is returned.

edge_dist

Numeric. Distance in meters to use for the edge. Default 5 meters. Use negative values for an inside edge or positive numbers for an outside edge.

Value

sf object clipped based on parameters


elipousson/mapbaltimore documentation built on Nov. 11, 2024, 8:25 p.m.