processRanges: process ranges
Description
Each range (.shp file) is imported using readOGR
, overlayed on the previously created canvas
and the results are saved to the active project file.Usage
processRanges(Files, con, metadata)
Arguments
con
A valid sqlite connection.
metadata
A logical value. If TRUE ranges metadata: range area, median range centroid and range extents (min, max) are saved to metadata_ranges table
Warning
If there are thousands of range map polygons with complex geometries to be processed and/or the canvas resolution is relatively high this step is going to be time consuming. For example processing all amphibians of the world (5816 ranges, total 252 MB) using a grid of 0.25 deg (unnecessary high) resolution takes 544 minutes on a 64-bit machine with 4 GB of RAM running Windows Vista and R 2.10.0. However, once this step has been performed and the results saved to the database, the other operations are very fast.Details
The overlay is performed using overlay
. If the overlay returns no results (the polygon is smaller than a grid cell) then the centroid of the range will snap to the nearest point and only one grid cell will be returned for that range.References
Hurlbert, AH; Jetz, W (2007) Species richness, hotspots, and the scale dependence of range maps in ecology and conservation, PNAS, 13384-13389