I want to subset Sentinel-2 MSI (s2resampled to 10m) image with a polygon shapefile in esa-snappy,but the result subset seems imperfect,only part of the polygon is applied to subset the image,but in SNAP desktop ,the polygon shapefile can be imported as a vector layer ( and a mask) correctly.
I constructed the parameters for subset operator in esa-snaapy with one of the following:
parameters.put(‘geoRegion’, geometry)
parameters.put(‘polygonRegion’, geometry)
parameters.put(‘vectorFile’, lake_boundry_shapefile)
neither of the three can yield correct result.
How to work through this question?Tips are welcome.
Could you please attach the shapefile content and the values used for the geoRegion/polygonRegion parameters?
Additionally, could you provide details regarding the installed SNAP version?
lake_boundry_wkt.txt (56.0 KB)
THis is the WKT for the lake boundry, Sentinel-2 Data is for ‘N0511_R089_T50SQA’ frame, e.g.: S2C_MSIL1C_20250815T023611_N0511_R089_T50SQA_20250815T042830.zip.
SNAP V12.
Parameters setting:
parameters = HashMap()
parameters.put(‘copyMetadata’, True)