Hello,
I’m trying to subset my S3 image based on the result of a band math expression in GPT.
I filtered the image based on Viewing Zenith Angle and I want to subset from 4865*4091
to 472*4091
. This would exclude all the unnecessary NaN values resulted from band math and save disk space.
My ideas so far:
-
I would need to automatically detect the x,y locations of the valid pixels, which have the min and max x, y values (the four corners of the valid area). Then I could use these locations as Scene Start and Scene End in the Subset operator. Is there a way to do this?
-
Or, it would be so simple using numpy.
Is there a way in XML to NOT write to file but write to a numpy array, and use numpy operations?
Thak you for your help!