Commit 3bf536da authored by floriandeboissieu's avatar floriandeboissieu
Browse files

move example and remove reprojection from diversity_from_plot

parent 0aa7a979
Package: biodivMapR
Title: biodivMapR: an R package for α- and β-diversity mapping using remotely-sensed images
Version: 1.0.1
Version: 1.0.2
Authors@R: c(person(given = "Jean-Baptiste",
family = "Feret",
email = "jb.feret@teledetection.fr",
......
### biodivMapR v1.0.1 (Release date: 2019-09-27)
# biodivMapR v1.0.2
## Fixes
Added NEWS.md
Updated README.md: transfered from gitlab.irstea to github
changed return() into return(invisible())
updated vignettes & tutorial with latest outputs and figures from code
## Changes
- moved examples to repository root: example files are not installed with package anymore.
- removed Plots reprojection from `diversity_from_plots`:
now, Plots and Raster must be in the same projection. Changed example Plots projection accordingly.
# biodivMapR v1.0.1 (Release date: 2019-09-27)
- Added NEWS.md
- Updated README.md: transfered from gitlab.irstea to github
- changed return() into return(invisible())
- updated vignettes & tutorial with latest outputs and figures from code
# biodivMapR v1.0.0 (Release date: 2019-09-26)
First release in GitHub
Submission accepted to Methods in Ecology and Evolution
\ No newline at end of file
Submission accepted to Methods in Ecology and Evolution
......@@ -144,7 +144,7 @@ get_alpha_metrics = function(Distrib){
#' @importFrom rgdal readOGR
#' @import tools
#' @export
diversity_from_plots = function(Raster, Plots,NbClusters = 50,Name_Plot = FALSE){
diversity_from_plots = function(Raster, Plots, NbClusters = 50, Name_Plot = FALSE){
# get hdr from raster
HDR = read_ENVI_header(paste(Raster,'.hdr',sep=''))
nbRepetitions = HDR$bands
......@@ -176,12 +176,8 @@ diversity_from_plots = function(Raster, Plots,NbClusters = 50,Name_Plot = FALSE)
Projection.Plot = get_projection(File.Vector,'vector')
Projection.Raster = get_projection(Raster,'raster')
# if not, convert vector file
if (!Projection.Raster==Projection.Plot){
if (!file.exists(File.Vector.reproject)){
dir.create(Dir.Vector.reproject, showWarnings = FALSE,recursive = TRUE)
reproject_vector(File.Vector,Projection.Raster,File.Vector.reproject)
}
Plot = readOGR(Dir.Vector.reproject,Name.Vector[[ip]],verbose = FALSE)
if (compareCRS(Projection.Raster, Projection.Plot)){
stop('Raster and Plots have different projection. Plots should be reprojected to Raster CRS, see help(')
}
} else if (file.exists(paste(File.Vector,'kml','sep'='.'))){
print('Please convert vector file to shpfile')
......
......@@ -42,9 +42,9 @@ Input_Image_File = system.file('extdata', 'RASTER', 'S2A_T33NUD_20180104_Subset
# set to FALSE if no mask available
Input_Mask_File = FALSE
# relative or absolute path for the Directory where results will be stored
# Output directory: files created by script will be written there.
# For each image processed, a subdirectory will be created after its name
Output_Dir = 'RESULTS'
Output_Dir = '~/biodiv' # fill with your own path
# SPATIAL RESOLUTION
# resolution of spatial units for alpha and beta diversity maps (in pixels), relative to original image
......
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_33N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_33N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_33N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
PROJCS["WGS_1984_UTM_Zone_33N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment