Global bounding box

Share:

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.

Author(s)

Mihai Valcu valcu@orn.mpg.de

References

Valcu, M., Dale, J. and Kempenaers, B. (2012) rangeMapper: A platform for the study of macroecology of life history traits. 21(9). (DOI: 10.1111/j.1466-8238.2011.00739.x)

See Also

rangeMapper
proj4string
bbox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)


# more examples at: http://rangemapper.orn.mpg.de/