Get the aspect ratio of a shape object, a tmap object, or a bounding box
Arguments
- x
A shape from class
sf,stars,sp, orRaster, a bounding box (that can be coerced bybb), or atmapobject.- is.projected
Logical that determined wether the coordinates of
xare projected (TRUE) or longitude latitude coordinates (FALSE). By deafult, it is determined by the coordinates ofx.- width
See details; only applicable if
xis atmapobject.- height
See details; only applicable if
xis atmapobject.- res
See details; only applicable if
xis atmapobject.
Details
The arguments width, height, and res are passed on to png. If x is a tmap object, a temporarily png image is created to calculate the aspect ratio of a tmap object. The default size of this image is 700 by 700 pixels at 100 dpi.