Iso rectangles are axis aligned rectangles mimicking bounding boxes but given by exact numerics (bounding boxes are defined by floats because not all geometries have exact defined extent). Internally they are stored as two points giving the bottom-left and top-right corner of the rectangle. Iso rectangles are considered degenerate all its vertices are colinear.
iso_rect(...) is_iso_rect(x) as_iso_rect(x)
Various input. See the Constructor section.
A vector of iso rectangles or an object to convert to it
2 dimensional iso rectangles
Providing a bbox will create iso rectangles matching the bbox
Providing two points will create iso rectangles with the points as diagonal opposite vertices
Providing 4 numeric will construct iso rectangles with the given extent, with the numerics being interpreted in the following order: left, bottom, right, top
#> <2D euclid_iso_rects > #>  [<x:2, y:5>, <x:8, y:5>, <x:8, y:7>, <x:2, y:7>]plot(r)euclid_plot(p, pch = 16)r <- iso_rect(4, 10, 7, 16) plot(r, bg = "grey", fg = NA)abline(v = 4, lty = 2)abline(v = 7, lty = 2)abline(h = 10, lty = 2)abline(h = 16, lty = 2)#> <2D euclid_iso_rects > #>  [<x:1.39, y:5.39>, <x:8.61, y:5.39>, <x:8.61, y:12.6>, <x:1.39, y:12.6>]