Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qbbox

computes bounding box


Description

The function qbbox computes a bounding box for the given lat,lon

points with a few additional options such as quantile boxes, additional margins, etc.

Usage

qbbox(lat, lon, TYPE = c("all", "quantile")[1], margin = list(m = c(1, 


    1, 1, 1), TYPE = c("perc", "abs")[1]), q.lat = c(0.1, 


    0.9), q.lon = c(0.1, 0.9), verbose = 0)

Arguments

lat

latitude values

lon

longitude values

TYPE
margin

relative or absolute margin around the data. Set to NULL if no margin desired.

q.lat

latitude quantile trimming, the tails will be trimmed from the bounding box

q.lon

longitude quantile trimming,

verbose

Value

latR

latitude range

lonR

longitude range

Author(s)

Markus Loecher

Examples

lat = 37.85 + rnorm(100, sd=0.001);


lon = -120.47 + rnorm(100, sd=0.001);


#add a few outliers:


lat[1:5] <- lat[1:5] + rnorm(5, sd =.01);


lon[1:5] <- lon[1:5] + rnorm(5, sd =.01);





#range, discarding the upper and lower 10% of the data


qbbox(lat, lon, TYPE = "quantile");


#full range:


qbbox(lat, lon, TYPE = "all");


#add a 10% extra margin on all four sides:


qbbox(lat, lon, margin = list(m = c(10, 10, 10, 10), TYPE = c("perc", "abs")[1]));

RgoogleMaps

Overlays on Static Maps

v1.4.5.3
GPL
Authors
Markus Loecher
Initial release
2020-02-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.