Subset function

Dear Community,

I’m using snappy for SAR data processing. When I used the subset function (based on georegion parameter) for the coherence map and for the displacement map, I got rasters with different shapes (1 pixel more/less in one dimension). When I load raster with coherence map and displacements map in QGIS, they are not coregistered:
image

That’s a problem for me because I would like to mask the map of displacements based on the coherence values. What may be the source of the problem?

Body of my subset function (Python):

parameters = HashMap()
parameters.put("copyMetadata", True)
parameters.put("geoRegion", str(aoi))
return GPF.createProduct("Subset", parameters, product)

I would suggest using the “referenceBand” parameter as well. From the SNAP command line “gpt subset -h” command I get a description of the other parameters.

-PreferenceBand= The band used to indicate the pixel coordinates.

I haven’t confirmed that this would solve your issue, but it seems locking down the pixel coordinates should do the trick.