Hi, I try to clip/subset one Sentine-1 image but have the next problem. Have someone solution to this?
DO you know about rvi i have some questions
pls join in link https://forum.step.esa.int/chat/c/-/22/46
Jira ticket SNAP-3758 created.
2 Likes
The only way I managed to subset a SLC was with snappy. GPT and the desktop app both failed.
import sys, logging, os
sys.path.append(os.environ['HOME']+os.sep+'.snap'+os.sep+'snap-python')
import esa_snappy as es
def tune(params):
'''
Prepare parameters for process
params: dictionary with the parameters'''
parameters=es.HashMap()
if len(params)>0:
for k in params.keys():
parameters.put(k,params[k])
return parameters
def create_subset(wkt, params):
"""Create a subset of the interferogram from polygon in WKT"""
interf_f=es.ProductIO.readProduct('path_to_file.dim'))
interf_s=es.GPF.createProduct('Subset', tune(params), interf_f)
logger.debug(f"Writing subset file {'path_to_subset_file'}")
es.ProductIO.writeProduct(interf_s, ['path_to_subset_file'],
"BEAM-DIMAP")
interf_f.dispose()
interf_s.dispose()
return
logging.basicConfig(format='%(levelname)s:%(asctime)s__%(message)s', datefmt='%m/%d/%Y %I:%M:%S')
logger = logging.getLogger('S1_logger')
logger.setLevel(logging.DEBUG)
wkt = "POLYGON((-42.4504 -22.7267,-42.451 -22.9537,-42.9128 -22.9791,-42.9138 -22.8581,-42.6382 -22.7337,-42.4504 -22.7267))"
params_subset={'copyMetadata': True,
'geoRegion': es.WKTReader().read(wkt)}
1 Like
Ohh thank you so much. I will see it.
Ok, I think that this will be my solution. Best regards.
1 Like