Range extractor

Share:

Description

Fetch an arbitrary range from a rangeMapper project.

Usage

1

Arguments

rangeMap

A rangeMap object.

bioid

A character vector, usually a taxon name, which identifies a range within a given rangeMapper project.

Value

A SpatialPolygons.

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. rangeMapFetch. rangeMapSave.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
wd = setwd(tempdir())
require(rangeMapper)
spdf = readOGR(system.file(package = "rangeMapper", "extdata", 
	"wrens", "vector_combined"), "wrens", verbose = FALSE)
dbcon = rangeMap.start(file = "wrens.sqlite", 
	overwrite = TRUE, dir = tempdir() )
rmo = rangeMap("wrens.sqlite")
global.bbox.save(con = dbcon, bbox = spdf)
gridSize.save(dbcon, gridSize = 3)  
canvas.save(dbcon) 
processRanges(spdf = spdf, con =  dbcon, ID = "sci_name" )
rangeMap.save(dbcon)

house_wren = rangeFetch(rmo, "Troglodytes_aedon")
image(rangeMap.fetch(dbcon))
plot(house_wren, add = TRUE, border = 'blue', lwd = 2)
setwd(wd)