HabitatSampler issueshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues2021-04-29T14:47:38+02:00https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/9When the number of init_samples is not enough, HabitatSample exits instead of...2021-04-29T14:47:38+02:00Romulo Pereira GoncalvesWhen the number of init_samples is not enough, HabitatSample exits instead of asking for a new value.HabitatSampler should be able to request a new value, and not simply exit.HabitatSampler should be able to request a new value, and not simply exit.User InterfaceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/27Plot_results does not work due to the check of the number of tif files2021-06-14T08:54:57+02:00Romulo Pereira GoncalvesPlot_results does not work due to the check of the number of tif filesThe plot_results has two issues:
1) It should check the number of `kml` files, not `kmz`. Unless we are producing `kmz` files and not `kml`, but the demo data has only `kml` files. Maybe we should do the check the `png` files.
```
Make s...The plot_results has two issues:
1) It should check the number of `kml` files, not `kmz`. Unless we are producing `kmz` files and not `kml`, but the demo data has only `kml` files. Maybe we should do the check the `png` files.
```
Make sure the number of the .tif files fits to the number of the .kmz files and that
there are no other files from previous runs.
If you have resumed a run, then the data of the aborted and the continued run needs
to be in the Results directory. You need them for plotting the classification map.
```
2) It should compare only the `.tif` files that start with `step_` because the user might have their the `HabitatSampler.tif` which is ok because it will be overwritten. The use should be able to call the function just with the demo data, and the `HabitatSampler.tif` will be there in such case.
These are two cases for each the Unit-tests would have done the check for us.DocumentationJohannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/19"Sample again" option doesnt behave intuitive2021-05-28T17:23:52+02:00Johannes Knoch"Sample again" option doesnt behave intuitiveWhile running the multi_Class_Sampling with
```R
HaSa::multi_Class_Sampling(
...
save_runs = TRUE,
...)
```
and
```R
HaSa::multi_Class_Sampling(
...
save_runs = FALSE,
...)
```
I recogniced a not intuitive behav...While running the multi_Class_Sampling with
```R
HaSa::multi_Class_Sampling(
...
save_runs = TRUE,
...)
```
and
```R
HaSa::multi_Class_Sampling(
...
save_runs = FALSE,
...)
```
I recogniced a not intuitive behaviour.
Every time a new value for init.samples and models is provided, after typing "0" for "Sample Again", **not the initial habitat type is used, but jumps to the next habitat type in the list.**
Same comes with "auto" correction of init.samples and models.
If "1" for "same" is choosed, it tooks the initial habitat type.
The probability maps are labeled correct with every option but it's a bit confusing to type "Sample again" and instead of sampling again it takes another habitat type.Documentationhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/16test multi.test2021-06-08T13:01:44+02:00Alison Beamishtest multi.testNeed to test this functionNeed to test this functionDocumentationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/15test init.seeds2021-06-08T16:50:49+02:00Alison Beamishtest init.seedsWe need to test this functionWe need to test this functionDocumentationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/3Improve setup2021-06-10T09:30:20+02:00Romulo Pereira GoncalvesImprove setupCurrently the setup only refers to the R libraries, but it does not tell the user which other packages need to be installed.Currently the setup only refers to the R libraries, but it does not tell the user which other packages need to be installed.DocumentationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/31Be able to classify without the sampling phase2022-03-28T12:45:53+02:00Romulo Pereira GoncalvesBe able to classify without the sampling phaseThe user should be able to classify the input data without having to run the sample phase, i.e., to create a list of models for prediction.
This issue depends on #30The user should be able to classify the input data without having to run the sample phase, i.e., to create a list of models for prediction.
This issue depends on #30GeneralizationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/30Be able to save the models used for prediction of a certain habitat into a se...2022-03-28T12:46:15+02:00Romulo Pereira GoncalvesBe able to save the models used for prediction of a certain habitat into a seperate fileThe user should have the option to save the models used for predicting a certain class into a separate file. The file name could be similar to the created `.tif` file.The user should have the option to save the models used for predicting a certain class into a separate file. The file name could be similar to the created `.tif` file.GeneralizationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/28User query when falling below n% remaining pixels2022-04-19T14:42:26+02:00Daniela RabeUser query when falling below n% remaining pixelsTo avoid going on with very few pixels left the user could decide. Either if the value of remaining pixels falls under a certain percentage, or after every step getting a message like "x% pixels left, continue?"To avoid going on with very few pixels left the user could decide. Either if the value of remaining pixels falls under a certain percentage, or after every step getting a message like "x% pixels left, continue?"GeneralizationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/43To avoid empty rasters we should first set the pixels equal to NaN and then e...2022-01-17T10:02:16+01:00Romulo Pereira GoncalvesTo avoid empty rasters we should first set the pixels equal to NaN and then equal to the threshold.The problem is seen in [outer_procedure.r:513](https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/blob/master/R-package/R/outer_procedure.r#L513) and [plot_results.r:90](https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/...The problem is seen in [outer_procedure.r:513](https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/blob/master/R-package/R/outer_procedure.r#L513) and [plot_results.r:90](https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/blob/master/R-package/R/plot_results.r#L90).
Let's look at the code. The issue is in the following two lines `b)` and `c)` of the code marked as `<---------`
```R
for (i in 1:(length(files) + 1)) {
if (i == (length(files) + 1)) {
dummy <- raster::raster(files[(i - 1)]) <--------------- a)
dummy[dummy < thres[(i - 1)]] <- i <--------------- b)
dummy[dummy >= thres[(i - 1)]] <- NA <--------------- c)
class[[i]] <- dummy
} else {
dummy <- raster::raster(files[i])
dummy[dummy < thres[i]] <- NA
dummy[dummy >= thres[i]] <- i
class[[i]] <- dummy
}
}
```
For the last iteration of this loop, the class `"something else"` (it means all pixels not belonging to any of the 7 classes) if the `threshold` value (number of models selected for the last class) is less or equal to the `step` number (in this case 8 ), we will build an empty raster, this is, a raster full of NaNs, which is incorrect.
Let's run the 3 lines above:
```R
# Line a): initial raster
> dummy <- raster::raster("/home/romulo/gitlab/gui_prototype/hasa/test12h/Results//step_07_xeric_grass.tif")
> dummy
class : RasterLayer
dimensions : 115, 161, 18515 (nrow, ncol, ncell)
resolution : 10, 10 (x, y)
extent : 746231, 747841, 5883760, 5884910 (xmin, xmax, ymin, ymax)
crs : +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs
source : step_07_xeric_grass.tif
names : step_07_xeric_grass
values : 1, 2 (min, max)
```
```R
# Line b): set to the step value (look at the min and max of the dummy raster)
> dummy[dummy < thres[7]] <- 8
> dummy
class : RasterLayer
dimensions : 115, 161, 18515 (nrow, ncol, ncell)
resolution : 10, 10 (x, y)
extent : 746231, 747841, 5883760, 5884910 (xmin, xmax, ymin, ymax)
crs : +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs
source : memory
names : step_07_xeric_grass
values : 2, 8 (min, max)
```
```R
# Line c): set to NaN (look at the min and max of the dummy raster)
> dummy[dummy >= thres[7]] <- NA
> dummy
class : RasterLayer
dimensions : 115, 161, 18515 (nrow, ncol, ncell)
resolution : 10, 10 (x, y)
extent : 746231, 747841, 5883760, 5884910 (xmin, xmax, ymin, ymax)
crs : +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs
source : memory
names : step_07_xeric_grass
values : NA, NA (min, max)
```
As we can see the result raster is incorrect. I think the solution is swap line `b` with line `c`, this is, set first the `NaNs` and then the step value as it is done in the `else` clause.
@carstenn what do you think?Performancehttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/38We should start using sf objects instead of sp objects2022-03-28T12:51:03+02:00Romulo Pereira GoncalvesWe should start using sf objects instead of sp objectsPerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/34two new arguments to increase processing time are introduced in optimization ...2021-08-02T15:49:09+02:00Carsten Neumanntwo new arguments to increase processing time are introduced in optimization branchin.memory - boolean on whether to process raster image in memory or not
mod.error - specifies the model error until which iteration is being continued -> range [0:1] -> 0...100%in.memory - boolean on whether to process raster image in memory or not
mod.error - specifies the model error until which iteration is being continued -> range [0:1] -> 0...100%Performancehttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/33velox dependency is removed in optimization branch2021-08-02T15:49:20+02:00Carsten Neumannvelox dependency is removed in optimization branchsample extraction is now raster based, vector based extract functions are replacedsample extraction is now raster based, vector based extract functions are replacedPerformancehttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/32Optimization branch have open conflicts after a huge commit2021-06-23T14:00:19+02:00Carsten NeumannOptimization branch have open conflicts after a huge commitThere are conflicts in R-package/R/model_opt.r and R-package/R/outer_procedure.r that needs to be merged for having a conflict free version in the carsten_optimization branchThere are conflicts in R-package/R/model_opt.r and R-package/R/outer_procedure.r that needs to be merged for having a conflict free version in the carsten_optimization branchPerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/29Use the save data functions2021-06-23T10:06:48+02:00Romulo Pereira GoncalvesUse the save data functionsTo save KML files, we should use the functions in save_files.rTo save KML files, we should use the functions in save_files.rPerformanceJohannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/26The user should upload the projection for the timeseries and for the referenc...2022-03-28T12:40:56+02:00Romulo Pereira GoncalvesThe user should upload the projection for the timeseries and for the reference dataIf this information is uploaded, we should not need anymore to have hard-code projections in the code. In case the reference data projection differs from the timeseries data, we should transform the reference data into the projection of ...If this information is uploaded, we should not need anymore to have hard-code projections in the code. In case the reference data projection differs from the timeseries data, we should transform the reference data into the projection of the timeseries.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/25Use a mask instead of a vector to crop the area2022-01-17T10:03:21+01:00Romulo Pereira GoncalvesUse a mask instead of a vector to crop the areaWe should use a raster as a mask to crop the area of interest on each iteration of the HabitatSampler.We should use a raster as a mask to crop the area of interest on each iteration of the HabitatSampler.PerformanceCarsten NeumannCarsten Neumannhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/24The number of points to sample should decrease as we move forward with the cl...2022-01-17T10:03:25+01:00Romulo Pereira GoncalvesThe number of points to sample should decrease as we move forward with the classification.As we move forward with the classification, the number of points to classify should reduce. Hence, the increase of `init.samples` should not lead to a big performance degradation.As we move forward with the classification, the number of points to classify should reduce. Hence, the increase of `init.samples` should not lead to a big performance degradation.PerformanceCarsten NeumannCarsten Neumannhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/23Implement a new extract function2022-01-17T10:03:32+01:00Romulo Pereira GoncalvesImplement a new extract functionThe current version uses extract function from the deprecated `velox` package, #1. We should implement a new oneThe current version uses extract function from the deprecated `velox` package, #1. We should implement a new onePerformanceCarsten NeumannCarsten Neumannhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/14address performance issues with init.samples and nb_samples2022-03-28T12:37:57+02:00Alison Beamishaddress performance issues with init.samples and nb_samplesInitial samples and number of models effects the run time and performance of HaSa, this needs to be addressed.Initial samples and number of models effects the run time and performance of HaSa, this needs to be addressed.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalves