This commit is contained in:
Martin Folkerts 2024-07-18 15:57:13 +02:00
parent 9d024cb1f2
commit 24cbea7b0b
3 changed files with 6 additions and 6 deletions

View file

@ -12,7 +12,7 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule): void
{
$schedule->command('smartcane:build-reports')->dailyAt('2:00');
$schedule->command('smartcane:build-reports')->dailyAt('7:00');
}
/**

View file

@ -407,11 +407,11 @@ private function getMinimumDateFromHarvestExcelFile(): Carbon
public function newDownloadsUploaded()
{
// $this->createDownloadRecordsInDatabaseAndUpdateStatusForAllDownloadedImages();
$date = Carbon::parse('2023-01-01');
$date = Carbon::parse('2023-02-09');
$now = Carbon::now();
$offset = (int) $date->diffInDays($now);
// dispatch_sync(new ProjectDownloadRDSJob($this, Carbon::yesterday(), 1));
dispatch_sync(new ProjectDownloadRDSJob($this, Carbon::yesterday(), $offset));
dispatch_sync(new ProjectInterpolateGrowthModelJob($this));
}
public function getRdsAsDownload() {

View file

@ -128,7 +128,7 @@ if(sum(missing_pixels_count$thres_5perc)>1){
cloudy_rasters_list <- vrt_list[index_5perc]
rsrc <- sprc(cloudy_rasters_list)
x <- mosaic(rsrc, fun = "max")
x <- terra::mosaic(rsrc, fun = "max")
# names(x) <- "CI"
names(x) <- c("Red", "Green", "Blue", "NIR", "CI")
@ -144,7 +144,7 @@ if(sum(missing_pixels_count$thres_5perc)>1){
cloudy_rasters_list <- vrt_list[index_40perc]
rsrc <- sprc(cloudy_rasters_list)
x <- mosaic(rsrc, fun = "max")
x <- terra::mosaic(rsrc, fun = "max")
# names(x) <- "CI"
names(x) <- c("Red", "Green", "Blue", "NIR", "CI")
}else if(sum(missing_pixels_count$thres_40perc)==1){
@ -157,7 +157,7 @@ if(sum(missing_pixels_count$thres_5perc)>1){
message("No cloud free images available, all images combined")
message(vrt_list)
rsrc <- sprc(vrt_list)
x <- mosaic(rsrc, fun = "max")
x <- terra::mosaic(rsrc, fun = "max")
# x <- rast(vrt_list[1]) %>% setValues(NA)
# names(x) <- c("CI")
names(x) <- c("Red", "Green", "Blue", "NIR", "CI")