PolygonClassStatistics application stalled after polygons analysis
Description
I want to compute polygon statistics per class on Snow mask distributed by the THEIA platform (http://www.theia-land.fr/en/products/snow).
I use the PolygonClassStatistics for that, The progress report states that 100% of polygons have been analyzed but then
I let the application runs for few hours but it never finished.
There are around 60 000 polygons in the vector file on which I'm trying to compute the statistics.
Steps to reproduce
I use the following snow product from the theia data center (Tile T32TLQ 20180211)
https://theia.cnes.fr/atdistrib/rocket/#/collections/Snow/0324e0d3-a05c-5ed9-92c0-77f084a0dec8
Inside the archive I've used the snow mask in raster and vector formats: SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4_SNW_R2.tif and SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4_SNW_R2.shp
Firstly I've computed a validity mask to only compute statistics on snow and no-snow classes which corresponds to labels 100 and 0) and discard cloud and no-data (labels 205 and 254). I've done this with the bandMath application:
otbcli_BandMath -il ../SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4/SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4_SNW_R2.tif -out nodata_and_cloud_mask.tif uint8 -exp "(im1b1==254 || im1b1== 205)?0:1"
Then, I run the PolygonClassStatistics on the polygons using this validity mask:
otbcli_PolygonClassStatistics -in SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4/SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4_SNW_R2.tif -mask nodata_and_cloud_mask.tif -vec ../SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4/SENTINEL2A_20180211-102559-219_L2B-SNOW_T32TLQ_D_V1-4_SNW_R2.shp -field DN -out PolygonClassStatistics.xml
Configuration information
Tested with OTB develop branch (6.6) in release and debug mode (debug messages don't provide more information on where the application is blocked