asp2extent: Recalculate extent values from a given aspect ratio

Description Usage Arguments Details

Description

Takes four vectors (xmin, xmax, ymin and ymax) and returns the new values based on a given aspect ratio Aspect ratio is calculated as \frac{Δ y\ }{Δ x\ }. Values > 1 therefore means portrait, values < 1 means landscape.

Usage

1
asp2extent(xmin, xmax, ymin, ymax, asp = 1)

Arguments

xmin, xmax, ymin, ymax

Numeric Vectors of the same length specifying the x/y extents

aps

Aspect ratio calculated as specified in the description. A single numeric value or a vector in the same length as xmin etc.

return

Returns a dataframe with four columns named xmin, xmax, ymin, ymax

Details

At the moment, this function can only enlargen the extent in order to match the aspect ratio. At one point, it might be neccessary to add the option to shrink the extent accordingly.


swissgeodata4r/swissrastermaps4r documentation built on May 31, 2019, 6:44 p.m.