Manual L4B from manual L4A

Hi,

Is there a way to launch an L4B process from commandline based on a manually processed L4A product?

The L4B processor seems to expect the cropmask to be in a very specific format, which doesn’t seem to be automatically generated when running the L4A through commandline. Is there any handler script to convert this?

Thanks,

Val

Hi,

There’s shouldn’t be. You can use the -maskprod argument to pass it the location of an L4A product, as generated by that processor. If you’re having trouble of that, please show me your command line and the contents of the L4A product, as displayed by e.g. ls -lR.

EDIT:

I just went trough the output of the L4A processor and saw that it actually created the output needed in the proper directory. The one listed below is the one of orchestrator_temp.
I guess I assumed it wouldn’t automatically create this directory, and I didn’t bother check the timestamps. But it also doesn’t show in the products section of the web-interface.

Thanks!

###############################################################################

I was assuming since the products generated in automatic mode have a vastly different file/directory structure.

Here’s the error message from the L4B process - it seems like it’s looking for the TILES directory:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sen2agri_common.py", line 531, in execute
    self.load_tiles()
  File "/bin/CropTypeFused.py", line 101, in load_tiles
    for tile_dir in os.listdir(tile_path):
OSError: [Errno 2] No such file or directory: '/mnt/archive/orchestrator_temp/l4a/6/6-crop-mask-fused/TILES'
Main mission: SENTINEL
Tile 174053 intersects main tile 35PQL
Tile 174055 intersects main tile 35NQH
Tile 174055 intersects main tile 35NQJ
Tile 174055 intersects main tile 35NPJ
Tile 174055 intersects main tile 35NPH
Tile 174055 intersects main tile 35PQK
Tile 174055 intersects main tile 35PPK
Tile 174054 intersects main tile 35NQJ
Tile 174054 intersects main tile 35PQK
Tile 174054 intersects main tile 35PQL
Tile 174056 intersects main tile 35NQH
Tile 174056 intersects main tile 35NPH
Tile 177054 intersects main tile 35NMJ
Tile 177054 intersects main tile 35PML
Tile 177054 intersects main tile 35PMK
Tile 176055 intersects main tile 35NMJ
Tile 176055 intersects main tile 35PNK
Tile 176055 intersects main tile 35PMK
Tile 176055 intersects main tile 35NNJ
Tile 177053 intersects main tile 35PML
Tile 176053 intersects main tile 35PPL
Tile 176053 intersects main tile 35PML
Tile 176053 intersects main tile 35PNL
Tile 175053 intersects main tile 35PPL
Tile 175053 intersects main tile 35PQL
Tile 175053 intersects main tile 35PNL
Tile 176054 intersects main tile 35NMJ
Tile 176054 intersects main tile 35PNK
Tile 176054 intersects main tile 35PML
Tile 176054 intersects main tile 35PNL
Tile 176054 intersects main tile 35PMK
Tile 176054 intersects main tile 35NNJ
Tile 175056 intersects main tile 35NPH
Tile 175054 intersects main tile 35NQJ
Tile 175054 intersects main tile 35NPJ
Tile 175054 intersects main tile 35PQK
Tile 175054 intersects main tile 35PPK
Tile 175054 intersects main tile 35PPL
Tile 175054 intersects main tile 35PQL
Tile 175054 intersects main tile 35PNK
Tile 175054 intersects main tile 35PNL
Tile 175054 intersects main tile 35NNJ
Tile 175055 intersects main tile 35NQH
Tile 175055 intersects main tile 35NQJ
Tile 175055 intersects main tile 35NPJ
Tile 175055 intersects main tile 35NPH
Tile 175055 intersects main tile 35PQK
Tile 175055 intersects main tile 35PPK
Tile 175055 intersects main tile 35PNK
Tile 175055 intersects main tile 35NNJ
Tiles: 14
35NMJ 73
35NNJ 128
35NPH 97
35NPJ 113
35NQH 76
35NQJ 97
35PMK 73
35PML 93
35PNK 124
35PNL 95
35PPK 111
35PPL 115
35PQK 98
35PQL 96
Single stratum: True
Processor finished in 0:00:02.787037

And the contents of the L4A directory:

