HabitatSampler merge requestshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests2022-03-02T12:12:40+01:00https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/34Increase the range of colors. Specify the R package name to avoid the use a...2022-03-02T12:12:40+01:00Romulo Pereira GoncalvesIncrease the range of colors. Specify the R package name to avoid the use a...Increase the range of colors. Specify the R package name to avoid the use a function from another packages.Increase the range of colors. Specify the R package name to avoid the use a function from another packages.Romulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/33Optimized version.2022-03-24T16:49:23+01:00Romulo Pereira GoncalvesOptimized version.In this version we have improved several things.
1. We are now able to define the number of trees for randomForest.
2. Run in optimized mode
a. Improve the code to only use raster objects in memory. Clean the temporary storage.
b. ...In this version we have improved several things.
1. We are now able to define the number of trees for randomForest.
2. Run in optimized mode
a. Improve the code to only use raster objects in memory. Clean the temporary storage.
b. Use matrices instead of raster when possible.
3. Add a new sample method which only works for the optimized_mode since it runs with matrices. Now we have `random_raster` (equivalent to old `random` which uses `raster::sampleRandom` function), `raster_regular` (equivalent to old `regular` which uses `raster::sampleRegular` function), and `random_matrix` (new one which uses matrices and the stats::sample function over the only existent pixels and not over all as raster::sampleRandom - more info [here](https://github.com/rspatial/raster/issues/245)).
4. Add `last_ref_val`, this is, the default reference value for the last step (default: 1000)
@dara, @jknoch and @carstenn the official reviewer will be Daniela, but it would be great if all of you could review the changes and test it. There is still the documentation to update which I hope to get it done tomorrow based on your feedback. I am aware the review of this branch will take a while because we did quite some changes.
I have tested the optimized version several times and it all seemed running as expected. In case you want to repeat your previous run, just restart R, run again the function with the same seed (now as default we recommend to always set the seed to the current time as integer), the same `init.samples`, `sample_type`, and `models`, and use the same thresholds and you will get exactly the same results (it works for random_raster and random_matrix as well). About the seeds, more info in issue #59 and #58.
Closes issue #54, #53, #55, #56 ,#58, #59, #61Romulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/32Save samplepoints2022-01-19T10:18:31+01:00Romulo Pereira GoncalvesSave samplepointsDaniela RabeDaniela Rabehttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/31changed order of lines for avoiding NA in the final map2022-01-17T10:02:16+01:00Johannes Knochchanged order of lines for avoiding NA in the final mapWhen the threshold in the last step was less then the number of habitats it leaded to NA-pixels or "holes" in the final habitat map.
fixes #51When the threshold in the last step was less then the number of habitats it leaded to NA-pixels or "holes" in the final habitat map.
fixes #51Johannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/30bug fixes for multiClass2022-01-17T09:57:06+01:00Carsten Neumannbug fixes for multiClassI have solved the two issues in outer_procedure.r multiClass argument should work now. I wonder if this option can be made part of the GUI?I have solved the two issues in outer_procedure.r multiClass argument should work now. I wonder if this option can be made part of the GUI?Carsten NeumannCarsten Neumannhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/29Predict using the raster in memory.2022-01-17T09:38:45+01:00Romulo Pereira GoncalvesPredict using the raster in memory.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/28To be able to handle NAs we need to add the parameter: na.action = na.omit,...2021-09-23T15:30:45+02:00Romulo Pereira GoncalvesTo be able to handle NAs we need to add the parameter: na.action = na.omit,...To be able to handle NAs we need to add the parameter: na.action = na.omit, this is, omit pixels with NA value.To be able to handle NAs we need to add the parameter: na.action = na.omit, this is, omit pixels with NA value.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/27update Progressbar2021-08-05T13:10:17+02:00Daniela Rabeupdate ProgressbarDaniela RabeDaniela Rabehttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/26Carsten optimization2022-03-28T13:14:31+02:00Daniela RabeCarsten optimizationMerge optimization branch to masterMerge optimization branch to masterPerformanceDaniela RabeDaniela Rabehttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/25Offer the options to overwrite files. In case the file exists and the user di...2021-07-16T15:32:19+02:00Romulo Pereira GoncalvesOffer the options to overwrite files. In case the file exists and the user did...Offer the options to overwrite files. In case the file exists and the user did not choose the option to overwrite, raise an error.Offer the options to overwrite files. In case the file exists and the user did not choose the option to overwrite, raise an error.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/24When results is NULL, we should create an empty SpatialPolygonsDataframe. To...2021-07-09T16:23:31+02:00Romulo Pereira GoncalvesWhen results is NULL, we should create an empty SpatialPolygonsDataframe. To...When results is NULL, we should create an empty SpatialPolygonsDataframe. To save empty SpatialTemporalDataframes we need to use sf, since it supports the empty Geometries.When results is NULL, we should create an empty SpatialPolygonsDataframe. To save empty SpatialTemporalDataframes we need to use sf, since it supports the empty Geometries.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/22Check if either kml or kmz files exist.2021-07-07T18:18:52+02:00Romulo Pereira GoncalvesCheck if either kml or kmz files exist.Unit and Integration testsRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/21Save sample points2021-07-09T08:23:01+02:00Romulo Pereira GoncalvesSave sample pointsPerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/20We are saving run1 object and not run.2021-07-07T15:02:28+02:00Romulo Pereira GoncalvesWe are saving run1 object and not run.Unit and Integration testsRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/19renamed the function and output names and put in missing packages for functio...2021-07-02T16:37:56+02:00Johannes Knochrenamed the function and output names and put in missing packages for functions usedUnit and Integration testsJohannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/18Save samplepoints2021-06-25T15:33:49+02:00Johannes KnochSave samplepointswriteOutSamples.r now writes out a set of samples (SpatialPointsDataFrame) into an ESRI shapefile or a GeoJSON file for a selected habitat type. Each point represents a valid sample location that identifies the selected habitat type.
de...writeOutSamples.r now writes out a set of samples (SpatialPointsDataFrame) into an ESRI shapefile or a GeoJSON file for a selected habitat type. Each point represents a valid sample location that identifies the selected habitat type.
default output format is shape; use output_format = 'geojson' for geojson output
Documentation is adjusted and write_Out_Samples.Rd is commited.GeneralizationJohannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/17the functions from save_files.r are now used in outer_procedure.r2021-06-22T09:52:09+02:00Johannes Knochthe functions from save_files.r are now used in outer_procedure.rJohannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/16fixes issue#272021-06-14T08:54:57+02:00Johannes Knochfixes issue#27**1.**
To achive the goal to fix #27 it was necessary to change the code in line 512 of `outer_procedure.r` as follows
`raster::KML(kml, paste(outPath, paste("step_", ni, sep = ""), sep = ""), overwrite = overwrite, zip = FALSE)`
to...**1.**
To achive the goal to fix #27 it was necessary to change the code in line 512 of `outer_procedure.r` as follows
`raster::KML(kml, paste(outPath, paste("step_", ni, sep = ""), sep = ""), overwrite = overwrite, zip = FALSE)`
to no longer generate `kmz` files, but the "unzipped" version consisting of a `kml` and a `png`.
After this change it is now possible to check for the `png` files in `plot_results.r`.
I didnt found a good solution to unzip or "look into" the `kmz` files to check for `png` or `kml` files. So now the `plot_results()` can be used with the demo and new produced data. That's why I used this adjustment.
_____________________________________________________________________________________________________________________
**2.**
`outer_procedure.r` and `plot_results.r` now only check for `tif` files which begin with "step_".Johannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/15changes in the documentation due to new probability map threshold and legend2021-06-09T12:22:16+02:00Johannes Knochchanges in the documentation due to new probability map threshold and legendchanges in the documentation due to new probability map threshold and legend; new screenshot (/images/inter_map_ex_new.png) with probabilty map changes; changed the links to the pictures under 3.2 and 4.1.1 in the README.md because of a ...changes in the documentation due to new probability map threshold and legend; new screenshot (/images/inter_map_ex_new.png) with probabilty map changes; changed the links to the pictures under 3.2 and 4.1.1 in the README.md because of a new directory (/figure-markdown_github instead of /figure-gfm)DocumentationJohannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/14Issue#32021-06-09T14:53:39+02:00Romulo Pereira GoncalvesIssue#3DocumentationRomulo Pereira GoncalvesRomulo Pereira Goncalves