Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaconet committed Oct 21, 2024
1 parent 64e0a1e commit 90f2a29
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions R/mf_get_opt_param.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ mf_get_opt_param<-function(collection,roi,credentials=NULL,verbose=TRUE){
#}


# 20 is an arbitrary threshold... could be 30 or more
# 40 is an arbitrary threshold... could be more but not less
list_roiSpatialIndexBound <- purrr::map2(list_roiSpatialIndexBound, OpenDAPXVector, ~ {
x <- .x
len <- length(.y)
Expand All @@ -202,15 +202,15 @@ mf_get_opt_param<-function(collection,roi,credentials=NULL,verbose=TRUE){
## above is equal to :
# for(i in 1:length(list_roiSpatialIndexBound)){
#
# if(list_roiSpatialIndexBound[[i]][1] <= 20){ list_roiSpatialIndexBound[[i]][1] = 0}
# if(list_roiSpatialIndexBound[[i]][2] <= 20){ list_roiSpatialIndexBound[[i]][2] = 20}
# if(list_roiSpatialIndexBound[[i]][3] <= 20){ list_roiSpatialIndexBound[[i]][3] = 0}
# if(list_roiSpatialIndexBound[[i]][4] <= 20){ list_roiSpatialIndexBound[[i]][4] = 20}
# if(list_roiSpatialIndexBound[[i]][1] <= 40){ list_roiSpatialIndexBound[[i]][1] = 0}
# if(list_roiSpatialIndexBound[[i]][2] <= 40){ list_roiSpatialIndexBound[[i]][2] = 40}
# if(list_roiSpatialIndexBound[[i]][3] <= 40){ list_roiSpatialIndexBound[[i]][3] = 0}
# if(list_roiSpatialIndexBound[[i]][4] <= 40){ list_roiSpatialIndexBound[[i]][4] = 40}
#
# if(list_roiSpatialIndexBound[[i]][1] >= length(OpenDAPXVector[[i]])-20){ list_roiSpatialIndexBound[[i]][1] = length(OpenDAPXVector[[i]])-20}
# if(list_roiSpatialIndexBound[[i]][2] >= length(OpenDAPXVector[[i]])-20){ list_roiSpatialIndexBound[[i]][2] = length(OpenDAPXVector[[i]])-1}
# if(list_roiSpatialIndexBound[[i]][3] >= length(OpenDAPXVector[[i]])-20){ list_roiSpatialIndexBound[[i]][3] = length(OpenDAPXVector[[i]])-20}
# if(list_roiSpatialIndexBound[[i]][4] >= length(OpenDAPXVector[[i]])-20){ list_roiSpatialIndexBound[[i]][4] = length(OpenDAPXVector[[i]])-1}
# if(list_roiSpatialIndexBound[[i]][1] >= length(OpenDAPXVector[[i]])-40){ list_roiSpatialIndexBound[[i]][1] = length(OpenDAPXVector[[i]])-40}
# if(list_roiSpatialIndexBound[[i]][2] >= length(OpenDAPXVector[[i]])-40){ list_roiSpatialIndexBound[[i]][2] = length(OpenDAPXVector[[i]])-1}
# if(list_roiSpatialIndexBound[[i]][3] >= length(OpenDAPXVector[[i]])-40){ list_roiSpatialIndexBound[[i]][3] = length(OpenDAPXVector[[i]])-40}
# if(list_roiSpatialIndexBound[[i]][4] >= length(OpenDAPXVector[[i]])-40){ list_roiSpatialIndexBound[[i]][4] = length(OpenDAPXVector[[i]])-1}
#
# }

Expand Down
2 changes: 1 addition & 1 deletion R/mf_get_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ mf_get_url<-function(collection,
dplyr::mutate(name=paste0(name,".",output_format)) %>%
dplyr::arrange(roi_id,date) %>%
dplyr::mutate(collection=collection) %>%
dplyr::select(roi_id,date,collection,name,url,fileSizeEstimated) %>%
dplyr::select(roi_id,date,collection,name,url) %>% #,fileSizeEstimated) %>%
dplyr::rename(time_start = date,id_roi = roi_id)

if(verbose){cat("OK\n")}
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ library(dplyr)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/modisfast)](https://cran.r-project.org/package=modisfast)
[![Github_Status_Badge](https://img.shields.io/badge/Github-0.9.2-blue.svg)](https://github.com/ptaconet/modisfast)
[![R-CMD-check](https://github.com/ptaconet/modisfast/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ptaconet/modisfast/actions/workflows/R-CMD-check.yaml)
<!--[![CRAN_downloads](https://cranlogs.r-pkg.org/badges/grand-total/modisfast)-->
[![CRAN_downloads](https://cranlogs.r-pkg.org/badges/grand-total/modisfast)
[![SWH](https://archive.softwareheritage.org/badge/origin/https://github.com/ptaconet/modisfast/)](https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/ptaconet/modisfast)
[![DOI-zenodo](https://zenodo.org/badge/doi/10.5281/zenodo.8475.svg)](https://doi.org/10.5281/zenodo.12772739)
<!-- badges: end -->
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/modisfast)](https://cran.r-project.org/package=modisfast)
[![Github_Status_Badge](https://img.shields.io/badge/Github-0.9.2-blue.svg)](https://github.com/ptaconet/modisfast)
[![R-CMD-check](https://github.com/ptaconet/modisfast/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ptaconet/modisfast/actions/workflows/R-CMD-check.yaml)
<!--[![CRAN_downloads](https://cranlogs.r-pkg.org/badges/grand-total/modisfast)-->
\[![CRAN_downloads](https://cranlogs.r-pkg.org/badges/grand-total/modisfast)
[![SWH](https://archive.softwareheritage.org/badge/origin/https://github.com/ptaconet/modisfast/)](https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/ptaconet/modisfast)
[![DOI-zenodo](https://zenodo.org/badge/doi/10.5281/zenodo.8475.svg)](https://doi.org/10.5281/zenodo.12772739)
<!-- badges: end -->
Expand Down

0 comments on commit 90f2a29

Please sign in to comment.