mapme-initiative / mapme.vegetation Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://mapme-initiative.github.io/mapme.vegetation/
License: GNU General Public License v3.0
Home Page: https://mapme-initiative.github.io/mapme.vegetation/
License: GNU General Public License v3.0
Hello,
While trying to install mapme.vegetation
with remotes::install_github("mapme-initiative/mapme.vegetation")
I ran into the following error:
Error : object ‘items_bands’ not exported by 'namespace:rstac'
It appear that rstac::item_bands
was replaced with rstac::items_assets
since rstac
version 0.9.1-5 (Released 2021-11-01).
My dirty hack is to install rstac
version 0.9.1-4
devtools::session_info()
─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.2.2 (2022-10-31)
os Ubuntu 20.04.4 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate fr_FR.UTF-8
ctype fr_FR.UTF-8
tz Europe/Paris
date 2023-02-06
rstudio 2022.12.0+353 Elsbeth Geranium (desktop)
pandoc NA
─ Packages ────────────────────────────────────────────────────
package * version date (UTC) lib source
mapme.vegetation * 0.0.0.9010 2023-02-06 [1] Github (gse-cc-git/mapme.vegetation@a08a299)
rstac 0.9.2-2 2023-02-01 [1] CRAN (R 4.2.2)
I'm also stuck with the scl_buffer now. But I'm not sure if my error is related to GRASS or more to GDAL
scl_buffer(scl_files = scl_files,
+ mask_values = c(1,2,3,7,8,9,10,11), # which values to mask?
+ mask_buffer = 100,
+ grass_bin = "C:/OSGeo4W64/apps/grass/grass79",
+ threads = 1,
+ outdir = "C:/SOM-Togdheer/R-programs/CM_S2A")
| | 0%Error in system(rcl_command, intern = T) :
'CreateProcess' failed to run 'C:\OSGEO4~1\apps\gdal2\pymod3\scripts\GDAL_C~1.PY -A C:/SOM-Togdheer/R-programs/S2A/S2A_38PMR_20220904_0_L2A_SCL.tif --outfile=C:\Users\stp.CES\AppData\Local\Temp\Rtmpy2M6cL\file4db4395f70c8.tif --calc="1*(A==1)+1*(A==2)+1*(A==3)+1*(A==7)+1*(A==8)+1*(A==9)+1*(A==10)+1*(A==11)"'
I already updated my PATH to include the path to the gdal scripts but now it fails to run
Originally posted by @stpCES in #2 (comment)
scl_buffer needs to error out and give an informative message in case that not valid GRASS binary is found
Next issue, sorry.
I've tried to continue with the NDVI calculation.
Using your example or my changed parameters doesn't matter. It always aborts the whole R session when running the index_cube command.
items = download_aws(assets="overview",
+ bbox = bbox,
+ after = "2022-09-02",
+ before = "2022-09-04",
+ timeframe = "full",
+ max.cloud = 30, outdir = "C:\\SOM-Togdheer\\R-programs",
+ overwrite = TRUE,
+ verbose = T,
+ query_only = F,
+ )
STAC version: 1.0.0-beta.2
Querying data for temporal window 2022-09-02/2022-09-04
The following items matched the specified spatiotemporal extent.
###STACItemCollection
- matched feature(s): 4
- features (4 item(s) / 0 not fetched):
- S2A_38PMR_20220904_0_L2A
- S2A_38PNR_20220904_0_L2A
- S2A_38PMS_20220904_0_L2A
- S2A_38PNS_20220904_0_L2A
- assets:
thumbnail, overview, info, metadata, visual, B01, B02, B03, B04, B05, B06, B07, B08, B8A, B09, B11, B12, AOT, WVP, SCL
- other field(s):
type, stac_version, stac_extensions, context, numberMatched, numberReturned, features, links
Starting download...
|========================= | 50%Error: Error while downloading https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/38/P/NR/2022/9/S2A_38PNR_20220904_0_L2A/L2A_PVI.tif.
Path exists and overwrite is FALSE
It actually downloads the file and afterwards says it already existing and overwrite would be false even though I specified it to be true. I changed the outdir in case it would have something to do with Windows access permissions but it doesn't change anything.
Moreover the function also interrupts when trying to download the all assets because the thumbnail is first and it gives the following error
Starting download...
|============ | 25%Error: Error while downloading https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/38/P/MR/2022/9/4/0/preview.jpg.
Unrecognized content encoding type. libcurl understands deflate, gzip content encodings.
After successfully running index_cube and aquiring ndvi_raw here for 10 days. The smooth_cube function runs into a gdal_cubes error:
after = "2022-09-24" # start date
before = "2022-10-03" # end date
dx = 10 # desired outcome resolution in x direction
dy = 10 # desired outcome resolution in y direction
dt = "P10D" # desired temporal resolution - here 1 month
srs = "EPSG:32638" # desired CRS of the outcome raster - bbox must be specified in that crs
label = "NDVI-" # appended to filename
aggregation = "max" # aggregation method for scene within the same time step
resampling = "cubic" # GDAL resampling method to match the outcome grid size
fill_ndvi = smooth_cube(files = raw_ndvi$files,
+ bands = raw_ndvi$band_order,
+ times = raw_ndvi$time,
+ dx = dx,
+ dy = dy,
+ dt = dt,
+ srs = srs,
+ after = after,
+ before = before,
+ bbox = bbox,
+ aggregation = aggregation,
+ resampling = resampling,
+ outdir = rundir,
+ label = label,
+ overwrite = TRUE,
+ chunking = c(1,50,50),
+ creation_options = list("COMPRESS" = "DEFLATE"))
[==================================================>] 100 %
[ERROR] worker process #0 returned 1
## Size of the cube in x direction does not align with dx, extent will be enlarged by 3.552875 at both sides.
## Size of the cube in y direction does not align with dy, extent will be enlarged by 2.559135 at both sides.
Current cube view is:
A data cube view object
Dimensions:
low high count pixel_size
t 2022-09-24 2022-10-03 1 P10D
y 1003861.03099573 1103951.03099573 10009 10
x 472148.818176792 584708.818176792 11256 10
SRS: "EPSG:32638"
Temporal aggregation method: "max"
Spatial resampling method: "cubic"
No smoothing function specified.
Using Linear Interpolation and Savitzkiy-Golay-Filter with standard parameters.
Error in gdalcubes:::gc_exec_worker(j$cube, j$worker_id, j$worker_count, :
c++ exception (unknown reason)
Execution halted
[WORKER #0] [ERROR] Child process failed with exit code 1
[WORKER #0] [ERROR] Child process output: Loading required package: gdalcubes
[WORKER #0] Error in x[(len - n + 1):len] :
[WORKER #0] only 0's may be mixed with negative subscripts
[WORKER #0] Calls: write_chunk_from_array ... apply_time.array -> apply -> FUN -> lapply -> FUN -> <Anonymous>
[WORKER #0] Execution halted
Error in gc_write_tif(x, dir, prefix, overviews, COG, creation_options, :
one or more worker processes failed to compute data cube chunks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.