Description Usage Arguments Value Examples
Convert bounding box to a spatial (sfc
) object . Useful for plotting (see example). The function bb_earth
returns a spatial polygon of the 'boundaries' of the earth, which can also be done in other projections (if a feasible solution exists).
1 2 3 4 5 6 7 8 9 |
x |
object that can be coerced to a bounding box with |
steps |
number of intermediate points along the shortest edge of the bounding box. The number of intermediate points along the longest edge scales with the aspect ratio. These intermediate points are needed if the bounding box is plotted in another projection. |
stepsize |
stepsize in terms of coordinates (usually meters when the shape is projected and degrees of longlat coordinates are used). If specified, it overrules |
projection |
projection in which the coordinates of |
earth.datum |
Geodetic datum to determine the earth boundary. By default EPSG 4326. |
bbx |
boundig box of the earth in a vector of 4 values: min longitude, max longitude, min latitude, max latitude. By default |
buffer |
In order to determine feasible earth bounding boxes in other projections, a buffer is used to decrease the bounding box by a small margin (default |
sfc
object
1 2 3 4 5 6 7 8 9 | if (require(tmap) && packageVersion("tmap") >= "2.0") {
data(NLD_muni)
current.mode <- tmap_mode("view")
qtm(bb_poly(NLD_muni))
# restore mode
tmap_mode(current.mode)
}
|
Loading required package: tmap
tmap mode set to interactive viewing
tmap mode set to plotting
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.