infer_crs | R Documentation |
This function will project occurrences to a list of ~6600 crs, find nearest 4 points, find the angle to the 4 points, then take reminder %%90, the smaller the better also find the distance to the 4 points, then all the distance is standardized to 0 mean and 1sd then do a histogram, and calculate the freq of each bin, pick the bin with highest freq ideally, the true crs will lead to the highest freq in that bin.
infer_crs(
occ_path,
truth_crs_num = NA,
flag_saveTemp = TRUE,
flag_newCal = TRUE,
temp_path = "data/3_infer_grid_crs_temp/",
cup_num = 2,
flag_debug = -1
)
occ_path |
Character. A string, path of input occurrences, should have decimalLongitude & decimalLatitude. |
truth_crs_num |
Character. A string, epsg code of the true crs if known. |
flag_saveTemp |
Logical. If "True", save the middle output. |
flag_newCal |
Logical. If "True" do the distance calculation again. |
temp_path |
Character. Define a path to save. |
cup_num |
Numerical. To define the number of cores to use. Default is 2. |
flag_debug |
Numerical. Default -1. |
Using 15 cores, it took ~10-20 minutes to finish this workflow.
Xiao Feng
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.