global.bbox.save: Global bounding box

Description Usage Arguments Details Note Examples

View source: R/MapCanvas-methods.R

Description

Computes, sets or retrieves the global spatial bounding box.

Usage

1
2
3

Arguments

con

An SQLiteConnection object pointing to a rangeMapper project

...

Arguments to pass to the corresponding methods:
bbox can be a character vector; the path to the range files directory bbox can also be an object inheriting from Spatial
p4s an object of class CRS

Details

global.bbox.save saves the global bounding box and the proj4 string to the sqlite database.
global.bbox.fetch retrieves the global bounding box as a SpatialPolygonsDataFrame.

Note

If bbox is a character vector then the corresponding method calls rangeMapBbox with checkProj = TRUE which requires all ranges to have the same proj4 argument.
If p4s is set then the bbox will be set with that p4s string else the p4s will be identical with the proj4 string of the range files.
If bbox and p4s are missing then an unprojected global bounding box is set.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
require(rangeMapper)
wd = tempdir()

f= system.file(package = "rangeMapper", "extdata", "wrens", "vector")

# Using default values for both bbox and p4s
dbcon = rangeMap.start(file = "test.sqlite", overwrite = TRUE, dir = wd )
global.bbox.save(con = dbcon)
bbox0 = global.bbox.fetch(dbcon)

plot(bbox0, axes = TRUE)

valcu/rangeMapper documentation built on Feb. 6, 2021, 8:20 p.m.