Hi,
I am using snappy_subset.py to create a subset of sentintel 1 images. However, it does not save all the metadata from the imput datasets, loosing that under the Original_Product_Metadata, which has the calibration files needed to perform the radiometric calibration of the radar data.
Any help will be really appreciated.
ABraun
December 27, 2019, 7:31am
2
what is the output format of your subset image?
ABraun
December 27, 2019, 12:24pm
4
are you working with SLC or GRD data?
ABraun
December 28, 2019, 4:08pm
6
can you please share the script you use?
Hi Andreas,
Some of the symbols in the print function have been corrupted in the copy/paste. Nevertheless the script is in this link:
import sys
import snappy
from snappy import ProductIO, WKTReader
SubsetOp = snappy.jpy.get_type('org.esa.snap.core.gpf.common.SubsetOp')
if len(sys.argv) != 3:
print("usage: %s <file> <geometry-wkt>" % sys.argv[0])
print(" %s ./TEST.N1 \"POLYGON((15.786082 45.30223, 11.798364 46.118263, 10.878688 43.61961, 14.722727"
"42.85818, 15.786082 45.30223))\"" % sys.argv[0])
sys.exit(1)
file = sys.argv[1]
wkt = sys.argv[2]
geom = WKTReader().read(wkt)
print("Reading...")
product = ProductIO.readProduct(file)
This file has been truncated. show original
Thanks and regards.
ABraun
December 30, 2019, 5:19pm
9
let’s wait for @marpet then who created this script
marpet
January 9, 2020, 8:25am
10
Hi palejandro,
Try adding
op.setCopyMetadata(True)
to the code.
I’ve updated the script in the repository too.
It works. Thank you very much.