total 657152
-rw-r--r--. 1 sen2agri-service wfp       73 Jan 18 09:30 confusion-matrix-training-0.csv
-rw-r--r--. 1 sen2agri-service wfp       81 Jan 20 03:37 confusion-matrix-validation-0.csv
-rw-r--r--. 1 sen2agri-service wfp  4899445 Jan 18 14:15 crop_mask_map_35NMJ.tif
-rw-r--r--. 1 sen2agri-service wfp  8403024 Jan 18 17:33 crop_mask_map_35NNJ.tif
-rw-r--r--. 1 sen2agri-service wfp  4767429 Jan 18 15:16 crop_mask_map_35NPH.tif
-rw-r--r--. 1 sen2agri-service wfp 12473422 Jan 18 17:04 crop_mask_map_35NPJ.tif
-rw-r--r--. 1 sen2agri-service wfp  7659896 Jan 18 18:40 crop_mask_map_35NQH.tif
-rw-r--r--. 1 sen2agri-service wfp 11801443 Jan 18 20:16 crop_mask_map_35NQJ.tif
-rw-r--r--. 1 sen2agri-service wfp 11988414 Jan 18 21:08 crop_mask_map_35PMK.tif
-rw-r--r--. 1 sen2agri-service wfp 20500164 Jan 18 22:25 crop_mask_map_35PML.tif
-rw-r--r--. 1 sen2agri-service wfp 16429272 Jan 19 01:28 crop_mask_map_35PNK.tif
-rw-r--r--. 1 sen2agri-service wfp 18470402 Jan 19 01:06 crop_mask_map_35PNL.tif
-rw-r--r--. 1 sen2agri-service wfp 17893368 Jan 19 03:30 crop_mask_map_35PPK.tif
-rw-r--r--. 1 sen2agri-service wfp 16566996 Jan 19 05:00 crop_mask_map_35PPL.tif
-rw-r--r--. 1 sen2agri-service wfp 11496945 Jan 19 05:45 crop_mask_map_35PQK.tif
-rw-r--r--. 1 sen2agri-service wfp 12604560 Jan 19 06:12 crop_mask_map_35PQL.tif
-rw-r--r--. 1 sen2agri-service wfp  3043028 Jan 19 10:59 crop-mask-segmented-35NMJ.tif
-rw-r--r--. 1 sen2agri-service wfp  6791548 Jan 19 12:17 crop-mask-segmented-35NNJ.tif
-rw-r--r--. 1 sen2agri-service wfp  2483282 Jan 19 11:43 crop-mask-segmented-35NPH.tif
-rw-r--r--. 1 sen2agri-service wfp 20012191 Jan 19 12:05 crop-mask-segmented-35NPJ.tif
-rw-r--r--. 1 sen2agri-service wfp  6702152 Jan 19 15:12 crop-mask-segmented-35NQH.tif
-rw-r--r--. 1 sen2agri-service wfp 18005135 Jan 19 16:51 crop-mask-segmented-35NQJ.tif
-rw-r--r--. 1 sen2agri-service wfp  9862221 Jan 19 17:06 crop-mask-segmented-35PMK.tif
-rw-r--r--. 1 sen2agri-service wfp 53467401 Jan 19 16:58 crop-mask-segmented-35PML.tif
-rw-r--r--. 1 sen2agri-service wfp 26490213 Jan 19 20:52 crop-mask-segmented-35PNK.tif
-rw-r--r--. 1 sen2agri-service wfp 42371258 Jan 19 21:28 crop-mask-segmented-35PNL.tif
-rw-r--r--. 1 sen2agri-service wfp 41772383 Jan 19 22:37 crop-mask-segmented-35PPK.tif
-rw-r--r--. 1 sen2agri-service wfp 23214007 Jan 19 22:57 crop-mask-segmented-35PPL.tif
-rw-r--r--. 1 sen2agri-service wfp 13472616 Jan 20 01:21 crop-mask-segmented-35PQK.tif
-rw-r--r--. 1 sen2agri-service wfp 17665859 Jan 20 01:40 crop-mask-segmented-35PQL.tif
-rw-r--r--. 1 sen2agri-service wfp      716 Jan 18 08:34 days-0.txt
-rw-r--r--. 1 sen2agri-service wfp   168575 Jan 18 08:26 features-0.dbf
-rw-r--r--. 1 sen2agri-service wfp      143 Jan 18 08:26 features-0.prj
-rw-r--r--. 1 sen2agri-service wfp   152192 Jan 18 08:26 features-0.shp
-rw-r--r--. 1 sen2agri-service wfp     2900 Jan 18 08:26 features-0.shx
-rw-r--r--. 1 sen2agri-service wfp    84575 Jan 18 08:26 metadata.xml
-rw-r--r--. 1 sen2agri-service wfp   450274 Jan 18 09:29 model-0.txt
-rw-r--r--. 1 sen2agri-service wfp   100205 Jan 20 03:36 polygons.zip
-rw-r--r--. 1 sen2agri-service wfp      111 Jan 20 03:51 product_properties.txt
-rw-r--r--. 1 sen2agri-service wfp       92 Jan 18 08:26 qgis-color-map.txt
-rw-r--r--. 1 sen2agri-service wfp     5216 Jan 20 03:37 quality-metrics-0.txt
-rw-r--r--. 1 sen2agri-service wfp 14801573 Jan 20 02:01 status_flags_35NMJ.tif
-rw-r--r--. 1 sen2agri-service wfp 17023237 Jan 20 02:15 status_flags_35NNJ.tif
-rw-r--r--. 1 sen2agri-service wfp 16009926 Jan 20 02:08 status_flags_35NPH.tif
-rw-r--r--. 1 sen2agri-service wfp 15007770 Jan 20 02:11 status_flags_35NPJ.tif
-rw-r--r--. 1 sen2agri-service wfp 15116865 Jan 20 02:21 status_flags_35NQH.tif
-rw-r--r--. 1 sen2agri-service wfp 15405840 Jan 20 02:33 status_flags_35NQJ.tif
-rw-r--r--. 1 sen2agri-service wfp 13060924 Jan 20 02:30 status_flags_35PMK.tif
-rw-r--r--. 1 sen2agri-service wfp 15698901 Jan 20 02:40 status_flags_35PML.tif
-rw-r--r--. 1 sen2agri-service wfp 13095671 Jan 20 02:56 status_flags_35PNK.tif
-rw-r--r--. 1 sen2agri-service wfp 14649832 Jan 20 02:57 status_flags_35PNL.tif
-rw-r--r--. 1 sen2agri-service wfp 14571159 Jan 20 03:04 status_flags_35PPK.tif
-rw-r--r--. 1 sen2agri-service wfp 15188562 Jan 20 03:10 status_flags_35PPL.tif
-rw-r--r--. 1 sen2agri-service wfp 14814891 Jan 20 03:17 status_flags_35PQK.tif
-rw-r--r--. 1 sen2agri-service wfp 12410448 Jan 20 03:36 status_flags_35PQL.tif
-rw-r--r--. 1 sen2agri-service wfp   127209 Jan 18 08:26 training_polygons-0.dbf
-rw-r--r--. 1 sen2agri-service wfp      143 Jan 18 08:26 training_polygons-0.prj
-rw-r--r--. 1 sen2agri-service wfp   117212 Jan 18 08:26 training_polygons-0.shp
-rw-r--r--. 1 sen2agri-service wfp     2212 Jan 18 08:26 training_polygons-0.shx
-rw-r--r--. 1 sen2agri-service wfp     1077 Jan 20 03:37 validation-metrics-0.xml
-rw-r--r--. 1 sen2agri-service wfp    41591 Jan 18 08:26 validation_polygons-0.dbf
-rw-r--r--. 1 sen2agri-service wfp      143 Jan 18 08:26 validation_polygons-0.prj
-rw-r--r--. 1 sen2agri-service wfp    35080 Jan 18 08:26 validation_polygons-0.shp
-rw-r--r--. 1 sen2agri-service wfp      788 Jan 18 08:26 validation_polygons-0.shx

Thanks

You’re passing it the wrong directory, You seem to have the temporary directory instead of the output product, which should contain three directories (AUX_DATA, LEGACY_DATA and TILES), an XML and a JPEG.

Yes, manually-generated products won’t show up in the UI.

Any reason for that?

The UI loads everything from a database, while running the processors in the manual mode doesn’t touch that database, in order to work without it.

Appreciate the help! Thanks.