This problem is caused by the NaN value in export lat/lon file, in SNAP6.0, the oethorectified lat/lon file are generated by a specific method, and will create some NaN value as the screenshots show below:
This problem is seems caused by merging all tiles together whereas these tiles are not perfect rectangles.
The problem you met can be sloved by two ways, the first is waiting for this bug to be fixed, the second is modifying the ps_load_initial_gamma.m file to remove the PSs candidates which lat/lon value are NaN.
I have met this problem when my first time use SNAP6.0 oethorectified lat/lon option, but it is strange that this problem only occurs sometimes, I am not sure whether it is a bug, so I didn’t point out at that time.
I have modified ps_load_initial_gamma.m at the second time so that this new problem can be solved, and also modified the way of calculating PSs points x,y coordinate, it makes the x,y coordinate calculated by lat/lon file instead of simply assuming that the pixels’ space is default 5m*20m, so that some parameters from step1-4 can be used correctly in StaMPS processing (step 5 re-calculate the x,y coordinate).
ps_load_initial_gamma(v2.0).m (6.3 KB)
This new file should also be used even if you don’t have the NaN problem, since it update the x,y coordinate calculation. But use it cautious, if you meet any problem, please don’t hesitate to contact me.
Hope this helps,