Generating Crop Type

Dear Sen4Cap,

We are facing below error after running command in terminal. Here is the command we run. we included Landsat 8 tiles as well. Please correct me if I am wrong. croptype file is also upgraded with the latest patch we found from this link ( No predicted classes created in L4A processor - #13 by Philippe_Malcorps )

crop-type-wrapper.py -s 9 --season-start 2019-01-01 --season-end 2019-12-30 --working-path /mnt/archive/orchestrator_temp/s4c_l4a/14575/88991-s4c-crop-type/ --out-path /mnt/archive/orchestrator_temp/s4c_l4a/14575/88992-product-formatter/ --tiles 47PQT 47PRS 47PRT 47QQU 47QQV 47QRU 47QRV 48PTB 48PTC 48PUB 48PUC 48QTD 128049 128050 129048 127049 127050 128048 129049 --lc 1234 --min-s2-pix 3 --min-s1-pix 1 --best-s2-pix 10 --pa-min 30 --pa-train-h 4000 --pa-train-l 1333 --sample-ratio-h 0.25 --sample-ratio-l 0.75 --smote-target 1000 --smote-k 5 --num-trees 300 --min-node-size 10 --mode both

Thanks and Regards,
Henry

The reason we upgraded croptype file is due to incomplete result we got from last run.

image

Regards,
Henry

Hi Hein,

It looks to me the permissions of the crop_type.R or crop-type-warpper.py file are not right. Just simply run these commands and try again:

sudo chmod 777 /usr/bin/crop_type.R
sudo chmod 777 /usr/bin/crop-type-wrapper.py

Hi @sibrant ,

Thank you for your tip. Will try out. Any advice for computing Landsat 8 data? Do you think it’s a right way to execute?

Thanks,
Henry

Landsat 8 images are automatically included in the L2A collection, if they are pre-processed in Sen4CAP with MAJA and fall within the period of interest.

1 Like

Hello Henry and Sybrand,

Landsat 8 data (preprocessed by the system using MAJA) are not used by the L4A crop type processor. This choice was made because of the large number of features/markers that are already processed based on the S2 and S1 time-series.

But the Lansat 8 data (preprocessed by the system using MAJA) are used to generate the L3B vegetation status products and are thus used by the L4B grassland mowing detection and L4C EFA practices monitoring processor.

@henryhein did you succeed to generate the L4A crop type products? Another advice is to change the --working-path and --out-path to a directory that you created on the machine, outside of /mnt/archive/orchestrator_temp/, which is used for the processes launched from the web interface (it could also give some permission problems).

Best regards,

Philippe

1 Like

Hello Philippe,

Thank you for your advice. I am running another one as u said. Hope it will solve out the issue.

Here is the error what we observed from previous run. Wonder it’s critical one or not.

/mnt/archive/maccs_def/th_v4/l2a/S2B_MSIL2A_20191125T033049_N0208_R018_T48PTB_20191125T070148.SAFE/SENTINEL2B_20191125-034404-577_L2A_T48PTB_C_V1-0/SENTINEL2B_20191125-034404-577_L2A_T48PTB_C_V1-0_MTD_ALL.xml /mnt/archive/maccs_def/th_v4/l2a/S2B_MSIL2A_20191128T034059_N0208_R
Computing features...: 0% [                                                  ]
Computing features...: 0% [                                                  ]2020 Oct 16 09:09:22  :  Application.logger  (FATAL) The following error occurred during application execution : /sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/IO/ImageIO/include/otbImageFileReader.txx:525:
Cannot read image (probably unsupported or incorrect filename extension).
061_T48PTB_20191128T062719.SAFE/SENTINEL2B_20191128-035359-045_L2A_T48PTB_C_V1-0/SENTINEL2B_20191128-035359-045_L2A_T48PTB_C_V1-0_MTD_ALL.xml 

Best Regards,
Henry