I quickly cloned your package to https://github.com/andretheronsa/snap2stamps and made the changes I think are needed and tested it once and it seems to work! It splits MUCH quicker for small study areas since it only processes the required bursts. I havn’t done the next steps yet, so not 100% sure having less burst would break the next steps. I assume as long as you have more than one burst it will work (less then one would make ESD coreg fail right?)
TOPSAR-split only uses the AOI to select bursts, so I don’t think it matters if it is out of bounds or in another swath, it only looks for intersecting bursts in the current swath.
Summary of changes: (Only small changes needed)
splitting_slaves.py now reads the polygon data in too (from line 46) with the code from coreg_ifg_topsar.py;
if "LONMIN" in line:
LONMIN = line.split('=').strip()
if "LATMIN" in line:
LATMIN = line.split('=').strip()
if "LONMAX" in line:
LONMAX = line.split('=').strip()
if "LATMAX" in line:
LATMAX = line.split('=').strip()
polygon=‘POLYGON ((’+LONMIN+’ ‘+LATMIN+’,’+LONMAX+’ ‘+LATMIN+’,’+LONMAX+’ ‘+LATMAX+’,’+LONMIN+’ ‘+LATMAX+’,’+LONMIN+’ ‘+LATMIN+’))’
slave_assemble_split_apply_orbit.xml and slave_split_apply_orbit.xml gets polygon added to node id =TOPSAR split(1/2): (this example I had to add a space between the arrows to work on this forum)
< wktAOI > POLYGON < / wktAOI >
This way the python script reads the project.conf polygon and gives it to the graph to run extract only the relevant bursts.
I think this way the master can also be prepared with the splitting slaves scripts but not sure how you would incorporate this.
I just tested it once with an AOI that overlaps 3 bursts, no time for proper testing sorry, on my way for a holiday break. Enjoy!